Skip to content

feat!: skip updating optional or already populated required parameter values when skipped - #414

Open
awphi wants to merge 5 commits into
mainfrom
skip-config-params
Open

feat!: skip updating optional or already populated required parameter values when skipped#414
awphi wants to merge 5 commits into
mainfrom
skip-config-params

Conversation

@awphi

@awphi awphi commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Background

The problem

Take the following project:

# compose.yaml
services:
  my-service:
    build:
      args: ["BAR=nondefault", "FOO=whatever"]	  

x-topo:
  parameters:
    BAR:
      default: 'default-bar'
    FOO:
      default: 'default-foo'

I've configured my BAR param value to a non-default. I want to now re-configure but adjust my FOO param value. This is really annoying in Topo today because when a parameter specified a default and you press enter on the 'enter a value for the param' prompt, it reverts to the default! Same goes for omitting a parameter in non-interactive mode.

Changes

  • Remove the default param field altogether. It's already mostly duplication because it should be specified in the build args themselves anyway to make the project git clone-able.

This avoids a complicated TUI (the alternative that we previously discussed) where we would have to present the user with 3 options (enter new value, use default, leave unchanged) and keeps the prompt simple:

  • Press enter to leave build args of that param unchanged, always
  • Enter a new value to update all build args of that param

This simpler flow has a couple of advantages:

  • Easier to understand + document within the CLI
  • Allows for manual 'configuration' of build args in place via file editing w/o risk that Topo might blat your value out of existence
  • Gives Project authors one less thing to worry about and potentially get wrong
  • Generally feels more predictable by virtue of not trying to be smarter than the user
  • Less clash between example and default which are generally duplicates atm. example remains as useful way to revert params to sensible Project author defined value if the user borks their configure.

Checklist

  • 🤖 This change is covered by tests as required.
  • 🤹 All required manual testing has been performed.
  • 📖 All documentation updates are complete.

awphi added 5 commits August 13, 2026 16:47
Signed-off-by: awphi <26072111+awphi@users.noreply.github.com>
Signed-off-by: awphi <26072111+awphi@users.noreply.github.com>
Signed-off-by: awphi <26072111+awphi@users.noreply.github.com>
# Conflicts:
#	docs/project-specification/02-project-configuration.md
@awphi
awphi requested a review from a team as a code owner August 18, 2026 09:51
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.

1 participant