Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read staged contracts from CSV file #5425

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

SupunS
Copy link
Member

@SupunS SupunS commented Feb 21, 2024

@SupunS SupunS self-assigned this Feb 21, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (e77011b) 56.36% compared to head (e0e03e0) 56.38%.

Files Patch % Lines
...il/ledger/migrations/staged_contracts_migration.go 85.00% 4 Missing and 2 partials ⚠️
...execution-state-extract/execution_state_extract.go 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           feature/stable-cadence    #5425      +/-   ##
==========================================================
+ Coverage                   56.36%   56.38%   +0.01%     
==========================================================
  Files                        1030     1030              
  Lines                      100004   100049      +45     
==========================================================
+ Hits                        56371    56412      +41     
- Misses                      39377    39380       +3     
- Partials                     4256     4257       +1     
Flag Coverage Δ
unittests 56.38% <81.25%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@janezpodhostnik janezpodhostnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are new line characters handled in the contract code? It looks like there shouldn't be any.

@turbolent
Copy link
Member

@janezpodhostnik I'm fairly sure Go's CSV reader supports newlines (escaped; similar to e.g. also commas and quotes), but we can add a test case if needed

@SupunS
Copy link
Member Author

SupunS commented Feb 22, 2024

multiline codes can be within quotes: 3778fcd. AFAIK, all CSV writers automatically quote (and escape existing quotes), if string content is multi-lined.

@SupunS SupunS force-pushed the supun/staged-contracts branch from 890a62e to 3778fcd Compare February 22, 2024 12:20
@SupunS
Copy link
Member Author

SupunS commented Feb 22, 2024

The failing test TestGossipSubIHaveBrokenPromises_Above_Threshold seems intermittent, and passes locally. It is also not related to the changes here, so will go head and merge the PR.

@SupunS SupunS merged commit 607d0fe into feature/stable-cadence Feb 22, 2024
50 of 51 checks passed
@SupunS SupunS deleted the supun/staged-contracts branch February 22, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants