diff --git a/docs/install.md b/docs/install.md index 5075891c865..61cebbe05f6 100644 --- a/docs/install.md +++ b/docs/install.md @@ -399,7 +399,6 @@ Features currently in "alpha" are: | [Hermetic Execution Mode](./hermetic.md) | [TEP-0025](https://github.com/tektoncd/community/blob/main/teps/0025-hermekton.md) | [v0.25.0](https://github.com/tektoncd/pipeline/releases/tag/v0.25.0) | | | [Graceful Termination](./pipelineruns.md#gracefully-cancelling-a-pipelinerun) | [TEP-0058](https://github.com/tektoncd/community/blob/main/teps/0058-graceful-pipeline-run-termination.md) | [v0.25.0](https://github.com/tektoncd/pipeline/releases/tag/v0.25.0) | | | [`PipelineRun` Timeouts](./pipelineruns.md#configuring-a-failure-timeout) | [TEP-0046](https://github.com/tektoncd/community/blob/main/teps/0046-finallytask-execution-post-timeout.md) | [v0.25.0](https://github.com/tektoncd/pipeline/releases/tag/v0.25.0) | | -| [Specifying `onError` for a `Step`](./tasks.md#specifying-onerror-for-a-step) | [TEP-0040](https://github.com/tektoncd/community/blob/main/teps/0040-ignore-step-errors.md) | [v0.27.0](https://github.com/tektoncd/pipeline/releases/tag/v0.27.0) | | | [Implicit `Parameters`](./taskruns.md#implicit-parameters) | [TEP-0023](https://github.com/tektoncd/community/blob/main/teps/0023-implicit-mapping.md) | [v0.28.0](https://github.com/tektoncd/pipeline/releases/tag/v0.28.0) | | | [Windows Scrips](./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) | | diff --git a/docs/tasks.md b/docs/tasks.md index ab4c36ce92c..0c2b6fe2d85 100644 --- a/docs/tasks.md +++ b/docs/tasks.md @@ -335,9 +335,6 @@ steps: #### Specifying `onError` for a `step` -This is an alpha feature. The `enable-api-fields` feature flag [must be set to `"alpha"`](./install.md) -to specify `onError` for a `step`. - When a `step` in a `task` results in a failure, the rest of the steps in the `task` are skipped and the `taskRun` is declared a failure. If you would like to ignore such step errors and continue executing the rest of the steps in the task, you can specify `onError` for such a `step`. @@ -386,8 +383,8 @@ kubectl get tr taskrun-unit-test-t6qcl -o json | jq .status ], ``` -For an end-to-end example, see [the taskRun ignoring a step error](../examples/v1beta1/taskruns/alpha/ignore-step-error.yaml) -and [the pipelineRun ignoring a step error](../examples/v1beta1/pipelineruns/alpha/ignore-step-error.yaml). +For an end-to-end example, see [the taskRun ignoring a step error](../examples/v1beta1/taskruns/ignore-step-error.yaml) +and [the pipelineRun ignoring a step error](../examples/v1beta1/pipelineruns/ignore-step-error.yaml). #### Accessing Step's `exitCode` in subsequent `Steps` diff --git a/examples/v1beta1/pipelineruns/alpha/ignore-step-error.yaml b/examples/v1beta1/pipelineruns/ignore-step-error.yaml similarity index 100% rename from examples/v1beta1/pipelineruns/alpha/ignore-step-error.yaml rename to examples/v1beta1/pipelineruns/ignore-step-error.yaml diff --git a/examples/v1beta1/taskruns/alpha/ignore-step-error.yaml b/examples/v1beta1/taskruns/ignore-step-error.yaml similarity index 100% rename from examples/v1beta1/taskruns/alpha/ignore-step-error.yaml rename to examples/v1beta1/taskruns/ignore-step-error.yaml diff --git a/pkg/apis/pipeline/v1beta1/task_validation.go b/pkg/apis/pipeline/v1beta1/task_validation.go index 0f9223f6355..c7fc3684e1e 100644 --- a/pkg/apis/pipeline/v1beta1/task_validation.go +++ b/pkg/apis/pipeline/v1beta1/task_validation.go @@ -222,7 +222,6 @@ func validateStep(ctx context.Context, s Step, names sets.String) (errs *apis.Fi } if s.OnError != "" { - errs = errs.Also(ValidateEnabledAPIFields(ctx, "step onError", config.AlphaAPIFields).ViaField("steps")) if s.OnError != "continue" && s.OnError != "stopAndFail" { errs = errs.Also(&apis.FieldError{ Message: fmt.Sprintf("invalid value: %v", s.OnError), diff --git a/pkg/apis/pipeline/v1beta1/task_validation_test.go b/pkg/apis/pipeline/v1beta1/task_validation_test.go index fc56a9286a8..c860b927ded 100644 --- a/pkg/apis/pipeline/v1beta1/task_validation_test.go +++ b/pkg/apis/pipeline/v1beta1/task_validation_test.go @@ -1178,13 +1178,7 @@ func TestStepOnError(t *testing.T) { ts := &v1beta1.TaskSpec{ Steps: tt.steps, } - featureFlags, _ := config.NewFeatureFlagsFromMap(map[string]string{ - "enable-api-fields": "alpha", - }) - cfg := &config.Config{ - FeatureFlags: featureFlags, - } - ctx := config.ToContext(context.Background(), cfg) + ctx := context.Background() ts.SetDefaults(ctx) err := ts.Validate(ctx) if tt.expectedError == nil && err != nil { @@ -1241,18 +1235,6 @@ func TestIncompatibleAPIVersions(t *testing.T) { }}, }}, }, - }, { - name: "step onError requires alpha", - requiredVersion: "alpha", - spec: v1beta1.TaskSpec{ - Steps: []v1beta1.Step{{ - OnError: "continue", - Container: corev1.Container{ - Image: "image", - Args: []string{"arg"}, - }, - }}, - }, }, { name: "windows script support requires alpha", requiredVersion: "alpha", diff --git a/test/ignore_step_error_test.go b/test/ignore_step_error_test.go index 3bbedfb3c5f..6e92f970d3d 100644 --- a/test/ignore_step_error_test.go +++ b/test/ignore_step_error_test.go @@ -31,7 +31,7 @@ func TestMissingResultWhenStepErrorIsIgnored(t *testing.T) { ctx := context.Background() ctx, cancel := context.WithCancel(ctx) defer cancel() - c, namespace := setup(ctx, t, requireAlphaFeatureFlags) + c, namespace := setup(ctx, t) knativetest.CleanupOnInterrupt(func() { tearDown(ctx, t, c, namespace) }, t.Logf) defer tearDown(ctx, t, c, namespace)