Skip to content

Commit

Permalink
feat: enable step actions by default
Browse files Browse the repository at this point in the history
  • Loading branch information
waveywaves committed Feb 27, 2025
1 parent aec465e commit 6c8346e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 9 deletions.
5 changes: 2 additions & 3 deletions config/config-feature-flags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ data:
keep-pod-on-cancel: "false"
# Setting this flag to "true" will enable the CEL evaluation in WhenExpression
enable-cel-in-whenexpression: "false"
# Setting this flag to "true" will enable the use of StepActions in Steps
# This feature is in preview mode and not implemented yet. Please check #7259 for updates.
enable-step-actions: "false"
# Setting this flag to "true" will enable the use of StepActions in Steps.
enable-step-actions: "true"
# Setting this flag to "true" will enable the use of Artifacts in Steps
# This feature is in preview mode and not implemented yet. Please check #7693 for updates.
enable-artifacts: "false"
Expand Down
2 changes: 1 addition & 1 deletion docs/stepactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ weight: 201

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

Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/config/feature_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ var (
// DefaultEnableStepActions is the default PerFeatureFlag value for EnableStepActions
DefaultEnableStepActions = PerFeatureFlag{
Name: EnableStepActions,
Stability: BetaAPIFields,
Enabled: DefaultBetaFeatureEnabled,
Stability: StableAPIFields,
Enabled: DefaultStableFeatureEnabled,
}

// DefaultEnableArtifacts is the default PerFeatureFlag value for EnableArtifacts
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/config/feature_flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func TestNewFeatureFlagsFromConfigMap(t *testing.T) {
SetSecurityContext: config.DefaultSetSecurityContext,
Coschedule: config.DefaultCoschedule,
EnableParamEnum: config.DefaultEnableParamEnum.Enabled,
EnableStepActions: config.DefaultEnableStepActions.Enabled,
DisableInlineSpec: config.DefaultDisableInlineSpec,
},
fileName: "feature-flags-bundles-and-custom-tasks",
Expand All @@ -153,6 +154,7 @@ func TestNewFeatureFlagsFromConfigMap(t *testing.T) {
SetSecurityContext: config.DefaultSetSecurityContext,
Coschedule: config.DefaultCoschedule,
EnableParamEnum: config.DefaultEnableParamEnum.Enabled,
EnableStepActions: config.DefaultEnableStepActions.Enabled,
DisableInlineSpec: config.DefaultDisableInlineSpec,
},
fileName: "feature-flags-beta-api-fields",
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/config/testdata/feature-flags-beta-api-fields.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ metadata:
name: feature-flags
namespace: tekton-pipelines
data:
enable-api-fields: "beta"
enable-api-fields: "beta"
enable-step-actions: "true"
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ data:
enable-tekton-oci-bundles: "true"
enable-custom-tasks: "true"
enable-api-fields: "stable"
enable-step-actions: "true"
3 changes: 3 additions & 0 deletions pkg/reconciler/taskrun/taskrun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,7 @@ status:
MaxResultSize: 4096
Coschedule: "workspaces"
DisableInlineSpec: ""
EnableStepActions: true
provenance:
featureFlags:
RunningInEnvWithInjectedSidecars: true
Expand All @@ -1746,6 +1747,7 @@ status:
MaxResultSize: 4096
Coschedule: "workspaces"
DisableInlineSpec: ""
EnableStepActions: true
`, pipelineErrors.UserErrorLabel, pipelineErrors.UserErrorLabel))
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\"")
toBeRetriedTaskRun = parse.MustParseV1TaskRun(t, `
Expand Down Expand Up @@ -1800,6 +1802,7 @@ status:
MaxResultSize: 4096
Coschedule: "workspaces"
DisableInlineSpec: ""
EnableStepActions: true
`)
toBeRetriedWithResultsTaskRun = parse.MustParseV1TaskRun(t, `
metadata:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e-tests-kind-prow-feature-flags.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN_YAML_TESTS=false
KO_DOCKER_REPO=registry.local:5000
RUN_FEATUREFLAG_TESTS=true
E2E_GO_TEST_TIMEOUT=60m
ENABLE_STEP_ACTIONS=false
ENABLE_STEP_ACTIONS=true
ENABLE_CEL_IN_WHENEXPRESSION=false
ENABLE_PARAM_ENUM=false
KEEP_POD_ON_CANCEL=false
2 changes: 1 addition & 1 deletion test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SKIP_GO_E2E_TESTS=${SKIP_GO_E2E_TESTS:="false"}
E2E_GO_TEST_TIMEOUT=${E2E_GO_TEST_TIMEOUT:="20m"}
RUN_FEATUREFLAG_TESTS=${RUN_FEATUREFLAG_TESTS:="false"}
RESULTS_FROM=${RESULTS_FROM:-termination-message}
ENABLE_STEP_ACTIONS=${ENABLE_STEP_ACTIONS:="false"}
ENABLE_STEP_ACTIONS=${ENABLE_STEP_ACTIONS:="true"}
ENABLE_CEL_IN_WHENEXPRESSION=${ENABLE_CEL_IN_WHENEXPRESSION:="false"}
ENABLE_PARAM_ENUM=${ENABLE_PARAM_ENUM:="false"}
ENABLE_ARTIFACTS=${ENABLE_ARTIFACTS:="false"}
Expand Down

0 comments on commit 6c8346e

Please sign in to comment.