Skip to content

Commit a22d418

Browse files
committed
feat: enable step actions by default
1 parent 990917d commit a22d418

10 files changed

+18
-11
lines changed

config/config-feature-flags.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,8 @@ data:
124124
keep-pod-on-cancel: "false"
125125
# Setting this flag to "true" will enable the CEL evaluation in WhenExpression
126126
enable-cel-in-whenexpression: "false"
127-
# Setting this flag to "true" will enable the use of StepActions in Steps
128-
# This feature is in preview mode and not implemented yet. Please check #7259 for updates.
129-
enable-step-actions: "false"
127+
# Setting this flag to "true" will enable the use of StepActions in Steps.
128+
enable-step-actions: "true"
130129
# Setting this flag to "true" will enable the use of Artifacts in Steps
131130
# This feature is in preview mode and not implemented yet. Please check #7693 for updates.
132131
enable-artifacts: "false"

docs/stepactions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ weight: 201
2222

2323
## Overview
2424
> :seedling: **`StepActions` is an [beta](additional-configs.md#beta-features) feature.**
25-
> The `enable-step-actions` feature flag must be set to `"true"` to specify a `StepAction` in a `Step`.
25+
> Step actions are enabled by default. You can disable them by setting the `enable-step-actions` feature flag to `"false"`.
2626
2727
A `StepAction` is the reusable and scriptable unit of work that is performed by a `Step`.
2828

pkg/apis/config/feature_flags.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ var (
156156
// DefaultEnableStepActions is the default PerFeatureFlag value for EnableStepActions
157157
DefaultEnableStepActions = PerFeatureFlag{
158158
Name: EnableStepActions,
159-
Stability: BetaAPIFields,
160-
Enabled: DefaultBetaFeatureEnabled,
159+
Stability: StableAPIFields,
160+
Enabled: DefaultStableFeatureEnabled,
161161
}
162162

163163
// DefaultEnableArtifacts is the default PerFeatureFlag value for EnableArtifacts

pkg/apis/config/feature_flags_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ func TestNewFeatureFlagsFromConfigMap(t *testing.T) {
132132
SetSecurityContext: config.DefaultSetSecurityContext,
133133
Coschedule: config.DefaultCoschedule,
134134
EnableParamEnum: config.DefaultEnableParamEnum.Enabled,
135+
EnableStepActions: config.DefaultEnableStepActions.Enabled,
135136
DisableInlineSpec: config.DefaultDisableInlineSpec,
136137
},
137138
fileName: "feature-flags-bundles-and-custom-tasks",
@@ -153,6 +154,7 @@ func TestNewFeatureFlagsFromConfigMap(t *testing.T) {
153154
SetSecurityContext: config.DefaultSetSecurityContext,
154155
Coschedule: config.DefaultCoschedule,
155156
EnableParamEnum: config.DefaultEnableParamEnum.Enabled,
157+
EnableStepActions: config.DefaultEnableStepActions.Enabled,
156158
DisableInlineSpec: config.DefaultDisableInlineSpec,
157159
},
158160
fileName: "feature-flags-beta-api-fields",

pkg/apis/config/testdata/feature-flags-beta-api-fields.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ metadata:
44
name: feature-flags
55
namespace: tekton-pipelines
66
data:
7-
enable-api-fields: "beta"
7+
enable-api-fields: "beta"
8+
enable-step-actions: "true"

pkg/apis/config/testdata/feature-flags-bundles-and-custom-tasks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ data:
77
enable-tekton-oci-bundles: "true"
88
enable-custom-tasks: "true"
99
enable-api-fields: "stable"
10+
enable-step-actions: "true"

pkg/reconciler/taskrun/taskrun_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,6 @@ metadata:
14211421
namespace: foo
14221422
spec:
14231423
taskRef:
1424-
kind: ClusterTask
14251424
name: taskrun-with-wrong-ref
14261425
`)
14271426
taskRuns := []*v1.TaskRun{noTaskRun, withWrongRef}
@@ -1746,6 +1745,7 @@ status:
17461745
maxResultSize: 4096
17471746
coschedule: "workspaces"
17481747
disableInlineSpec: ""
1748+
enableStepActions: true
17491749
`, pipelineErrors.UserErrorLabel, pipelineErrors.UserErrorLabel))
17501750
reconciliatonError = errors.New("1 error occurred:\n\t* Provided results don't match declared results; may be invalid JSON or missing result declaration: \"aResult\": task result is expected to be \"array\" type but was initialized to a different type \"string\"")
17511751
toBeRetriedTaskRun = parse.MustParseV1TaskRun(t, `
@@ -1800,6 +1800,7 @@ status:
18001800
maxResultSize: 4096
18011801
coschedule: "workspaces"
18021802
disableInlineSpec: ""
1803+
enableStepActions: true
18031804
`)
18041805
toBeRetriedWithResultsTaskRun = parse.MustParseV1TaskRun(t, `
18051806
metadata:

test/e2e-tests-kind-prow-feature-flags.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RUN_YAML_TESTS=false
55
KO_DOCKER_REPO=registry.local:5000
66
RUN_FEATUREFLAG_TESTS=true
77
E2E_GO_TEST_TIMEOUT=60m
8-
ENABLE_STEP_ACTIONS=false
8+
ENABLE_STEP_ACTIONS=true
99
ENABLE_CEL_IN_WHENEXPRESSION=false
1010
ENABLE_PARAM_ENUM=false
1111
KEEP_POD_ON_CANCEL=false

test/e2e-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ SKIP_GO_E2E_TESTS=${SKIP_GO_E2E_TESTS:="false"}
2828
E2E_GO_TEST_TIMEOUT=${E2E_GO_TEST_TIMEOUT:="20m"}
2929
RUN_FEATUREFLAG_TESTS=${RUN_FEATUREFLAG_TESTS:="false"}
3030
RESULTS_FROM=${RESULTS_FROM:-termination-message}
31-
ENABLE_STEP_ACTIONS=${ENABLE_STEP_ACTIONS:="false"}
31+
ENABLE_STEP_ACTIONS=${ENABLE_STEP_ACTIONS:="true"}
3232
ENABLE_CEL_IN_WHENEXPRESSION=${ENABLE_CEL_IN_WHENEXPRESSION:="false"}
3333
ENABLE_PARAM_ENUM=${ENABLE_PARAM_ENUM:="false"}
3434
ENABLE_ARTIFACTS=${ENABLE_ARTIFACTS:="false"}

test/taskrun_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,10 @@ func TestTaskRunResolveDefaultParameterSubstitutionOnStepAction(t *testing.T) {
610610
ctx, cancel := context.WithCancel(ctx)
611611
defer cancel()
612612

613-
c, namespace := setup(ctx, t, requireAllGates(requireEnableStepActionsGate))
613+
c, namespace := setup(ctx, t, requireAllGates(map[string]string{
614+
"enable-step-actions": "true",
615+
"enable-api-fields": "beta",
616+
}))
614617

615618
knativetest.CleanupOnInterrupt(func() { tearDown(ctx, t, c, namespace) }, t.Logf)
616619
defer tearDown(ctx, t, c, namespace)

0 commit comments

Comments
 (0)