Skip to content

Conversation

@code-asher
Copy link
Member

@code-asher code-asher commented Dec 5, 2025

This is like --yes, but for parameter prompts. Closes #20815. Most of the diff is refactoring the tests since they were all doing the same setup and changes to markdown/golden files for the --yes description change, the actual code changes are fairly small 😛

@code-asher code-asher force-pushed the asher/use-parameter-defaults branch 6 times, most recently from 31577a6 to 5645473 Compare December 5, 2025 07:12
@code-asher code-asher requested review from ssncferreira and removed request for ssncferreira December 6, 2025 02:17
@github-actions github-actions bot added the stale This issue is like stale bread. label Dec 18, 2025
@github-actions github-actions bot closed this Dec 21, 2025
@code-asher code-asher reopened this Jan 7, 2026
To make it easier to add new tests and parameters.  Largely unchanged in
functionality except:

1. All tests now perform parameter validation.
2. Add types to the parameters where before they were all defaulting to
   strings (except boolean, which seems to be an existing issue).
This works already in production, but not in the tests because the
generated Terraform was missing quotes around the default value, which
must have been breaking the parser because it was returning no
parameters.  Then we were removing all non-matching parameters from the
request, which was all of them since the parser returned none.
This will accept parameter defaults without prompting (whether those
defaults come from the template or --parameter-default).  Similar to
--yes, but for parameter prompts.
@code-asher code-asher force-pushed the asher/use-parameter-defaults branch from 5645473 to 8f3f003 Compare January 7, 2026 18:56
@code-asher
Copy link
Member Author

code-asher commented Jan 7, 2026

@deansheather so we have a few solutions to this floating around, my proposal is that we merge this especially since it also refactors the tests and has a related bugfix, then I will open a new PR to also add a --non-interactive flag similar to what Thomas's PR was doing.

That means if you want to auto-select the defaults, but still be prompted for missing values or for a template, you can use this flag, if you want fully non-interactive you can use --non-interactive, and if you just want to skip the y/n prompts you can use --yes. wdyt?

@github-actions github-actions bot removed the stale This issue is like stale bread. label Jan 8, 2026
@deansheather
Copy link
Member

Since there's been 3 PRs from 3 different people trying to fix this issue we should probably get someone from product to chime in on what behavior they want.

@github-actions github-actions bot added the stale This issue is like stale bread. label Jan 16, 2026
@code-asher
Copy link
Member Author

code-asher commented Jan 16, 2026

We got some feedback that this approach works so I think we go ahead and merge, and I will follow up with --non-interactive (changed review request to someone on Mango but I am happy if you would prefer to review it Dean :D).

@code-asher code-asher requested review from Emyrk and removed request for deansheather January 16, 2026 03:03
Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

👍

Idk if there is a good spot in the docs for this

@github-actions github-actions bot removed the stale This issue is like stale bread. label Jan 17, 2026
@code-asher
Copy link
Member Author

Lemme check up on the docs when I work on the next flag!

@code-asher code-asher merged commit 4d414a0 into main Jan 17, 2026
33 checks passed
@code-asher code-asher deleted the asher/use-parameter-defaults branch January 17, 2026 02:05
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

coder create --yes still prompts for parameter input, blocking fully non-interactive workspace creation

4 participants