Skip to content

Conversation

@mathur07
Copy link

@mathur07 mathur07 commented Nov 11, 2025

This fix applies the same safety check that was added to v1 pipelines in PR #8089. The validateMatrixedPipelineTaskConsumed function was panicking when encountering invalid variable substitutions like "$(tasks)-$(tasks.echo-result.results.output)" because it tried to access subExpressions[1] without first checking if the expression was a valid result reference.

The fix adds a check to skip expressions that don't look like result references before attempting to parse them, preventing the panic and allowing the webhook to return a proper validation error instead.

Fixes: SRVKP-9204
Related: #8089

Changes

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Nov 11, 2025
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 11, 2025
This fix applies the same safety check that was added to v1 pipelines
in PR tektoncd#8089. The validateMatrixedPipelineTaskConsumed function was
panicking when encountering invalid variable substitutions like
$(tasks)-$(tasks.echo-result.results.output) because it tried to
access subExpressions[1] without first checking if the expression
was a valid result reference.

The fix adds a check to skip expressions that don't look like result
references before attempting to parse them, preventing the panic and
allowing the webhook to return a proper validation error instead.

Fixes: SRVKP-9204
Related: tektoncd#8089
@mathur07 mathur07 force-pushed the fix-v1beta1-matrix-validation-panic branch from 355e530 to 9bed296 Compare November 11, 2025 07:23
@mathur07 mathur07 changed the title Fix panic in v1beta1 matrix validation for invalid result refs fix: panic in v1beta1 matrix validation for invalid result refs Nov 11, 2025
@mathur07
Copy link
Author

/kind fix

@tekton-robot
Copy link
Collaborator

@mathur07: The label(s) kind/fix cannot be applied, because the repository doesn't have them.

In response to this:

/kind fix

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@mathur07
Copy link
Author

/ok-to-test

@mathur07
Copy link
Author

/retest

@vdemeester
Copy link
Member

TestExamples/v1/taskruns/dind-sidecar is consistently failing on this PR 🤔

@mathur07
Copy link
Author

The test failure appears to be a Docker Hub rate-limiting issue.

@aThorp96
Copy link
Member

CI will likely be resolved with #9139

Copy link
Member

@aThorp96 aThorp96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 12, 2025
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: aThorp96
To complete the pull request process, please assign vdemeester after the PR has been reviewed.
You can assign the PR to them by writing /assign @vdemeester in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@waveywaves
Copy link
Member

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

5 participants