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

config.yml upgrade erases the file when fails #3098

Closed
fadeev opened this issue Nov 11, 2022 · 1 comment · Fixed by #3149
Closed

config.yml upgrade erases the file when fails #3098

fadeev opened this issue Nov 11, 2022 · 1 comment · Fixed by #3149
Assignees
Labels
component:cli-serve Related to Ignite serve. type:bug Something isn't working

Comments

@fadeev
Copy link
Contributor

fadeev commented Nov 11, 2022

ignite s chain example

Remove version from config.yml:

accounts:
  - name: alice
    coins: ['20000token', '200000000stake']
  - name: bob
    coins: ['10000token', '100000000stake']
validators:
  - name: alice
    bonded: '100000000stake'
client:
  openapi:
    path: 'docs/static/openapi.yml'
  typescript:
    path: 'ts-client'
  vuex:
    path: 'vue/src/store'
faucet:
  name: bob
  coins: ['5token', '100000stake']
config is not valid: validator 'name' is required

The problem is that this erases config.yml.

Ideally, if the upgrade process fails for any reason, it should revert back to the original state and print a link to a manual upgrade process.

Ignite CLI version:     v0.25.1
Ignite CLI build date:  2022-10-20T15:52:00Z
Ignite CLI source hash: cc393a9b59a8792b256432fafb472e5ac0738f7c
Cosmos SDK version:     v0.46.3
Your OS:                darwin
Your arch:              arm64
Your Node.js version:   v16.17.0
Your go version:        go version go1.18.3 darwin/arm64
Your uname -a:          Darwin Deniss-MBP.modem.local 22.1.0 Darwin Kernel Version 22.1.0: Mon Aug 29 20:11:49 PDT 2022; root:xnu-8792.40.74.0.1~20/RELEASE_ARM64_T6000 arm64
Your cwd:               /Users/fadeev/example
Is on Gitpod:           false
@fadeev fadeev changed the title config.yml version upgrade error config.yml upgrade erases the file when fails Nov 11, 2022
@fadeev fadeev added component:cli-serve Related to Ignite serve. type:bug Something isn't working labels Nov 11, 2022
@jeronimoalbi
Copy link
Member

I'm actually getting a slightly different error:

Error while loading chain's plugins: config is not valid: validator 'name' is required

The loading of CLI plugins happens before anything. The config file is be read during this process which happens before config file migration.

Some changes are needed because now we have to run config migration before the plugins are loaded. I'm going to work on that.

I guess the error now is slightly different because some plugin changes have been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:cli-serve Related to Ignite serve. type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants