Skip to content

Add earlier validation of pipeline result references #3499

@ghost

Description

Feature request

At the moment we fail a PipelineRun with InvalidTaskResultReference when we're scheduling the next TaskRuns to execute. This can happen after some tasks in the pipeline have already executed, which takes time. It should be possible to inspect all referenced Tasks before a PipelineRun starts and confirm that any references to Task Results from variables in the Pipeline are not misspelled or otherwise invalid. This would result in a shorter time to failure and a shorter time to the user realizing their mistake.

Use case

When a user submits a PipelineRun they could receive an earlier error message if any variables in the Pipeline refer to results that simply don't exist on the tasks being referenced.

More Details

We'll need to decide if we're happy to pay whatever cost there is holding back the PipelineRun's start of execution until the reconciler has fetched and checked every referenced Task and its results.

Turns out we already fetch all the tasks as part of each PipelineRun reconcile. So it should just be a case of validating the relationships between them on the first reconcile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions