Skip to content

Commit 1583b50

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

10 files changed

+21
-12
lines changed

config/config-feature-flags.yaml

+2-3
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

+1-1
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

+2-2
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

+2
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

+2-1
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

+1
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

+5-2
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}
@@ -1734,6 +1733,7 @@ status:
17341733
maxResultSize: 4096
17351734
coschedule: "workspaces"
17361735
disableInlineSpec: ""
1736+
enableStepActions: true
17371737
provenance:
17381738
featureFlags:
17391739
runningInEnvWithInjectedSidecars: true
@@ -1746,6 +1746,7 @@ status:
17461746
maxResultSize: 4096
17471747
coschedule: "workspaces"
17481748
disableInlineSpec: ""
1749+
enableStepActions: true
17491750
`, pipelineErrors.UserErrorLabel, pipelineErrors.UserErrorLabel))
17501751
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\"")
17511752
toBeRetriedTaskRun = parse.MustParseV1TaskRun(t, `
@@ -1800,6 +1801,7 @@ status:
18001801
maxResultSize: 4096
18011802
coschedule: "workspaces"
18021803
disableInlineSpec: ""
1804+
enableStepActions: true
18031805
`)
18041806
toBeRetriedWithResultsTaskRun = parse.MustParseV1TaskRun(t, `
18051807
metadata:
@@ -1903,7 +1905,8 @@ status:
19031905
ConfigMaps: []*corev1.ConfigMap{{
19041906
ObjectMeta: metav1.ObjectMeta{Namespace: system.Namespace(), Name: config.GetFeatureFlagsConfigName()},
19051907
Data: map[string]string{
1906-
"enable-api-fields": config.AlphaAPIFields,
1908+
"enable-step-actions": "true",
1909+
"enable-api-fields": config.AlphaAPIFields,
19071910
},
19081911
}},
19091912
},

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

+1-1
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

+1-1
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

+4-1
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)