Repository navigation
fix: network commands check for latest config version before build - #2922
Conversation
lubtd
left a comment
There was a problem hiding this comment.
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 |
lubtd
left a comment
There was a problem hiding this comment.
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