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

fix: do not ask question on skipped steps #53

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions anvil-python/anvil/commands/haproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from sunbeam.clusterd.client import Client
from sunbeam.commands.terraform import TerraformInitStep
from sunbeam.jobs import questions
from sunbeam.jobs.common import BaseStep
from sunbeam.jobs.common import BaseStep, ResultType
from sunbeam.jobs.juju import JujuHelper
from sunbeam.jobs.steps import (
AddMachineUnitsStep,
Expand Down Expand Up @@ -106,7 +106,11 @@ def has_prompts(self) -> bool:
if self.refresh:
return False

return True
skip_result = self.is_skip()
if skip_result.result_type == ResultType.SKIPPED:
return False
else:
return True

def prompt(self, console: Console | None = None) -> None:
variables = questions.load_answers(
Expand Down
6 changes: 5 additions & 1 deletion anvil-python/anvil/commands/postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ def has_prompts(self) -> bool:
if self.refresh:
return False

return True
skip_result = self.is_skip()
if skip_result.result_type == ResultType.SKIPPED:
return False
else:
return True


class ReapplyPostgreSQLTerraformPlanStep(DeployMachineApplicationStep):
Expand Down
Loading