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

Propagate annotations from Pipeline/Task to PipelineRun/TaskRun #894

Merged
merged 1 commit into from
May 28, 2019

Conversation

dicarlo2
Copy link
Contributor

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: 69ade03

Submitter 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

Annotations are now propagated from Pipeline/Task to PipelineRun/TaskRun identically to labels.

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.
@tekton-robot tekton-robot requested review from dlorenc and imjasonh May 22, 2019 14:45
@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label May 22, 2019
@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 May 22, 2019
@dicarlo2 dicarlo2 mentioned this pull request May 22, 2019
3 tasks
@ghost
Copy link

ghost commented May 22, 2019

/ok-to-test

@tekton-robot tekton-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 22, 2019
@@ -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 {
Copy link

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.

Copy link
Member

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)

@ghost
Copy link

ghost commented May 22, 2019

/lgtm

@tekton-robot tekton-robot assigned ghost May 22, 2019
@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 22, 2019
@vdemeester
Copy link
Member

/test pull-tekton-pipeline-integration-tests

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
/meow boxes

(let's rename the func in a follow up @sbwsg 😉)

@tekton-robot
Copy link
Collaborator

@vdemeester: Bad category. Please see https://api.thecatapi.com/api/categories/list

In response to this:

/lgtm
/meow boxes

(let's rename the func in a follow up @sbwsg 😉)

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.

@tekton-robot
Copy link
Collaborator

[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 /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 May 28, 2019
@tekton-robot tekton-robot merged commit e44d0c0 into tektoncd:master May 28, 2019
@dicarlo2
Copy link
Contributor Author

Thanks for getting this in @sbwsg @vdemeester! Apologies for disappearing :D

pradeepitm12 pushed a commit to openshift/tektoncd-pipeline that referenced this pull request Jan 27, 2021
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]>
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. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. 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.

4 participants