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

chore(cli): Improve error message for attempting genesis with non-empty config dir #4987

Merged
merged 14 commits into from
Feb 11, 2025

Conversation

Alex6323
Copy link
Contributor

@Alex6323 Alex6323 commented Jan 23, 2025

Description of change

Ports the error message of MystenLabs/sui#19487

Deviates from the upstream PR and does fix some very small issues not worth a dedicated PR that are closely related to the intent of this PR. Upstream ignores errors produced by the genesis fn, and assumes a single reason for it to fail in that particular code path. Some reasons for it to fail are still possible though, so the actual error would be hidden from the user, which is not ideal.

How the change was tested

Ran iota start with a non-empty config directory by renaming network.yaml to something else, which triggers that code path.

Links to any relevant issues

fixes #4926

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
apps-backend ⬜️ Ignored (Inspect) Visit Preview Feb 11, 2025 8:54am
apps-ui-kit ⬜️ Ignored (Inspect) Visit Preview Feb 11, 2025 8:54am
rebased-explorer ⬜️ Ignored (Inspect) Visit Preview Feb 11, 2025 8:54am
wallet-dashboard ⬜️ Ignored (Inspect) Visit Preview Feb 11, 2025 8:54am

@iota-ci iota-ci added dev-tools Issues related to the Developer Tools Team sc-platform Issues related to the Smart Contract Platform group. labels Jan 23, 2025
Alex6323 and others added 3 commits February 3, 2025 15:02
@Alex6323 Alex6323 merged commit cca0122 into develop Feb 11, 2025
41 checks passed
@Alex6323 Alex6323 deleted the dev-tools/better-error-message branch February 11, 2025 10:21
lucas-tortora pushed a commit that referenced this pull request Feb 11, 2025
…ty config dir (#4987)

* port error message for genesis on non-empty config dir

* format

* move newlines to end

Co-authored-by: DaughterOfMars <chloedaughterofmars@gmail.com>

* remove artifact

* do not ignore genesis upstream error

---------

Co-authored-by: DaughterOfMars <chloedaughterofmars@gmail.com>
Co-authored-by: Thibault Martinez <thibault@iota.org>
Signed-off-by: Lucas Tortora <lucass.tortora@iota.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-tools Issues related to the Developer Tools Team sc-platform Issues related to the Smart Contract Platform group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore(iota): better error message when a iota config folder exists without genesis metadata
5 participants