Skip to content

add contract migration check on all calls#1547

Merged
ianthpun merged 47 commits into
feature/stable-cadencefrom
ianthpun/validation-check
May 16, 2024
Merged

add contract migration check on all calls#1547
ianthpun merged 47 commits into
feature/stable-cadencefrom
ianthpun/validation-check

Conversation

@ianthpun

@ianthpun ianthpun commented Apr 26, 2024

Copy link
Copy Markdown
Contributor

Closes #1543

Description

confirmed working here with a manual test

image


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@ianthpun ianthpun changed the base branch from master to release/stable-cadence April 26, 2024 20:43
@ianthpun ianthpun changed the base branch from release/stable-cadence to feature/stable-cadence April 26, 2024 20:43

@chasefleming chasefleming left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A couple minor things

Comment thread internal/migrate/is_validated.go Outdated
Comment thread internal/command/command.go Outdated
Comment thread internal/migrate/is_validated.go Outdated
var missingContractErr error
if !slices.Contains(foundAddresses, addr) {
builder := strings.Builder{}
builder.WriteString("some contracts do not appear to have been a part of any emulated migrations yet, please ensure that it has been staged & wait for the next emulated migration (last migration report was at ")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Capitalize "Some"

@codecov-commenter

codecov-commenter commented May 7, 2024

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 24.24242% with 25 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/command/command.go 0.00% 18 Missing ⚠️
internal/migrate/is_validated.go 0.00% 6 Missing ⚠️
internal/migrate/stage.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment thread internal/command/command.go Outdated
Comment thread internal/command/command.go Outdated
@chasefleming

Copy link
Copy Markdown
Member

@ianthpun has this been manually tested? The screenshot shows the code error output? That seems large and unnecessary. Can we keep everything but the error output and maybe say something like "run blah command" to see the errors?

@chasefleming

Copy link
Copy Markdown
Member

Looks like @jribbink already left a similar comment as I just did so plus one.

Comment thread internal/command/command.go Outdated
Comment thread internal/command/command.go Outdated
" - Account: %s\n"+
" - Contract: %s\n"+
" - Error: %s\n",
contract.ContractName,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, this is a lot to show. Is it better just to say like "3 contracts with errors found since last migration," and then a way to see more?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ya i agree i think it's quite a bit. Maybe we can list the contracts and then just like to the migration data?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated now

image

I/ll update the original PR screenshot as well

@chasefleming chasefleming May 15, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What does it look like if there are multiple that fail? Is there any sort of separation before they repeat?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

image

i'll update the initial PR to show that as well if anyones curious

@ianthpun ianthpun requested review from chasefleming and jribbink May 14, 2024 23:36
Comment thread internal/command/command.go
Comment thread internal/command/command.go Outdated
@chasefleming chasefleming added the Feature A new user feature or a new package API label May 15, 2024
@ianthpun ianthpun requested a review from jribbink May 16, 2024 17:45
@ianthpun ianthpun merged commit 8987859 into feature/stable-cadence May 16, 2024
@ianthpun ianthpun deleted the ianthpun/validation-check branch May 16, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature A new user feature or a new package API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants