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

cherry-pick to 0.27.x: Propagate Pipeline name label to PipelineRun #4174

Merged
merged 2 commits into from Aug 23, 2021
Merged

Conversation

ghost
Copy link

@ghost ghost commented Aug 18, 2021

Changes

Cherry-pick #4163 into v0.27.x branch in preparation for a v0.27.2 release on Monday.

The above fixes a bug where Pipelines created in Pending or Cancelled state wouldn't receive a tekton.dev/pipeline = <pipelineName> label, limiting the ability to filter for them.

Another commit was added to resolve a small skew in some publicly exported constants that have changed on main after the v0.27 branch was cut. Bringing the updated label constants over to 0.27 would be, I think, technically a breaking change - if someone were importing pipelines @ 0.27 into their codebase they'd need to update usage of these constants in their own code from one patch release to the next. 🤷 I don't know how likely this really is but I figure it doesn't hurt.

/kind misc

Submitter Checklist

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

Release Notes

NONE

@ghost ghost requested a review from jerop August 18, 2021 22:49
@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/misc Categorizes issue or PR as a miscellaneuous one. labels Aug 18, 2021
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 18, 2021
@ghost
Copy link
Author

ghost commented Aug 19, 2021

/retest

@ghost
Copy link
Author

ghost commented Aug 19, 2021

/test tekton-pipeline-unit-tests

1 similar comment
@ghost
Copy link
Author

ghost commented Aug 19, 2021

/test tekton-pipeline-unit-tests

@jerop
Copy link
Member

jerop commented Aug 19, 2021

/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.

@sbwsg you need to bring in this PR as well #4154 (the propagation PR was building up on the cleaning up label keys PR)

@ghost
Copy link
Author

ghost commented Aug 19, 2021

Ahhh thanks for catching that @jerop , I'll do that.

jerop and others added 2 commits August 19, 2021 09:20
Currently, a `PipelineRun` started in a `Cancelled` or `Pending` state
doesn't receive the `Pipeline` name label.

As such, a user cannot find all the `PipelineRuns` related to a given
`Pipeline`. This is a challenge for a user searching for associated
`PipelineRuns` in `Pending` state in order to start them.

In this change, we ensure that the `Pipeline` name label is propagated
from the `Pipeline` to the `PipelineRun`.

Fixes #3903.
…in 0.27

The pipeline name label propagation change in 2a910a3 was merged after a slight
change in the way we construct some publicly exported label constants. Bringing
in the change to public constants would have technically been breaking for a
patch release.

This reintroduces GroupName to the label construction when propagating the
pipeline name label to workaround the conflict.
@ghost ghost changed the title Propagate Pipeline name label to PipelineRun cherry-pick to 0.27.x: Propagate Pipeline name label to PipelineRun Aug 19, 2021
@ghost
Copy link
Author

ghost commented Aug 19, 2021

@jerop I ended up bringing back the GroupName+PipelineLabelKey since I think, technically, I might be making a breaking change if I pull the labels clean up into the 0.27 branch.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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:

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 19, 2021
@ghost
Copy link
Author

ghost commented Aug 23, 2021

ping @tektoncd/core-maintainers this is a cherrypick for 0.27, PTAL.

@jerop
Copy link
Member

jerop commented Aug 23, 2021

thanks @sbwsg

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 23, 2021
@tekton-robot tekton-robot merged commit e297768 into tektoncd:release-v0.27.x Aug 23, 2021
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-none Denotes a PR that doesnt merit a release note. 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.

3 participants