spec:inputs with default: null no longer generates meaningful pipeline names in workflow:name since GitLab 18.3
Summary
In GitLab versions prior to 18.3, when using spec:inputs with default: null for pipeline names in workflow:name, GitLab would automatically generate meaningful pipeline names when the input was empty. Starting with GitLab 18.3, this behavior changed and now produces an error instead, forcing users to abandon spec:inputs for pipeline naming and revert to using CI/CD variables.
Steps to reproduce
-
Create a GitLab CI/CD configuration using
spec:inputsfor pipeline naming:spec: inputs: pipeline_name: description: "Custom pipeline name" default: null workflow: name: $[[ inputs.pipeline_name ]] stages: - build build-job: stage: build script: - echo "Building..." -
Set up pipeline triggers for different contexts (branch/MR or scheduled)
-
Leave the
pipeline_nameinput empty (using thedefault: nullvalue) -
Trigger a pipeline in GitLab 18.3+
Example Project
What is the current bug behavior?
In GitLab 18.3+, when a spec:input with default: null is used for workflow:name and the input is left empty, GitLab produces an error instead of generating a meaningful pipeline name. This forces users to:
- Remove the usage of
spec:inputsfor pipeline naming - Revert to using CI/CD variables where the behavior of generating meaningful names for empty variables still works
What is the expected correct behavior?
The behavior should match GitLab versions prior to 18.3:
- When
spec:inputswithdefault: nullis used forworkflow:nameand the input is empty, GitLab should automatically generate a meaningful pipeline name - This would maintain backward compatibility and allow wider adoption of
spec:inputs - The behavior should be consistent with how CI/CD variables work when they are empty
Relevant logs and/or screenshots
This GitLab CI configuration is invalid: workflow name is too short (minimum is 1 character).
Output of checks
This issue occurs on GitLab 18.3+ (both GitLab.com and self-managed instances)
Possible fixes
Restore the pre-18.3 behavior where:
-
spec:inputswithdefault: nullvalues are treated similarly to empty CI/CD variables - When used in
workflow:name, empty inputs trigger GitLab's automatic meaningful name generation - This maintains backward compatibility and encourages adoption of the newer
spec:inputsfeature
Additional Context:
This behavior change appears to be a regression that discourages the use of spec:inputs in favor of the older CI/CD variables approach. For better user experience and wider adoption of spec:inputs, the pre-18.3 behavior should be restored, where GitLab generates meaningful pipeline names when inputs are left empty.