Bug summary
For a component input that declares options: (an enum), completion does not help you pick an allowed value in two situations:
- Value position — with the cursor after
inputName: (where you type the value), completion offers the list of input names again instead of that input's allowed values. There is no way to pick an enum value from a dropdown at the point you are setting it.
- Name acceptance, enum + default — when an enum input also declares a
default:, accepting the input by name inserts the bare default value (e.g. critical) instead of offering the enum choice. The allowed alternatives never appear, so the default silently wins.
The name-acceptance dropdown does work for an enum input that has no default — that path was added previously. The two cases above were never handled.
Steps to reproduce
- Open a
.gitlab-ci.yml with an include whose component has an enum input (see snippet).
- Value position: put the cursor after
environment: (in the value slot) and trigger completion. Observe the suggestions.
- Enum + default: on a blank input slot, trigger completion and accept an enum input that also has a
default:. Observe what gets inserted.
Expected behavior
- In the value position after
inputName:, completion offers that input's allowed values (e.g. staging, production) as selectable items; picking one inserts the bare value.
- Accepting an enum input by name inserts a
${1|a,b,c|} choice so the allowed values are one keystroke away — even when the input has a default. The default is pre-selected (placed first), not used to suppress the choice.
Actual behavior
- In the value position, completion offers the list of input names (the name-slot suggestions) rather than the input's allowed values.
- Accepting an enum input that has a default inserts the bare default value with no dropdown; the other allowed values are unreachable from completion.
Component context (if applicable)
No response
Minimal .gitlab-ci.yml snippet
include:
- local: "templates/deploy.yml"
inputs:
environment: # value position here offers input names, not staging/production
with `templates/deploy.yml`:
spec:
inputs:
environment:
type: string
default: staging # accepting `environment` by name inserts `staging`, no dropdown
options:
- staging
- production
Extension logs
Affected area
Completion provider
Extension version
0.14.1
VS Code version
1.126.0
Node.js version
No response
Operating system
macOS
Pre-submit checks
Bug summary
For a component input that declares
options:(an enum), completion does not help you pick an allowed value in two situations:inputName:(where you type the value), completion offers the list of input names again instead of that input's allowed values. There is no way to pick an enum value from a dropdown at the point you are setting it.default:, accepting the input by name inserts the bare default value (e.g.critical) instead of offering the enum choice. The allowed alternatives never appear, so the default silently wins.The name-acceptance dropdown does work for an enum input that has no default — that path was added previously. The two cases above were never handled.
Steps to reproduce
.gitlab-ci.ymlwith an include whose component has an enum input (see snippet).environment:(in the value slot) and trigger completion. Observe the suggestions.default:. Observe what gets inserted.Expected behavior
inputName:, completion offers that input's allowed values (e.g.staging,production) as selectable items; picking one inserts the bare value.${1|a,b,c|}choice so the allowed values are one keystroke away — even when the input has a default. The default is pre-selected (placed first), not used to suppress the choice.Actual behavior
Component context (if applicable)
No response
Minimal .gitlab-ci.yml snippet
Extension logs
Affected area
Completion provider
Extension version
0.14.1
VS Code version
1.126.0
Node.js version
No response
Operating system
macOS
Pre-submit checks