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

TEP-0103: Skipping Reason #4800

Closed

Conversation

chitrangpatel
Copy link
Contributor

@chitrangpatel chitrangpatel commented Apr 27, 2022

Changes

Add SkippingReason to SkippedTasks field of PipelineRunStatus.

Prior to this, users only knew that a PipelineTask was skipped but not
the exact reason for skipping the task leading to confusion when
debugging Pipelines.

This PR addresses the TEP and issue. It adds a field Reason of type SkippingReason (a string alias) to the SkippedTasksfield in PipelineRunStatus. The tests have been updated to validate skipping reason.

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
    (if there are no user facing changes, use release note "NONE")

Release Notes

Add SkippingReason to SkippedTasks field of PipelineRunStatus.

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Apr 27, 2022
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 27, 2022
@tekton-robot
Copy link
Collaborator

Hi @chitrangpatel. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@chitrangpatel chitrangpatel mentioned this pull request Apr 27, 2022
@chitrangpatel chitrangpatel marked this pull request as ready for review April 27, 2022 15:06
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 27, 2022
@dibyom
Copy link
Member

dibyom commented Apr 27, 2022

/ok-to-test

@dibyom dibyom closed this Apr 27, 2022
@dibyom dibyom reopened this Apr 27, 2022
@dibyom
Copy link
Member

dibyom commented Apr 27, 2022

Closed by mistake

@dibyom
Copy link
Member

dibyom commented Apr 27, 2022

/assign @jerop

Add unit test with large result for setTaskRunStatusBasedOnStepStatus.
@dibyom
Copy link
Member

dibyom commented Apr 28, 2022

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 28, 2022
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign jerop
You can assign the PR to them by writing /assign @jerop in a comment when ready.

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

Needs approval from an approver in each of these files:

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

@chitrangpatel
Copy link
Contributor Author

/retest

1 similar comment
@dibyom
Copy link
Member

dibyom commented Apr 29, 2022

/retest

Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

@chitrangpatel - thank you!

Please squash the commits into one and write a description, as described in the commit messages standards - this could be the summary from TEP-0103.

Today, we add the when expressions to skippedTasks when a PipelineTask is skipped regardless of the reason - this is useful for users to deduce whether the reason was its when expressions or not. Now that the reason is explicit, we can add the when expressions only when it's skipped because of when expressions evaluating to false. This ensures that we provide the necessary information only, and helps keep the PipelineRun status minimal as described in TEP-0100. This can be done as follow up work after this PR is merged.

(cc @pritidesai)

@jerop jerop changed the title Tep 0103 skipping reason TEP-0103: Skipping Reason May 2, 2022
@jerop
Copy link
Member

jerop commented May 2, 2022

Closes #4738

@jerop jerop linked an issue May 2, 2022 that may be closed by this pull request
@@ -676,6 +676,7 @@ Conditions:
Type: Succeeded
Skipped Tasks:
Name: skip-this-task
Reason: WhenExpressionsSkip
Copy link
Member

Choose a reason for hiding this comment

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

please update lines 666-668 as well to indicate that a Reason field will be added

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@tekton-robot tekton-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 3, 2022
…tatus`.

Prior to this, users only knew that a `PipelineTask` was skipped but not
the exact reason for skipping the task leading to confusion when
debugging `Pipelines`.

This commit adds a field `Reason` of type [`SkippingReason`][reasons] (a string alias) to the [`SkippedTasks`][skipped-tasks] field in `PipelineRunStatus`.
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 3, 2022
@chitrangpatel
Copy link
Contributor Author

Closing this PR due to merge commits affecting a squash-down.
Opening a new PR #4829 instead.

@afrittoli
Copy link
Member

Hello @chitrangpatel and thank you for your PR.

Opening a new PR is fine, however it has the downside of dispersing the context across multiple PRs.

For next time, if you have an issue on your local branch, you can still use the existing PR.
Once you have a working local branch, you can push it to your existing PR, for instance:

git push <fork remote name> <local branch name:existing pr branch> --force

In the case of this PR, the existing pr branch would be TEP-0103-Skipping-Reason

@chitrangpatel
Copy link
Contributor Author

Thanks @afrittoli! I will do that next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skipping Reason
5 participants