Bug summary
!reference [.job, key] is GitLab's own YAML tag for splicing another job's key into the current one. It belongs to no YAML schema, so js-yaml throws unknown sequence tag !<!reference> when it hits one. The throw is caught and the parse returns null/[], which takes down the entire file — the include: block included — even though the tag sits in an unrelated job further down. The completion, hover, and validation providers then see no include: and silently do nothing.
!reference is common in real pipelines (it is the standard way to reuse a .setup-style hidden job's script), so any file using one loses input completion entirely.
Steps to reproduce
- Open a
.gitlab-ci.yml with an include: entry carrying an inputs: block, and a later job using - !reference [.some-job, script] (see the snippet below).
- Put the cursor on a blank, correctly-indented line inside that include's
inputs: block.
- Request input-name completion (Ctrl+Space).
Expected behavior
- Input-name completions are offered for the include's not-yet-set inputs. The
!reference tag is in an unrelated job and should have no bearing on the include: block.
Actual behavior
- No completions are offered. The debug log shows
No inputs parameter-name slot at cursor.
- Deleting the
- !reference [.pnpm-setup, script] line makes completions work immediately — confirming the tag is the trigger.
Component context (if applicable)
Component URL: n/a (reproduces with local: and component: includes)
GitLab instance: n/a
Project path: n/a
Version/reference: n/a
Source type: local include / component
Minimal .gitlab-ci.yml snippet
include:
- component: $CI_SERVER_FQDN/my-group/my-project/my-component@1.0.0
inputs:
# cursor on the blank line here — no completions offered before the fix
.pnpm-setup:
script:
- corepack enable
- pnpm install --frozen-lockfile
test:
script:
- !reference [.pnpm-setup, script]
- pnpm test
Extension logs
Affected area
Completion provider
Extension version
0.16.2
VS Code version
1.128.0
Node.js version
22.x
Operating system
macOS
Pre-submit checks
Bug summary
!reference [.job, key]is GitLab's own YAML tag for splicing another job's key into the current one. It belongs to no YAML schema, sojs-yamlthrowsunknown sequence tag !<!reference>when it hits one. The throw is caught and the parse returnsnull/[], which takes down the entire file — theinclude:block included — even though the tag sits in an unrelated job further down. The completion, hover, and validation providers then see noinclude:and silently do nothing.!referenceis common in real pipelines (it is the standard way to reuse a.setup-style hidden job'sscript), so any file using one loses input completion entirely.Steps to reproduce
.gitlab-ci.ymlwith aninclude:entry carrying aninputs:block, and a later job using- !reference [.some-job, script](see the snippet below).inputs:block.Expected behavior
!referencetag is in an unrelated job and should have no bearing on theinclude:block.Actual behavior
No inputs parameter-name slot at cursor.- !reference [.pnpm-setup, script]line makes completions work immediately — confirming the tag is the trigger.Component context (if applicable)
Component URL: n/a (reproduces with local: and component: includes)
GitLab instance: n/a
Project path: n/a
Version/reference: n/a
Source type: local include / component
Minimal .gitlab-ci.yml snippet
Extension logs
Affected area
Completion provider
Extension version
0.16.2
VS Code version
1.128.0
Node.js version
22.x
Operating system
macOS
Pre-submit checks