-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: overhaul lazy init in
gnoland start
(#1985)
## Description This PR started as an implementation of the `gnoland init` command, that initializes the node configuration and secrets, as part of #1885. However, throughout the lifetime of this PR, discussions with @moul have shaped the PR to take a different approach: - `gnoland init`, because it's an alias, does not warrant its own subcommand (it's a combo of `gnoland config init` and `gnoland secrets init` - `gnoland start` should have a much more clear lazy init flow, and it should be **optional** (I added this with the `--lazy` flag). Here is an example of the flow: - <img width="1262" alt="Screenshot 2024-05-14 at 14 42 15" src="https://github.com/gnolang/gno/assets/16712663/30fe0f0a-0078-47af-802a-7cc6909aa3ee"> - documentation that was initially done for `gnoland init` is adapted to use the `gnoland config` and the `gnoland secrets` command suites (this was easy to do, they are an alias) - Lazy initialized secrets and files now show up with a **WARN** label in the CLI - I've updated the init logic for secrets, so that it supports partial initialization, since the original `gnoland start` lazy init regenerated everything that was missing and skipped everything that was present. Partial initialization means that missing secrets are regenerated, and existing ones are skipped - I've dropped a few useless flags for `gnoland start`, with more to be pruned in future PRs. These were legacy / leftover, as we've added better support for them in the meantime As a consequence of these discussions, we have decided to table lazy init removal for the future -- #1886 Closes #1885 Thank you @albttx, @r3v4s, and the team for discussions that led us to finalize this bigger effort of node init flows 🙏 <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
- Loading branch information
1 parent
bb776f0
commit 0a1e732
Showing
18 changed files
with
857 additions
and
278 deletions.
There are no files selected for viewing
Binary file added
BIN
+742 KB
...s/getting-started/local-setup/setting-up-a-local-chain/gnoland-start-manual.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.6 MB
(34%)
docs/assets/getting-started/local-setup/setting-up-a-local-chain/gnoland-start.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.