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

add --exit-after-init option to Forest #2528

Closed
6 tasks done
LesnyRumcajs opened this issue Feb 8, 2023 · 0 comments · Fixed by #2577
Closed
6 tasks done

add --exit-after-init option to Forest #2528

LesnyRumcajs opened this issue Feb 8, 2023 · 0 comments · Fixed by #2577
Assignees

Comments

@LesnyRumcajs
Copy link
Member

LesnyRumcajs commented Feb 8, 2023

Issue summary

The name of the flag could be improved. :)

The purpose of this flag is not to start Forest services and exit as soon as basic initialisation is completed. This will open some possibilities, amongst others:

  • testing initialisation logic via component tests, like creating the keystore,
  • getting the JWT token easily.

The exit should happen before the snapshot download. It may make sense to move the snapshot download as far as possible to allow the initialisation of as many objects as possible

Task summary

  • introduce the --exit-after-init flag to the Forest daemon,
  • shuffle the code around so that as many initialisations take place as possible
  • write a component test where Forest successfully goes through initialisation ⚠️ make sure that during the tests a temporary data dir is used - we don't want to override the default keystore by running tests.

Acceptance Criteria

  • The flag is implemented and the tests are passing, including the new ones,
  • The flag is appropriately documented, and the changelog is updated,
  • By default, the value of the flag is false,

Other information and links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant