Closed as not planned
Description
The goal of this issue is to research (and possibly implement) a new "prompt" API endpoint that determines parameter fields that coder UI/CLI must prompt for. Currently, we have the same logic rules encoded in UI and CLI, so there is a risk of having a mismatch.
There are different conditions under which specific fields should be displayed:
- new workspace/consecutive workspace build/workspace update
- immutables vs. mutables
- default values vs. required
prompt_user
(will be added in the nearest future), one-time parameter values- inheriting parameters from previous builds
There is also some coupling with legacy parameters, so ideally we should wait with implementation of this task until legacy params are removed
Slack thread:
Bruno Quaresma
Honestly, I would like to have this logic in the BE somehow.
GET /workspaces/parameters/prompt?templateversion=latest
[
{ name: "githuburl", display_name: "Github", default_value: "something" },
{ name: "otherfied", display_name: "Other field", default_value: null}
]
Bruno Quaresma
so the FE and CLI are going to use the same logic to know what fields ask the user when the users are updating or starting a workspace based in the template version. (edited)