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 --check-and-predict-local #485

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

elikoga
Copy link
Member

@elikoga elikoga commented Nov 18, 2024

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.

@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
@@ -30,7 +30,9 @@ batou deploy

.. code-block:: console

usage: batou deploy [-h] [-p PLATFORM] [-t TIMEOUT] [-D] [-c] [-P] [-j JOBS]
usage: batou deploy [-h] [-p PLATFORM] [-t TIMEOUT] [-D] [-c] [-P]
[--check-and-predict-local] [-j JOBS]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The option is too long. --local and -L maybe?

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

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