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 --local (-L) for --consistency-only and --predict-only options #485

Merged
merged 7 commits into from
Dec 2, 2024

Conversation

elikoga
Copy link
Member

@elikoga elikoga commented Nov 18, 2024

The --local flag allows running consistency checks and deployment predictions using the local host's state, without connecting to the remote host. This flag can only be used with the --consistency-only or --predict-only options.

@elikoga elikoga marked this pull request as ready for review November 18, 2024 03:58
@elikoga elikoga requested a review from zagy as a code owner November 18, 2024 03:58
doc/source/cli/index.txt Outdated Show resolved Hide resolved
The `--check-and-predict-local` flag allows running consistency checks and deployment predictions using the local host's state, without connecting to the remote host. This flag can only be used with the `--consistency-only` or `--predict-only` options.
@zagy zagy force-pushed the add-check-and-predict-local-flag branch from bcdfb1c to aad4e13 Compare November 22, 2024 06:06
@stevleibelt
Copy link

I am totally out of scope of what the options are doing. This warning written, I am just reading the command option check-and-predict-local and assuming that:

  • check can be called independently
  • predict can be called independently
  • if local is mentioned, there must be a global

If all is true, is there an option to split them up into --check --predict --local?
This way you are free to combine them how you want like:

  • --check --local
  • --check --global
  • --predict --local
  • --predict --global
  • --check --predict --local
  • --check --predict --global

I don't know if --global is the default scope and you don't have to mention it explicit.
Of course this only hides the complexity for the user in the cli. As developer, you have to check if the inserted flag combination makes sense and is doable. This would also result in a bigger man-page. But at least your cli is still small and gives you freedom how to use it.

Kind regards.

@elikoga
Copy link
Member Author

elikoga commented Nov 22, 2024

predict only and consistency check are mutually exclusive.
the counterpart for local in this context is remote, which is intended to be a flagless default, due to the fact that batou is a deployment tool

@elikoga elikoga changed the title Add --check-and-predict-local Add --local (-L) for --consistency-only and --predict-only options Dec 2, 2024
@zagy zagy merged commit 5cad7bd into main Dec 2, 2024
15 checks passed
@zagy zagy deleted the add-check-and-predict-local-flag branch December 2, 2024 12:22
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

Successfully merging this pull request may close these issues.

3 participants