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

  1. Create a GitLab CI/CD configuration using spec:inputs for 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..."
  2. Set up pipeline triggers for different contexts (branch/MR or scheduled)

  3. Leave the pipeline_name input empty (using the default: null value)

  4. Trigger a pipeline in GitLab 18.3+

Example Project

Random CI

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:

  1. Remove the usage of spec:inputs for pipeline naming
  2. 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:inputs with default: null is used for workflow:name and 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:

  1. spec:inputs with default: null values are treated similarly to empty CI/CD variables
  2. When used in workflow:name, empty inputs trigger GitLab's automatic meaningful name generation
  3. This maintains backward compatibility and encourages adoption of the newer spec:inputs feature

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.

Edited by 🤖 GitLab Bot 🤖