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

feat: bootstrap command #52

Merged
merged 31 commits into from
Jan 6, 2025
Merged

feat: bootstrap command #52

merged 31 commits into from
Jan 6, 2025

Conversation

PhearZero
Copy link
Member

ℹ Overview

  • adds bootstrap command
  • refactors to data directory

@PhearZero PhearZero added this to the Milestone 2 milestone Dec 24, 2024
@PhearZero PhearZero self-assigned this Dec 24, 2024
Base automatically changed from feat/fast-catchup to main December 24, 2024 12:46
@PhearZero PhearZero force-pushed the feat/bootstrap-command branch from 8d49dd0 to 5092375 Compare December 24, 2024 14:53
@PhearZero PhearZero force-pushed the feat/bootstrap-command branch from 5092375 to 1bfafbd Compare December 24, 2024 15:07
Copy link

codecov bot commented Dec 24, 2024

Codecov Report

Attention: Patch coverage is 34.53237% with 273 lines in your changes missing coverage. Please review.

Project coverage is 49.04%. Comparing base (1674033) to head (1d4b596).
Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
cmd/bootstrap.go 0.00% 98 Missing ⚠️
ui/bootstrap/model.go 0.00% 53 Missing ⚠️
ui/modal/controller.go 0.00% 25 Missing ⚠️
internal/algod/utils/utils.go 68.65% 14 Missing and 7 partials ⚠️
cmd/root.go 41.93% 12 Missing and 6 partials ⚠️
internal/algod/client.go 58.82% 11 Missing and 3 partials ⚠️
cmd/catchup/catchup.go 68.96% 6 Missing and 3 partials ⚠️
internal/algod/state.go 0.00% 7 Missing ⚠️
cmd/debug.go 45.45% 4 Missing and 2 partials ⚠️
internal/algod/catchpoint.go 16.66% 2 Missing and 3 partials ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   48.87%   49.04%   +0.16%     
==========================================
  Files          74       74              
  Lines        5667     5705      +38     
==========================================
+ Hits         2770     2798      +28     
- Misses       2694     2702       +8     
- Partials      203      205       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PhearZero PhearZero marked this pull request as ready for review December 24, 2024 15:12
cmd/root.go Show resolved Hide resolved
ui/bootstrap/model.go Outdated Show resolved Hide resolved
@tasosbit
Copy link
Contributor

When the node isn't running, this file does not exist:

Error: open /var/lib/algorand/algod.net: no such file or directory

Env:

  • algod installed independently of TUI
  • algod is not currently running

Repro:

./algorun

@tasosbit
Copy link
Contributor

When running with an fnet node connected, it errors out with Error: channel not found

the github release channel is set to "dev"

@tasosbit
Copy link
Contributor

tasosbit commented Dec 26, 2024

For light-mode terminals, we want to make sure our colors have enough contrast

  • replace yellow (e.g. in WARN label) with orange
  • replace gray in bootstrap test with default color

1735223967

@PhearZero
Copy link
Member Author

PhearZero commented Jan 2, 2025

When the node isn't running, this file does not exist:

Error: open /var/lib/algorand/algod.net: no such file or directory

This would be the case since we are using the file in this fallback order:

  • Flag for datadir
  • ENV for ALGORAND_DATA
  • default /var/lib/algorand/ (looks like you landed here)

We could update some of the messaging since this would be the case if the user points to a non-existant directory.

Edit: Was able to remove the error handler for the missing file and used an invalid URI to get the expected "node does not exist" behavior

@PhearZero PhearZero force-pushed the feat/bootstrap-command branch from fe2f3f9 to 043b53c Compare January 2, 2025 20:02
@PhearZero PhearZero force-pushed the feat/bootstrap-command branch from 043b53c to cdf3d45 Compare January 2, 2025 20:34
@tasosbit
Copy link
Contributor

tasosbit commented Jan 6, 2025

If I respond "N" to the first bootstrap question, I would expect it to exit, but instead it continues. Can we exit with a message like:

Run ./nodekit bootstrap" to start this installer again.

Edit: maybe not, as this also does "start" and "fast-catchup". TBD

@PhearZero PhearZero merged commit 485b6ec into main Jan 6, 2025
5 checks passed
@PhearZero PhearZero deleted the feat/bootstrap-command branch January 6, 2025 16:09
tasosbit pushed a commit that referenced this pull request Jan 22, 2025
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.

2 participants