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

Improve verify_and_configure() #303

Open
sajith opened this issue Apr 9, 2024 · 0 comments
Open

Improve verify_and_configure() #303

sajith opened this issue Apr 9, 2024 · 0 comments
Assignees

Comments

@sajith
Copy link
Member

sajith commented Apr 9, 2024

Like #302, this is another follow-up to the discussion on #301, and this might be a matter of opinion: IMO verify_and_configure() would be better as two explicit steps: a generate_configuration() method to generate configuration (hostnames, sliver/bastion ssh keys, bastion username, project ID), and then a verify_configuration() method to validate the configuration.

  • This way the steps will be explicit rather than implicit.
  • People who want to manually configure things or temporarily override configuration using environment variables can benefit from validate_configuration(). (Speaking of, I'm not sure we give environment variables the "correct" priority, and that should be a separate issue.)

It would be also useful if validate_configuration() can return a list of errors, rather than return at the first failure.

@sajith sajith self-assigned this Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant