Tekton Pipeline release v0.27.0 "Tonkinese Talos"
π Step onError
Handling, Skipping Strategies and Custom Task Timeouts! π
-Docs @ v0.27.0
-Examples @ v0.27.0
Installation one-liner
kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.27.0/release.yaml
Upgrade Notices
Changes
Features
-
β¨ TEP-0040 Specifying
onError
behaviour for Steps (#4106)
This is a brand new Alpha feature: Use onError: continue
for a Step if you would like to ignore any errors and continue executing the rest of the Steps in a Task. When onError
is set to continue
, the Step's exit code is recorded and made available to subsequent Steps via two new variables in Tasks. A Step with onError
set to continue
does not fail a TaskRun and continues executing the rest of the steps in a task.
The default value for the onError
field is fail
, which matches existing Step behavior: an error results in the Task stopping and entering a failed state. π¨ NOTE The name of the default value may change in a subsequent release from fail
to stopAndFail
to make this behaviour more explicit. Follow tektoncd/community#497 to keep informed about this potential change. A Backwards Incompatibility note will be included with the release if this change moves ahead. π¨
-
β¨ TEP-0059 Skipping Strategies (#4085)
When Expressions
are changing scope: in a future release (and today, if you enable the flag) a when
stanza will guard only the Task it is attached to instead of the Task and all of its dependents. To guard both a Task and its dependents the when
stanza will need to be attached to each dependent Task as well. This change will roll out for all users of v1beta1
resources in 9 months, per our beta deprecation policy, and will be the default behaviour for When Expressions
in any new apiVersions
of Tekton's resources going forward.
New Feature Flag: scope-when-expressions-to-task
Default Value: "false"
To guard a Task
only and unblock execution of its dependent Tasks
, set the scope-when-expressions-to-task
feature flag to "true".
Action Required: when
expressions guarding a Task
and its dependent Tasks
is deprecated and will be removed - migrate by setting scope-when-expressions-to-task
feature flag to "true"
and updating your Pipelines to cascade when
expressions to subsequent Tasks
as needed.
For the rationale and use-cases that inspired this change please see TEP-0059.
-
β¨ Implement timeout for custom tasks. (#3976)
Custom Tasks can now include a timeout
as part of their spec. Custom Task controllers can add support for responding to this field with new behaviour such as cleanup processes. Here's an example usage in a Run
leveraging the TaskLoop
Custom Task controller:
apiVersion: tekton.dev/v1alpha1
kind: Run
metadata:
generateName: simpletasklooprun
spec:
timeout: 10s # set timeout here.
params:
- name: word
value:
- jump
- land
- roll
- name: suffix
value: ing
ref:
apiVersion: custom.tekton.dev/v1alpha1
kind: TaskLoop
name: simpletaskloop
-
β¨ A new label for TaskRuns to identify their place in Pipelines (#4121)
TaskRuns and Runs in a Pipeline will now receive an additional label, tekton.dev/memberOf
. The value of this label will be: tekton.dev/memberOf=tasks
for entries in the "tasks" section of a Pipeline and tekton.dev/memberOf=finally
for entries in the "finally" section of a Pipeline.
-
β¨ Add variable expansion in the
workspaces.mountPath
field of Tasks (#3934)
Users are now able to utilize variable substitution in the mountPath
field of a Workspace within a Task. This is useful, for example, to parameterize the directory under which source code from a Workspace should appear in a Task's filesystem.
Deprecation Notices
-
π¨ Early Warning: When Expressions will change their scope in a future release
Please see the "Skipping Strategies" feature description above for fuller information. In short: When Expressions currently guard both a Task and all of that Task's dependents. In future this behaviour will be changed so that When Expressions only guard the Task they are attached to. As part of this release a new feature flag has been added called scope-when-expressions-to-task
. The default value is "false"
, indicating no immediate change to behaviour. In 9 months, per our beta deprecation policy, this value will be changed to "true"
by default and eventually the flag will be removed completely. It is strongly advised that you assess your current suite of Pipelines for any impact this change might have on you and your teams. (#4085).
Fixes
- π Graceful Termination: Cancelled Task is Failed (even with Retries) (#4136)
PipelineTasks with retries that were "gracefully cancelled" could result in a PipelineRun being left in a hung state. This has been fixed.
- π Invalidate passing Results between Finally Tasks (#4132)
Pipelines that attempted to pass results from one Finally Task to another were not being caught during validation. This is not supported because Finally Tasks are not allowed to have dependencies among themselves. This has been fixed.
In addition this bug fix also dramatically improves the validation of Finally Tasks by ensuring that all validation errors are returned to the user at once rather than only the first error that was encountered.
- π Mark webhook and controller as safe-to-evict (#4124)
By default, controller components are now marked as safe-to-evict by the cluster autoscaler. See docs/enabling-ha.md for more details.
- π Passes pipelines/tasks from bundles through defaulting before execution (#4117)
Pipelines and Tasks fetched from Tekton Bundles were not being passed through a defaulting step before being validated, which could result in spurious validation errors. This has been fixed.
-
π Loosen permission checks on TestCp to handle umasks. (#4100)
-
π support referencing array params in when expression values (#4075)
When expression values can now use array parameter references, for example: values: [$(params.arrayParam[*])]
Misc
- π¨ Update to latest knative.dev/pkg (#4129)
- π¨ Fix Example with Completed and Succeeded Execution Status (#4140)
- π¨ Add e2e tests for Windows (#4139)
- π¨ Get default sa from configmap defaultconfigs (#4095)
- π¨ Small entrypoint unit test fixes prior to 0.27 release (#4149)
- π¨ Switch
Errorf
toFatalf
in retry tests. (#4133) - π¨ Use
knative.dev/pkg/changeset
(#4126) - π¨ Use
controller.FilterController(&v1beta1.TaskRun{})
(#4113) - π¨ Drop the tracker. (#4111)
- π¨ Take advantage of
kmeta.OwnerRefable
. (#4110) - π¨ cleanup -
homeDir
constant and hardcoded path (#4079) - π¨ Cleanup multi-arch tests (#4045)
Docs
- π GoogleContainerTools/skaffold mainline branch is called 'main' rather than 'master' (#4120)
- π docs: rename to expressions (#4104)
- π Add WhenExpressions to variable substitution documentation (#4091)
- π updating readme to include 0.26 (#4089)
- π minor doc fix (#4109)
- π Fix misplaced fields in API spec (#4094)
- π Always refer to "finally" tasks π (#4090)
- π Add issue link to comment in controller yaml (#4088)
Thanks
Thanks to these contributors who contributed to v0.27.0!
- β€οΈ @ScrapCodes
- β€οΈ @aiden-deloryn
- β€οΈ @barthy1
- β€οΈ @bobcatfish
- β€οΈ @imjasonh
- β€οΈ @jerop
- β€οΈ @khalkie
- β€οΈ @kim-fitness
- β€οΈ @mattmoor
- β€οΈ @praveen4g0
- β€οΈ @pritidesai
- β€οΈ @sbwsg
- β€οΈ @sm43
- β€οΈ @wlynch
Extra shout-out for awesome release notes:
- π @ScrapCodes
- π @aiden-deloryn
- π @imjasonh
- π @jerop
- π @khalkie
- π @kim-fitness
- π @mattmoor
- π @praveen4g0
- π @pritidesai
- π @sm43
- π @wlynch