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

(cleanup) use skipping reason instead of existence of variables #4147

Merged
merged 1 commit into from
Aug 17, 2021

Conversation

jerop
Copy link
Member

@jerop jerop commented Aug 11, 2021

Changes

today, we use existence of variables to determine whether to add
when expressions to the skipped tasks status for finally tasks
(we only add them when they are resolved, have no variables)

we recently added skipping reason in #4085

now that we have skipping reason, we can use it to check that the reason
for skipping is that when expressions evaluated to false before
including the resolved when expressions to the skipped tasks status

we plan to explore adding skipping reason to the skipped tasks status
in the future, but for now this change reuses this new functionality

/kind cleanup

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

/cc @pritidesai

@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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 11, 2021
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 74.0% 73.4% -0.5

@jerop
Copy link
Member Author

jerop commented Aug 11, 2021

/test tekton-pipeline-unit-tests

@jerop jerop marked this pull request as ready for review August 11, 2021 19:47
@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 Aug 11, 2021
@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 12, 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

@jerop jerop force-pushed the skipped-task-no-variable branch from f0e4efd to 1d0b71f Compare August 16, 2021 16:31
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 16, 2021
@jerop
Copy link
Member Author

jerop commented Aug 16, 2021

/test tekton-pipeline-unit-tests

today, we existence of variables to determine whether to add
`when` expressions to the skipped `tasks` status for finally tasks
(we only add them when they are resolved, have no variables)

we recently added skipping reason in tektoncd#4085

now that we have skipping reason, we can use it to check that the reason
for skipping is that `when` expressions evaluated to false before
including the resolved `when` expressions to the skipped `tasks` status

we plan to explore adding skipping reason to the skipped `tasks` status
in the future, but for now this change reuses this new functionality
@jerop jerop force-pushed the skipped-task-no-variable branch from 1d0b71f to f48841b Compare August 16, 2021 16:47
@jerop
Copy link
Member Author

jerop commented Aug 17, 2021

/test pull-tekton-pipeline-go-coverage

Copy link
Collaborator

@bobcatfish bobcatfish left a comment

Choose a reason for hiding this comment

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

wow nice cleanup!! :D

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 17, 2021
@jerop
Copy link
Member Author

jerop commented Aug 17, 2021

/test pull-tekton-pipeline-alpha-integration-tests

@tekton-robot tekton-robot merged commit adf1953 into tektoncd:main Aug 17, 2021
@jerop jerop deleted the skipped-task-no-variable 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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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/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.

5 participants