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

flow-c1 migrate state no longer reports errors #1625

Closed
NtTestAlert opened this issue May 28, 2024 · 4 comments
Closed

flow-c1 migrate state no longer reports errors #1625

NtTestAlert opened this issue May 28, 2024 · 4 comments
Assignees
Labels
Bug The issue represents a bug, malfunction, regression Feedback

Comments

@NtTestAlert
Copy link

NtTestAlert commented May 28, 2024

The state migrator used to report errors (usually, but not always, with helpful information).
It no longer does that.
Also, it now silently hides errors - if a contract failed to update, nothing is printed to the console about it, and the process exits with non-error exit code

The state file (sqlite) is patched, and all contracts that succeeded to update are migrated.
But those that failed do not cause emulator startup errors.
You will only find out once you try to interact with said contracts in a transaction/script.

This is extremely frustrating, especially since the errors might be related to flow.json configuration, not cadence code problems
(legacy/stable-cadence code might be perfectly fine)

@NtTestAlert
Copy link
Author

NtTestAlert commented May 28, 2024

In my case it was a problem where FungibleToken (that is a dependency of the updated contract) had incorrect address in flow.json
That was the only problem - so re-reading .cdc files 10 times to find what might be improperly migrated was not helpful.

Sidenote: Since it is a built-in contract, and one the migrator is well aware of, it should not be required to be included in the deployments in flow.json, IMHO.

@turbolent
Copy link
Member

@turbolent
Copy link
Member

Mostly a UX problem:

  • Error messages are there, but in report, and thus not obvious
  • Exit code does not indicate failure
  • Logs are noisy and should only contain actionable items

@NtTestAlert
Copy link
Author

NtTestAlert commented May 28, 2024

Additional confusion may be due to the fact that some errors - such us "cannot read contract code" do cause an error - and a fatal one at that.
But I suppose that is a cli (or flowkit) error not a state-migrator error.

@chasefleming chasefleming removed their assignment May 29, 2024
@chasefleming chasefleming moved this to 🔖 Ready for Pickup in 🌊 Flow 4D May 29, 2024
@chasefleming chasefleming added the Bug The issue represents a bug, malfunction, regression label May 29, 2024
@ianthpun ianthpun moved this from 🔖 Ready for Pickup to 🏗 In Progress in 🌊 Flow 4D May 30, 2024
@ianthpun ianthpun self-assigned this May 30, 2024
@ianthpun ianthpun moved this from 🏗 In Progress to ✅ Done in 🌊 Flow 4D Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug The issue represents a bug, malfunction, regression Feedback
Projects
Archived in project
Development

No branches or pull requests

5 participants