-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Propagate annotations from Pipeline/Task to PipelineRun/TaskRun #894
Conversation
With this change, annotations are propagated from Pipeline and Task to PipelineRun and TaskRun, respectively, giving us full annotation propagation from Pipeline to PipelineRun to TaskRun to Pod and Task to TaskRun to Pod.
/ok-to-test |
@@ -448,3 +489,11 @@ func assertLabelsMatch(t *testing.T, expectedLabels, actualLabels map[string]str | |||
} | |||
} | |||
} | |||
|
|||
func assertAnnotationsMatch(t *testing.T, expectedAnnotations, actualAnnotations map[string]string) { | |||
for key, expectedVal := range expectedAnnotations { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assertion won't catch a situation where actualAnnotations
includes more annotations, is a superset of, expectedAnnotations
. Does that case matter? Could check if len(expected) != len(actual)
before the loop if so. If it doesn't matter than I suggest renaming the func to assertAnnotationsContain
or similar to indicate that an exact match isn't expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed… I think it doesn't matter so I'm all for the renaming of the func (can be done in a follow-up)
/lgtm |
/test pull-tekton-pipeline-integration-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/meow boxes
(let's rename the func in a follow up @sbwsg 😉)
@vdemeester: Bad category. Please see https://api.thecatapi.com/api/categories/list In response to this:
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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dicarlo2, 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 |
Thanks for getting this in @sbwsg @vdemeester! Apologies for disappearing :D |
This is necessary since out release pipeline compares the expected list of images (provided as image output resources) to the actual list of images created by ko. Fixes tektoncd#894 Signed-off-by: Dibyo Mukherjee <[email protected]>
With this change, annotations are propagated from Pipeline and Task to
PipelineRun and TaskRun, respectively, giving us full annotation propagation
from Pipeline to PipelineRun to TaskRun to Pod and Task to TaskRun to
Pod.
Changes
s/label/annotation/g
: 69ade03Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide
for more details.
Release Notes