Skip to content

fix: remove Tekton Alpha API override fields - #1736

Merged
jenkins-x-bot merged 2 commits into
jenkins-x:mainfrom
spring-financial-group:fix/MatrixCombinationsDefault
Dec 1, 2026
Merged

jenkins-x-bot merged 2 commits into
jenkins-x:mainfrom
spring-financial-group:fix/MatrixCombinationsDefault

Conversation

@Skisocks

@Skisocks Skisocks commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Changelog

  • Remove enableAlphaAPIFields function
  • Add a pipeline-matrix case to TestLoadPipelineRunTest: a task fanned out with matrix over another task's array result, with steps from uses:.

Context

We have a use case for using Tekton matrix to fan out tasks, I've tried running it but hit validation errors with jx pipeline effective which would then also occur in Lighthouse. Our pipeline has a matrix over another task's array result. The new pipeline-matrix test is a minimal reproduction.

jx pipeline effective -p postsubmit/release
error: failed to load .lighthouse/jenkins-x/release.yaml: failed to unmarshal YAML file .lighthouse/jenkins-x/release.yaml: failed to validate generated PipelineRun: expected 0 <= 1 <= 0: spec.pipelineSpec.tasks[1].matrix

The validation context built a config.Defaults with only DefaultTimeoutMinutes, so the max matrix combinations count was 0 and any matrix failed validation.

Rather than patching that config, this removes it. Without a config in the context Tekton falls back to its own defaults (enable-api-fields: beta, max matrix combinations 256), so this validation can't drift from Tekton again.

Testing

Test result pre-config change:

--- FAIL: TestLoadPipelineRunTest (0.01s)
    load_pipelinerun_test.go:123:
        	Error:      	Received unexpected error:
        	            	expected 0 <= 1 <= 0: spec.pipelineSpec.tasks[1].matrix
        	            	failed to validate generated PipelineRun
        	Test:       	TestLoadPipelineRunTest
        	Messages:   	failed to load PipelineRun for load file test_data/load_pipelinerun/pipeline-matrix/source.yaml
FAIL
FAIL	github.com/jenkins-x/lighthouse/pkg/triggerconfig/inrepo	0.606s

Test result post-config change:

=== RUN   TestLoadPipelineRunTest
--- PASS: TestLoadPipelineRunTest (0.01s)
PASS
ok  	github.com/jenkins-x/lighthouse/pkg/triggerconfig/inrepo	0.548s

@Skisocks

Copy link
Copy Markdown
Member Author

/cc @msvticket

Comment on lines 173 to 182
DefaultMaxMatrixCombinationsCount: config.DefaultMaxMatrixCombinationsCount,
},
FeatureFlags: featureFlags,
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looking at the commit message it seems like the enableAlphaAPIFields function was introduced just to make the uses-steps-with-sidecar-ws test go through. For me make tests succeeds after removing the call to enableAlphaAPIFields, so I think you can remove it.

In runtime it shouldn't be needed since the enable-api-fields: alpha is set in the tekton-pipeline chart: https://github.com/jenkins-x/jx3-versions/blob/master/charts/cdf/tekton-pipeline/values.yaml.gotmpl

And I actually don't think enable-api-fields: alpha is something we make use of now anyway.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block the change to use Tekton’s default matrix combination limit.

No open issues 🎉

What changed in this PR

This PR fixes matrix validation for in-repository pipelines by using Tekton’s default limit of 256 matrix combinations instead of an implicit zero.

Changes:

  • Initialize the matrix combination limit in the PipelineRun validation context.
  • Add regression fixtures covering matrix fan-out over an array result with task steps loaded through uses:.
File Description
pkg/​triggerconfig/​inrepo/​test_data/​load_pipelinerun/​pipeline-matrix/​source.yaml Defines the matrix fan-out regression input.
pkg/​triggerconfig/​inrepo/​test_data/​load_pipelinerun/​pipeline-matrix/​README.md Documents the fixture’s purpose.
pkg/​triggerconfig/​inrepo/​test_data/​load_pipelinerun/​pipeline-matrix/​expected.yaml Records the expected expanded PipelineRun.
pkg/​triggerconfig/​inrepo/​test_data/​load_pipelinerun/​pipeline-matrix/​build-task.yaml Supplies the task steps imported through uses:.
pkg/​triggerconfig/​inrepo/​default_parameters.go Sets Tekton’s default matrix combination limit for validation.

Review effort: Balanced

@Skisocks Skisocks changed the title fix: allow matrix in in-repo pipelines fix: remove Tekton Alpha API override fields Nov 30, 2026
@Skisocks
Skisocks requested a review from msvticket November 30, 2026 23:05
@msvticket
msvticket requested a balanced review from Copilot December 1, 2026 08:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the matrix-validation change.

No open issues 🎉

Review effort: Balanced

@jenkins-x-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msvticket

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

The pull request process is described here

Details 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

@jenkins-x-bot

Copy link
Copy Markdown
Contributor

Failed to merge this PR at Tue, 01 Dec 2026 09:38:26 UTC due to:

failed merging [1736]: [Method Not Allowed]

@jenkins-x-bot
jenkins-x-bot merged commit 304b403 into jenkins-x:main Dec 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants