Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: promote StepActions to GA #8546

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions config/300-crds/300-clustertask.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3854,17 +3854,12 @@ spec:
description: |-
Results declares StepResults produced by the Step.

This is field is at an ALPHA stability level and gated by "enable-step-actions" feature flag.

It can be used in an inlined Step when used to store Results to $(step.results.resultName.path).
It cannot be used when referencing StepActions using [v1beta1.Step.Ref].
The Results declared by the StepActions will be stored here instead.
type: array
items:
description: |-
StepResult used to describe the Results of a Step.

This is field is at an BETA stability level and gated by "enable-step-actions" feature flag.
description: StepResult used to describe the Results of a Step.
type: object
required:
- name
Expand Down
4 changes: 4 additions & 0 deletions config/300-crds/300-pipelinerun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2586,6 +2586,7 @@ spec:
enableProvenanceInStatus:
type: boolean
enableStepActions:
description: EnableStepActions is a no-op flag since StepActions are stable
type: boolean
enforceNonfalsifiability:
type: string
Expand Down Expand Up @@ -2998,6 +2999,7 @@ spec:
enableProvenanceInStatus:
type: boolean
enableStepActions:
description: EnableStepActions is a no-op flag since StepActions are stable
type: boolean
enforceNonfalsifiability:
type: string
Expand Down Expand Up @@ -3284,6 +3286,7 @@ spec:
enableProvenanceInStatus:
type: boolean
enableStepActions:
description: EnableStepActions is a no-op flag since StepActions are stable
type: boolean
enforceNonfalsifiability:
type: string
Expand Down Expand Up @@ -5891,6 +5894,7 @@ spec:
enableProvenanceInStatus:
type: boolean
enableStepActions:
description: EnableStepActions is a no-op flag since StepActions are stable
type: boolean
enforceNonfalsifiability:
type: string
Expand Down
10 changes: 2 additions & 8 deletions config/300-crds/300-stepaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,7 @@ spec:
description: Results are values that this StepAction can output
type: array
items:
description: |-
StepResult used to describe the Results of a Step.

This is field is at an BETA stability level and gated by "enable-step-actions" feature flag.
description: StepResult used to describe the Results of a Step.
type: object
required:
- name
Expand Down Expand Up @@ -803,10 +800,7 @@ spec:
description: Results are values that this StepAction can output
type: array
items:
description: |-
StepResult used to describe the Results of a Step.

This is field is at an BETA stability level and gated by "enable-step-actions" feature flag.
description: StepResult used to describe the Results of a Step.
type: object
required:
- name
Expand Down
14 changes: 2 additions & 12 deletions config/300-crds/300-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3855,17 +3855,12 @@ spec:
description: |-
Results declares StepResults produced by the Step.

This is field is at an ALPHA stability level and gated by "enable-step-actions" feature flag.

It can be used in an inlined Step when used to store Results to $(step.results.resultName.path).
It cannot be used when referencing StepActions using [v1beta1.Step.Ref].
The Results declared by the StepActions will be stored here instead.
type: array
items:
description: |-
StepResult used to describe the Results of a Step.

This is field is at an BETA stability level and gated by "enable-step-actions" feature flag.
description: StepResult used to describe the Results of a Step.
type: object
required:
- name
Expand Down Expand Up @@ -6865,17 +6860,12 @@ spec:
description: |-
Results declares StepResults produced by the Step.

This is field is at an ALPHA stability level and gated by "enable-step-actions" feature flag.

It can be used in an inlined Step when used to store Results to $(step.results.resultName.path).
It cannot be used when referencing StepActions using [v1.Step.Ref].
The Results declared by the StepActions will be stored here instead.
type: array
items:
description: |-
StepResult used to describe the Results of a Step.

This is field is at an BETA stability level and gated by "enable-step-actions" feature flag.
description: StepResult used to describe the Results of a Step.
type: object
required:
- name
Expand Down
11 changes: 5 additions & 6 deletions config/300-crds/300-taskrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1969,6 +1969,7 @@ spec:
enableProvenanceInStatus:
type: boolean
enableStepActions:
description: EnableStepActions is a no-op flag since StepActions are stable
type: boolean
enforceNonfalsifiability:
type: string
Expand Down Expand Up @@ -2255,6 +2256,7 @@ spec:
enableProvenanceInStatus:
type: boolean
enableStepActions:
description: EnableStepActions is a no-op flag since StepActions are stable
type: boolean
enforceNonfalsifiability:
type: string
Expand Down Expand Up @@ -4152,6 +4154,7 @@ spec:
enableProvenanceInStatus:
type: boolean
enableStepActions:
description: EnableStepActions is a no-op flag since StepActions are stable
type: boolean
enforceNonfalsifiability:
type: string
Expand Down Expand Up @@ -4404,6 +4407,7 @@ spec:
enableProvenanceInStatus:
type: boolean
enableStepActions:
description: EnableStepActions is a no-op flag since StepActions are stable
type: boolean
enforceNonfalsifiability:
type: string
Expand Down Expand Up @@ -6876,17 +6880,12 @@ spec:
description: |-
Results declares StepResults produced by the Step.

This is field is at an ALPHA stability level and gated by "enable-step-actions" feature flag.

It can be used in an inlined Step when used to store Results to $(step.results.resultName.path).
It cannot be used when referencing StepActions using [v1.Step.Ref].
The Results declared by the StepActions will be stored here instead.
type: array
items:
description: |-
StepResult used to describe the Results of a Step.

This is field is at an BETA stability level and gated by "enable-step-actions" feature flag.
description: StepResult used to describe the Results of a Step.
type: object
required:
- name
Expand Down
5 changes: 2 additions & 3 deletions config/config-feature-flags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ 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 Artifacts in Steps
# This feature is in preview mode and not implemented yet. Please check #7693 for updates.
enable-artifacts: "false"
Expand All @@ -131,3 +128,5 @@ data:
enable-concise-resolver-syntax: "false"
# Setthing this flag to "true" will enable native Kubernetes Sidecar support
enable-kubernetes-sidecar: "false"
# Setting this flag to "false" will have no effect since StepActions are a stable feature
enable-step-actions: "true"
3 changes: 1 addition & 2 deletions docs/additional-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,15 +391,14 @@ Features currently in "beta" are:
| [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) | |
| [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) | |
| [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) | [v0.53.0](https://github.com/tektoncd/pipeline/releases/tag/v0.53.0) | |
| [Reusable Steps via StepActions](./stepactions.md) | [TEP-0142](https://github.com/tektoncd/community/blob/main/teps/0142-enable-step-reusability.md) | [v0.54.0](https://github.com/tektoncd/pipeline/releases/tag/v0.54.0) | `enable-step-actions` |
| [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) | [v0.61.0](https://github.com/tektoncd/pipeline/releases/tag/v0.61.0) | `results-from` |
| [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) | | [v0.61.0](https://github.com/tektoncd/pipeline/releases/tag/v0.61.0) | |
| [Ignore Task Failure](./pipelines.md#using-the-onerror-field) | [TEP-0050](https://github.com/tektoncd/community/blob/main/teps/0050-ignore-task-failures.md) | [v0.55.0](https://github.com/tektoncd/pipeline/releases/tag/v0.55.0) | [v0.62.0](https://github.com/tektoncd/pipeline/releases/tag/v0.62.0) | N/A |

## Enabling larger results using sidecar logs

**Note**: The maximum size of a Task's results is limited by the container termination message feature of Kubernetes,
as results are passed back to the controller via this mechanism. At present, the limit is per task is 4096 bytes. All
as results are passed back to the controller via this mechanism. At present, the limit is per task is "4096 bytes". All
results produced by the task share this upper limit.

To exceed this limit of 4096 bytes, you can enable larger results using sidecar logs. By enabling this feature, you will
Expand Down
3 changes: 0 additions & 3 deletions docs/pipeline-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4680,7 +4680,6 @@ Params
<td>
<em>(Optional)</em>
<p>Results declares StepResults produced by the Step.</p>
<p>This is field is at an ALPHA stability level and gated by &ldquo;enable-step-actions&rdquo; feature flag.</p>
<p>It can be used in an inlined Step when used to store Results to $(step.results.resultName.path).
It cannot be used when referencing StepActions using [v1.Step.Ref].
The Results declared by the StepActions will be stored here instead.</p>
Expand Down Expand Up @@ -4739,7 +4738,6 @@ string
</p>
<div>
<p>StepResult used to describe the Results of a Step.</p>
<p>This is field is at an BETA stability level and gated by &ldquo;enable-step-actions&rdquo; feature flag.</p>
</div>
<table>
<thead>
Expand Down Expand Up @@ -14193,7 +14191,6 @@ Params
<td>
<em>(Optional)</em>
<p>Results declares StepResults produced by the Step.</p>
<p>This is field is at an ALPHA stability level and gated by &ldquo;enable-step-actions&rdquo; feature flag.</p>
<p>It can be used in an inlined Step when used to store Results to $(step.results.resultName.path).
It cannot be used when referencing StepActions using [v1beta1.Step.Ref].
The Results declared by the StepActions will be stored here instead.</p>
Expand Down
4 changes: 1 addition & 3 deletions docs/stepactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ weight: 201
- [Specifying Remote StepActions](#specifying-remote-stepactions)

## 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`.
> **`StepActions` is a stable feature.**

A `StepAction` is the reusable and scriptable unit of work that is performed by a `Step`.

Expand Down Expand Up @@ -417,7 +416,6 @@ status:
podName: step-action-run-pod
provenance:
featureFlags:
EnableStepActions: true
...
startTime: "2023-10-24T20:28:32Z"
steps:
Expand Down
27 changes: 9 additions & 18 deletions pkg/apis/config/feature_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ const (
KeepPodOnCancel = "keep-pod-on-cancel"
// EnableCELInWhenExpression is the flag to enabled CEL in WhenExpression
EnableCELInWhenExpression = "enable-cel-in-whenexpression"
// EnableStepActions is the flag to enable the use of StepActions in Steps
EnableStepActions = "enable-step-actions"
// EnableArtifacts is the flag to enable the use of Artifacts in Steps
EnableArtifacts = "enable-artifacts"
// EnableParamEnum is the flag to enabled enum in params
Expand All @@ -109,6 +107,8 @@ const (
EnableKubernetesSidecar = "enable-kubernetes-sidecar"
// DefaultEnableKubernetesSidecar is the default value for EnableKubernetesSidecar
DefaultEnableKubernetesSidecar = false
// EnableStepActions is the flag to enable step actions (no-op since it's stable)
EnableStepActions = "enable-step-actions"

// DisableInlineSpec is the flag to disable embedded spec
// in Taskrun or Pipelinerun
Expand Down Expand Up @@ -150,13 +150,6 @@ var (
Enabled: DefaultAlphaFeatureEnabled,
}

// DefaultEnableStepActions is the default PerFeatureFlag value for EnableStepActions
DefaultEnableStepActions = PerFeatureFlag{
Name: EnableStepActions,
Stability: BetaAPIFields,
Enabled: DefaultBetaFeatureEnabled,
}

// DefaultEnableArtifacts is the default PerFeatureFlag value for EnableArtifacts
DefaultEnableArtifacts = PerFeatureFlag{
Name: EnableArtifacts,
Expand Down Expand Up @@ -204,12 +197,13 @@ type FeatureFlags struct {
SetSecurityContextReadOnlyRootFilesystem bool `json:"setSecurityContextReadOnlyRootFilesystem,omitempty"`
Coschedule string `json:"coschedule,omitempty"`
EnableCELInWhenExpression bool `json:"enableCELInWhenExpression,omitempty"`
EnableStepActions bool `json:"enableStepActions,omitempty"`
EnableParamEnum bool `json:"enableParamEnum,omitempty"`
EnableArtifacts bool `json:"enableArtifacts,omitempty"`
DisableInlineSpec string `json:"disableInlineSpec,omitempty"`
EnableConciseResolverSyntax bool `json:"enableConciseResolverSyntax,omitempty"`
EnableKubernetesSidecar bool `json:"enableKubernetesSidecar,omitempty"`
// EnableStepActions is a no-op flag since StepActions are stable
EnableStepActions bool `json:"enableStepActions,omitempty"`
EnableParamEnum bool `json:"enableParamEnum,omitempty"`
EnableArtifacts bool `json:"enableArtifacts,omitempty"`
DisableInlineSpec string `json:"disableInlineSpec,omitempty"`
EnableConciseResolverSyntax bool `json:"enableConciseResolverSyntax,omitempty"`
EnableKubernetesSidecar bool `json:"enableKubernetesSidecar,omitempty"`
}

// GetFeatureFlagsConfigName returns the name of the configmap containing all
Expand Down Expand Up @@ -298,9 +292,6 @@ func NewFeatureFlagsFromMap(cfgMap map[string]string) (*FeatureFlags, error) {
if err := setPerFeatureFlag(EnableCELInWhenExpression, DefaultEnableCELInWhenExpression, &tc.EnableCELInWhenExpression); err != nil {
return nil, err
}
if err := setPerFeatureFlag(EnableStepActions, DefaultEnableStepActions, &tc.EnableStepActions); err != nil {
return nil, err
}
if err := setPerFeatureFlag(EnableParamEnum, DefaultEnableParamEnum, &tc.EnableParamEnum); err != nil {
return nil, err
}
Expand Down
Loading
Loading