Skip to content

Skip interactive prompts for database flags that are explicitly set - #162

Open
blsmth wants to merge 1 commit into
mainfrom
fix-engine-flag-ignored-85
Open

Skip interactive prompts for database flags that are explicitly set#162
blsmth wants to merge 1 commit into
mainfrom
fix-engine-flag-ignored-85

Conversation

@blsmth

@blsmth blsmth commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Problem

apppack create database ignored flags like --engine. Even when a flag was provided, AskQuestions unconditionally re-prompted for cluster, engine, aurora, instance-class, and multi-az — the flag value was only used as the prompt default, so users still had to pick from a dropdown.

Fixes #85.

Change

  • UpdateFromFlags now records which flags the user explicitly set (via flags.Visit).
  • AskQuestions skips the prompt for any flag that was set.
  • --engine accepts the fully-qualified engine name (mysql, postgres, aurora-mysql, aurora-postgresql) and bypasses both the engine and aurora prompts. The value is validated so a typo fails fast instead of silently.
  • When --instance-class is provided, the RDS DescribeOrderableDBInstanceOptions API call is skipped entirely (no prompt, no lookup).

Flags left unset still prompt interactively exactly as before. --non-interactive is unaffected.

Notes

The same 'flag ignored' pattern applies to other create subcommands (ipmb noted --cluster); this PR fixes the database command. Happy to follow up with the same treatment elsewhere if we like the approach.

apppack create database always re-prompted for cluster, engine, aurora,
instance-class, and multi-az even when those values were passed as flags,
so --engine (and friends) were effectively ignored.

Record which flags were explicitly set in UpdateFromFlags and skip the
matching prompt in AskQuestions. The --engine flag now accepts the fully
qualified name (mysql, postgres, aurora-mysql, aurora-postgresql) and
bypasses both the engine and aurora prompts; the value is validated.

Fixes #85
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.

--engine Flag Ignored in apppack create database Command

1 participant