-
Notifications
You must be signed in to change notification settings - Fork 558
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
fix: network commands check for latest config version before build #2922
fix: network commands check for latest config version before build #2922
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the PR should show an output like
config version v3 is required to run the command and the current version is v2
in case of config incompatibility?
If I publish a chain with an old config I get
ignite n chain publish https://github.com/ignite/example --hash 57e435b376d32c5dd35d325b4df2b1948e6cffae
Source code fetched
Blockchain set up
config is not valid: at least one validator is required
Same output as before
Highly likely that I missed a case that needs the validation. I got the right behaviour in my tests with a local SPN blockchain without using the
I will check it. |
@lubtd this particular issue happens because the format of the config.yml in that changeset is invalid, it has I will move the version check out from the chain build method though, because otherwise we could have cases that might scape the version check so I'm thinking that is better to check in each network command handler that uses the config. |
Got it I haven't realize this Thanks |
Changes are good to me Although |
@lubtd the test broke because is cloning the |
Regarding the last comment I am leaning towards updating the config of the Something worth mentioning for the current setup is that we would have to make a PR to the |
Mentioning the hash is a good idea For |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per my previous comment. Using https://github.com/ignite/example
for the chain launch example for tests
Co-authored-by: Alex Johnson <alex@shmeeload.xyz>
…gnite#2922) * fix: network commands check for latest config version before build * chore: change network publish integration test to use example repo * Update changelog.md Co-authored-by: Alex Johnson <alex@shmeeload.xyz> * chore: improve config version check implementation * test: add `chainconfig.CheckVersion` tests Co-authored-by: Alex Johnson <alex@shmeeload.xyz>
Fixes #2896