Pipeline schedules cannot be created/saved when using inputs with a null default value

Summary

Pipeline schedules fail to be created or saved when pipeline component inputs have unset or null default values. The error messages are vague and do not clearly indicate the root cause, making troubleshooting difficult for users.

Steps to Reproduce

Create a pipeline component with inputs using different default value scenarios:

Scenario 1: Implicit null default

spec:
  inputs:
    WORLD:
      type: string
      default:  # implicit null
---
hello:
  script: echo "Hello $WORLD"

Scenario 2: Explicit null default

spec:
  inputs:
    WORLD:
      type: string
      default: null
---
hello:
  script: echo "Hello $WORLD"

Then attempt to:

  1. Create a pipeline schedule using this component
  2. Edit/save the pipeline schedule

Current Behavior

Scenario Lints OK? Schedule Creates? Schedule Edits/Saves? Error Message
default: (implicit null) Yes No No "An error occurred while creating the pipeline schedule."
default: null (explicit) Yes No No "An error occurred while creating the pipeline schedule."
default: "" (empty string) Yes Yes Yes N/A

Issues:

  • Pipeline linting passes for null defaults, but schedule creation fails
  • Error message is generic and does not indicate the problem is with input defaults
  • Users cannot determine which input is causing the issue
  • No clear guidance on how to fix the configuration

Expected Behavior

One of the following should occur:

  1. Validation at lint time: If null defaults are not supported, the CI linting should fail with a clear message like:

    "Input 'WORLD' has an unsupported null default value. Please provide a default value or mark the input as nullable."

  2. Support null defaults: Implement proper support for null/unset defaults in pipeline schedules (related to #439524)

  3. Improved error messaging: If null defaults cannot be supported, the schedule creation error should clearly indicate:

    "Cannot create pipeline schedule: Input 'WORLD' has an unsupported null default value. Please update the component to provide a valid default value."

GitLab Version

GitLab.com (SaaS)

Deployment Type

GitLab.com

Environment Details

  • Feature: Pipeline Components with Inputs
  • Related to: Pipeline Schedules
  • Affects: Users creating pipeline schedules with component inputs

Additional Context

This issue was reported by a GitLab Ultimate customer (Zendesk ticket #674917) who encountered this problem when using pipeline component inputs with unset default values. The lack of clear error messaging made it difficult to diagnose the issue.

Workaround

The workaround is to use empty string defaults (default: "").

  • #439524 - Introduce nullable input types (parent feature request for proper null support)

Possible Fixes

  1. Short-term: Improve error messages to clearly indicate which input has an unsupported null default and how to fix it
  2. Medium-term: Add validation at CI lint time to fail fast with clear messaging
  3. Long-term: Implement full support for nullable input types as described in #439524
Edited by Manuel Grabowski