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

Error while loading chain's plugins when running any CLI command in a directory with an invalid config #3178

Closed
lumtis opened this issue Nov 25, 2022 · 4 comments
Labels
type:bug Something isn't working

Comments

@lumtis
Copy link
Contributor

lumtis commented Nov 25, 2022

Describe the bug
For some testing, I have a chain with a config without validator: https://github.com/lubtd/planet

When running CLI commands under this directory, every command fail with the error

Error while loading chain's plugins: config is not valid: at least one validator is required

Even when running commands that should be directory agnostic like

ignite n chain publish https://github.com/ignite/example

The command works if we are in a directory without config.yml

I may understand we fetch the configuration to check plugin to include. However, I don't think the command should fail in case of a invalid config.

I personally suggest that if the config is invalid then it is ignored (for LoadPlugins method) like if it doesn't exist

@lumtis lumtis added the type:bug Something isn't working label Nov 25, 2022
@tbruyelle
Copy link
Contributor

I personally suggest that if the config is invalid then it is ignored (for LoadPlugins method) like if it doesn't exist

I agree with that but I can't replicate, the planet repository has no config.yml file.

@lumtis
Copy link
Contributor Author

lumtis commented Nov 28, 2022

I personally suggest that if the config is invalid then it is ignored (for LoadPlugins method) like if it doesn't exist

I agree with that but I can't replicate, the planet repository has no config.yml file.

What do you mean? The error occur when there is a config but it is invalid

@jeronimoalbi
Copy link
Member

I believe this might be related to the fact that the config must be read in order to load plugins; This happens before the config is migrated to it's entirely possible that a similar error could be raised when the config and the CLI binary are not compatible without the migration because of different config versions. I think issue #3152 would fix the problem.

@jeronimoalbi
Copy link
Member

@lubtd The related issue mentioned in the previous comment is fixed. I just finished running ignite n chain publish https://github.com/ignite/example without a config.yml and it worked without any issues; I think we can already close this one.

There is also PR #3199 that might potentially avoid similar issues with the missing validators.

@lumtis lumtis closed this as completed Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants