Skip to content

feat(nns-release-tools): More ergonomic NNS & SNS upgrade proposals. - #1046

Merged
daniel-wong-dfinity-org merged 9 commits into
masterfrom
more-ergonomic-nns-upgrade-proposals-2024-08-21-daniel-wong
Aug 23, 2024
Merged

daniel-wong-dfinity-org merged 9 commits into
masterfrom
more-ergonomic-nns-upgrade-proposals-2024-08-21-daniel-wong

Conversation

@daniel-wong-dfinity-org

@daniel-wong-dfinity-org daniel-wong-dfinity-org commented Aug 21, 2024 •

Copy link
Copy Markdown
Contributor

Various changes that IMHO make NNS canister upgrade and SNS publish proposals easier to generate, submit, and read.

  • Instead of the title containing two giant opaque IDs, it says something nice, like "Upgrade the Governance Canister to Commit abcd123"
  • DRY_RUN environment variable.
  • Instructions for how to verify WASM:
    • Mention pre-requisites. The instructions should now be complete.
    • Explain the steps.
  • When asking whether the proposer is sure they want to submit the proposal, print each ic-admin flag on its own line. (This is like how you wouldn't put many statements in a Rust or C program on the same line. Yes, it would be a more efficient use of screen space, but it is a less efficient use of reader brain cycles, which is a far more precious resource.)
  • Use colors consistently (and hopefully, intuitively?):
    • prompts are green
    • yellow is to specially call out important, but not critical information
    • blue is for (ASCII art) line across the screen
  • This might be controversial, but do not mention "uninteresting" information in the proposal description. In particular, it no longer mentions
    • The WASM hash. This is only useful for verification, and for that purpose, people should not be pulling this value from the description anyway.
    • Target canister ID. Instead, the description (like the title) only mentions the canister's name. The reasoning here is the same: the ID can be found elsewhere, is only useful for verification, and the description is not a suitable source of such information.
  • Because these two pieces of information are removed, verifying (at proposal submission time) that they are consistent with other information in the proposal (namely git commit ID, and canister name) is no longer performed.
  • Previously, if the internal ic-admin call failed, the proposal submission script would still finish successfully. Now, our wrapper scripts also fails in that case.
  • More explicit (and celebratory) feedback to the user at the conclusion.
  • Link to additional information.
  • Help strings are not so wide (max 80 char) anymore.
  • Instead of downloading entire WASM during the proposal text preparation, just make sure it exists (via curl --head ...). (Previously, downloading the whole thing was necessary, since we wanted to insert the WASM hash into the proposal text, but as mentioned earlier, we got rid of this.)

@daniel-wong-dfinity-org daniel-wong-dfinity-org changed the title More ergonomic NNS upgrade proposals (both for proposer, and voters). feat(nns): More ergonomic NNS upgrade proposals (both for proposer, and voters). Aug 21, 2024
@github-actions github-actions Bot added the feat label Aug 21, 2024
…pgrading NNS canisters in an earlier commit today.
…d entire pre-built WASM. Instead, they just make sure that it exists. Previously, a full download was needed to get WASM hash, but this is no longer used.
@daniel-wong-dfinity-org daniel-wong-dfinity-org changed the title feat(nns): More ergonomic NNS upgrade proposals (both for proposer, and voters). feat(nns): More ergonomic NNS & SNS upgrade proposals (both for proposer, and voters). Aug 21, 2024
@daniel-wong-dfinity-org daniel-wong-dfinity-org changed the title feat(nns): More ergonomic NNS & SNS upgrade proposals (both for proposer, and voters). feat(nns): More ergonomic NNS & SNS upgrade proposals. Aug 21, 2024

@sasa-tomic sasa-tomic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, but will still share a general comment: bash should not be used for scripts longer than a few lines. Bash scripts are not modular, testable, very readable, and generally they are not maintainable. So it would be really good if used Rust for this instead.
We already have a DRE tool in the other repo, which interacts with ic-admin, or there could be a tool in this repo, I wouldn't mind either way.

@daniel-wong-dfinity-org

Copy link
Copy Markdown
Contributor Author

in the other repo

Not sure what this is referring to?

@daniel-wong-dfinity-org daniel-wong-dfinity-org changed the title feat(nns): More ergonomic NNS & SNS upgrade proposals. feat(nns-release-tools): More ergonomic NNS & SNS upgrade proposals. Aug 22, 2024
@daniel-wong-dfinity-org
daniel-wong-dfinity-org added this pull request to the merge queue Aug 23, 2024
Merged via the queue into master with commit 81cfd0e Aug 23, 2024
@daniel-wong-dfinity-org
daniel-wong-dfinity-org deleted the more-ergonomic-nns-upgrade-proposals-2024-08-21-daniel-wong branch August 23, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants