Skip to content

Commit 0fdb11b

Browse files
committed
Matrix Promotion to Beta
Matrix was introduced in Tekton Pipelines 0.38. We have introduced a lot of testing around matrix feature including unit/e2e/integration tests. Matrix unblocks variety of use cases for systems migrating from travis/jenkins. This is a very crucial feature for many end-users while allowing to maintain clean, concise, and flexible catalog of pipelines. Part of #5265 and #6110 Signed-off-by: Priti Desai <pdesai@us.ibm.com>
1 parent f5578a8 commit 0fdb11b

14 files changed

+133
-162
lines changed

docs/additional-configs.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ Features currently in "alpha" are:
311311
| [Windows Scripts](./tasks.md#windows-scripts) | [TEP-0057](https://github.com/tektoncd/community/blob/main/teps/0057-windows-support.md) | [v0.28.0](https://github.com/tektoncd/pipeline/releases/tag/v0.28.0) | |
312312
| [Debug](./debug.md) | [TEP-0042](https://github.com/tektoncd/community/blob/main/teps/0042-taskrun-breakpoint-on-failure.md) | [v0.26.0](https://github.com/tektoncd/pipeline/releases/tag/v0.26.0) | |
313313
| [Step and Sidecar Overrides](./taskruns.md#overriding-task-steps-and-sidecars) | [TEP-0094](https://github.com/tektoncd/community/blob/main/teps/0094-specifying-resource-requirements-at-runtime.md) | [v0.34.0](https://github.com/tektoncd/pipeline/releases/tag/v0.34.0) | |
314-
| [Matrix](./matrix.md) | [TEP-0090](https://github.com/tektoncd/community/blob/main/teps/0090-matrix.md) | [v0.38.0](https://github.com/tektoncd/pipeline/releases/tag/v0.38.0) | |
315314
| [Task-level Resource Requirements](compute-resources.md#task-level-compute-resources-configuration) | [TEP-0104](https://github.com/tektoncd/community/blob/main/teps/0104-tasklevel-resource-requirements.md) | [v0.39.0](https://github.com/tektoncd/pipeline/releases/tag/v0.39.0) | |
316315
| [Trusted Resources](./trusted-resources.md) | [TEP-0091](https://github.com/tektoncd/community/blob/main/teps/0091-trusted-resources.md) | N/A | `trusted-resources-verification-no-match-policy` |
317316
| [Larger Results via Sidecar Logs](#enabling-larger-results-using-sidecar-logs) | [TEP-0127](https://github.com/tektoncd/community/blob/main/teps/0127-larger-results-via-sidecar-logs.md) | [v0.43.0](https://github.com/tektoncd/pipeline/releases/tag/v0.43.0) | `results-from` |
@@ -331,13 +330,14 @@ except where otherwise noted.
331330

332331
Features currently in "beta" are:
333332

334-
| Feature | Proposal | Alpha Release | Beta Release | Individual Flag | `enable-api-fields=beta` required for `v1beta1` |
335-
|:-------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------|:---------------------------------------------------------------------|:----------------|:---|
336-
| [Array Results and Array Indexing](pipelineruns.md#specifying-parameters) | [TEP-0076](https://github.com/tektoncd/community/blob/main/teps/0076-array-result-types.md) | [v0.38.0](https://github.com/tektoncd/pipeline/releases/tag/v0.38.0) | [v0.45.0](https://github.com/tektoncd/pipeline/releases/tag/v0.45.0) | | No |
337-
| [Object Parameters and Results](pipelineruns.md#specifying-parameters) | [TEP-0075](https://github.com/tektoncd/community/blob/main/teps/0075-object-param-and-result-types.md) | | [v0.46.0](https://github.com/tektoncd/pipeline/releases/tag/v0.46.0) | | No |
338-
| [Remote Tasks](./taskruns.md#remote-tasks) and [Remote Pipelines](./pipelineruns.md#remote-pipelines) | [TEP-0060](https://github.com/tektoncd/community/blob/main/teps/0060-remote-resolution.md) | | [v0.41.0](https://github.com/tektoncd/pipeline/releases/tag/v0.41.0) | | No |
339-
| [`Provenance` field in Status](pipeline-api.md#provenance)| [issue#5550](https://github.com/tektoncd/pipeline/issues/5550)| [v0.41.0](https://github.com/tektoncd/pipeline/releases/tag/v0.41.0)| [v0.48.0](https://github.com/tektoncd/pipeline/releases/tag/v0.48.0) | `enable-provenance-in-status`| No |
340-
| [Isolated `Step` & `Sidecar` `Workspaces`](./workspaces.md#isolated-workspaces) | [TEP-0029](https://github.com/tektoncd/community/blob/main/teps/0029-step-workspaces.md) | [v0.24.0](https://github.com/tektoncd/pipeline/releases/tag/v0.24.0) | [v0.50.0](https://github.com/tektoncd/pipeline/releases/tag/v0.50.0) | | Yes |
333+
| Feature | Proposal | Alpha Release | Beta Release | Individual Flag | `enable-api-fields=beta` required for `v1beta1` |
334+
|:-------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------|:---------------------------------------------------------------------|:---------------------------------------------------------------------|:------------------------------------------------|
335+
| [Array Results and Array Indexing](pipelineruns.md#specifying-parameters) | [TEP-0076](https://github.com/tektoncd/community/blob/main/teps/0076-array-result-types.md) | [v0.38.0](https://github.com/tektoncd/pipeline/releases/tag/v0.38.0) | [v0.45.0](https://github.com/tektoncd/pipeline/releases/tag/v0.45.0) | | No |
336+
| [Object Parameters and Results](pipelineruns.md#specifying-parameters) | [TEP-0075](https://github.com/tektoncd/community/blob/main/teps/0075-object-param-and-result-types.md) | | [v0.46.0](https://github.com/tektoncd/pipeline/releases/tag/v0.46.0) | | No |
337+
| [Remote Tasks](./taskruns.md#remote-tasks) and [Remote Pipelines](./pipelineruns.md#remote-pipelines) | [TEP-0060](https://github.com/tektoncd/community/blob/main/teps/0060-remote-resolution.md) | | [v0.41.0](https://github.com/tektoncd/pipeline/releases/tag/v0.41.0) | | No |
338+
| [`Provenance` field in Status](pipeline-api.md#provenance)| [issue#5550](https://github.com/tektoncd/pipeline/issues/5550)| [v0.41.0](https://github.com/tektoncd/pipeline/releases/tag/v0.41.0)| [v0.48.0](https://github.com/tektoncd/pipeline/releases/tag/v0.48.0) | `enable-provenance-in-status` | No |
339+
| [Isolated `Step` & `Sidecar` `Workspaces`](./workspaces.md#isolated-workspaces) | [TEP-0029](https://github.com/tektoncd/community/blob/main/teps/0029-step-workspaces.md) | [v0.24.0](https://github.com/tektoncd/pipeline/releases/tag/v0.24.0) | [v0.50.0](https://github.com/tektoncd/pipeline/releases/tag/v0.50.0) | | Yes |
340+
| [Matrix](./matrix.md) | [TEP-0090](https://github.com/tektoncd/community/blob/main/teps/0090-matrix.md) | [v0.38.0](https://github.com/tektoncd/pipeline/releases/tag/v0.38.0) | | [v0.53.0](https://github.com/tektoncd/pipeline/releases/tag/v0.53.0) | No |
341341

342342
## Enabling larger results using sidecar logs
343343

docs/matrix.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Documentation for specifying `Matrix` in a `Pipeline`:
3939
- [Specifying `Matrix` in `Finally Tasks`](pipelines.md#specifying-matrix-in-finally-tasks)
4040
- [Specifying `Matrix` in `Custom Tasks`](pipelines.md#specifying-matrix)
4141

42-
> :seedling: **`Matrix` is an [alpha](additional-configs.md#alpha-features) feature.**
43-
> The `enable-api-fields` feature flag must be set to `"alpha"` to specify `Matrix` in a `PipelineTask`.
42+
> :seedling: **`Matrix` is an [beta](additional-configs.md#beta-features) feature.**
43+
> The `enable-api-fields` feature flag can be set to `"beta"` to specify `Matrix` in a `PipelineTask`.
4444
4545
## Configuring a Matrix
4646

@@ -849,6 +849,6 @@ status:
849849
```
850850

851851
[cel]: https://github.com/tektoncd/experimental/tree/1609827ea81d05c8d00f8933c5c9d6150cd36989/cel
852-
[pr-with-matrix]: ../examples/v1/pipelineruns/alpha/pipelinerun-with-matrix.yaml
853-
[pr-with-matrix-and-results]: ../examples/v1/pipelineruns/alpha/pipelinerun-with-matrix-and-results.yaml
852+
[pr-with-matrix]: ../examples/v1/pipelineruns/beta/pipelinerun-with-matrix.yaml
853+
[pr-with-matrix-and-results]: ../examples/v1/pipelineruns/beta/pipelinerun-with-matrix-and-results.yaml
854854
[retries]: pipelines.md#using-the-retries-field

docs/pipelines.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,8 @@ spec:
390390

391391
### Specifying `Matrix` in `PipelineTasks`
392392

393-
> :seedling: **`Matrix` is an [alpha](additional-configs.md#alpha-features) feature.**
394-
> The `enable-api-fields` feature flag must be set to `"alpha"` to specify `Matrix` in a `PipelineTask`.
393+
> :seedling: **`Matrix` is an [beta](additional-configs.md#beta-features) feature.**
394+
> The `enable-api-fields` feature flag can be set to `"beta"` to specify `Matrix` in a `PipelineTask`.
395395
396396
You can also provide [`Parameters`](tasks.md#specifying-parameters) through the `matrix` field:
397397

@@ -1249,8 +1249,8 @@ spec:
12491249

12501250
### Specifying `matrix` in `finally` tasks
12511251

1252-
> :seedling: **`Matrix` is an [alpha](additional-configs.md#alpha-features) feature.**
1253-
> The `enable-api-fields` feature flag must be set to `"alpha"` to specify `Matrix` in a `PipelineTask`.
1252+
> :seedling: **`Matrix` is an [beta](additional-configs.md#beta-features) feature.**
1253+
> The `enable-api-fields` feature flag can be set to `"beta"` to specify `Matrix` in a `PipelineTask`.
12541254

12551255
Similar to `tasks`, you can also provide [`Parameters`](tasks.md#specifying-parameters) through `matrix`
12561256
in `finally` tasks:

examples/v1/pipelineruns/alpha/pipelinerun-with-matrix-and-results.yaml renamed to examples/v1/pipelineruns/beta/pipelinerun-with-matrix-and-results.yaml

File renamed without changes.

examples/v1/pipelineruns/alpha/pipelinerun-with-matrix-array-references.yaml renamed to examples/v1/pipelineruns/beta/pipelinerun-with-matrix-array-references.yaml

File renamed without changes.

examples/v1/pipelineruns/alpha/pipelinerun-with-matrix-include-explicit.yaml renamed to examples/v1/pipelineruns/beta/pipelinerun-with-matrix-include-explicit.yaml

File renamed without changes.

examples/v1/pipelineruns/alpha/pipelinerun-with-matrix-include.yaml renamed to examples/v1/pipelineruns/beta/pipelinerun-with-matrix-include.yaml

File renamed without changes.

examples/v1/pipelineruns/alpha/pipelinerun-with-matrix.yaml renamed to examples/v1/pipelineruns/beta/pipelinerun-with-matrix.yaml

File renamed without changes.

pkg/apis/pipeline/v1/pipeline_types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ func TestPipelineTask_ValidateMatrix(t *testing.T) {
976976
for _, tt := range tests {
977977
t.Run(tt.name, func(t *testing.T) {
978978
featureFlags, _ := config.NewFeatureFlagsFromMap(map[string]string{
979-
"enable-api-fields": "alpha",
979+
"enable-api-fields": "beta",
980980
})
981981
defaults := &config.Defaults{
982982
DefaultMaxMatrixCombinationsCount: 4,

pkg/apis/pipeline/v1/pipeline_validation.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ func (pt PipelineTask) Validate(ctx context.Context) (errs *apis.FieldError) {
230230

231231
func (pt *PipelineTask) validateMatrix(ctx context.Context) (errs *apis.FieldError) {
232232
if pt.IsMatrixed() {
233-
// This is an alpha feature and will fail validation if it's used in a pipeline spec
234-
// when the enable-api-fields feature gate is anything but "alpha".
235-
errs = errs.Also(version.ValidateEnabledAPIFields(ctx, "matrix", config.AlphaAPIFields))
233+
// This is a beta feature and will fail validation if it's used in a pipeline spec
234+
// when the enable-api-fields feature gate is set to "stable".
235+
errs = errs.Also(version.ValidateEnabledAPIFields(ctx, "matrix", config.BetaAPIFields))
236236
errs = errs.Also(pt.Matrix.validateCombinationsCount(ctx))
237237
errs = errs.Also(pt.Matrix.validateUniqueParams())
238238
}

0 commit comments

Comments
 (0)