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

Fix Example with Completed and Succeeded Execution Status #4140

Merged
merged 1 commit into from
Aug 6, 2021

Conversation

jerop
Copy link
Member

@jerop jerop commented Aug 5, 2021

Changes

Today, an example pipeline that demonstrates using the execution
status of tasks - $(tasks.status) - in when expressions in
finally tasks uses Succeeded in a Task that should be executed
but the status is actually Completed. This example would be confusing
to users as reported on Slack - thanks Hussein!

As explained in the docs:

  • Succeeded: all tasks have succeeded
  • Failed: one ore more tasks failed
  • Completed: all tasks completed successfully including one or more
    skipped tasks

In this change:

  • correct the task that should be executed to check Completed
    instead of Succeeded
  • add a finally task that shows Succeeded would block execution
    because the aggregate execution status is actually Completed

/kind misc

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been filled in or deleted (only if no user facing changes)

Release Notes

NONE

Today, an example `pipeline` that demonstrates using the execution
status of `tasks` - `$(tasks.status)` - in `when` expressions in
`finally tasks` uses `Succeeded` in a `Task` that should be executed
but the status is actually `Completed`. This example would be confusing
to users as reported on Slack.

As explained in the [docs](https://github.com/tektoncd/pipeline/blob/release-v0.24.x/docs/pipelines.md#using-aggregate-execution-status-of-all-tasks):
- `Succeeded`: all `tasks` have succeeded
- `Failed`: one ore more `tasks` failed
- `Completed`: all `tasks` completed successfully including one or more
skipped `tasks`

In this change:
- correct the `task` that should be executed to check `Completed`
instead of `Succeeded`
- add a `finally task` that shows `Succeeded` would block execution
because the aggregate execution status is actually `Completed`
@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 5, 2021
@tekton-robot tekton-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/misc Categorizes issue or PR as a miscellaneuous one. labels Aug 5, 2021
@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2021
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 6, 2021
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pritidesai, vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [pritidesai,vdemeester]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot merged commit 05d55b2 into tektoncd:main Aug 6, 2021
@jerop jerop deleted the succeeded-to-completed branch June 11, 2022 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants