-
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 labels from Pipeline and Task to PipelineRun and TaskRun #501
Comments
Any thoughts on the best way to modify
|
With this change, labels are propagated from Pipeline and Task to PipelineRun and TaskRun, respectively, giving us full label propagation from Pipeline to PipelineRun to TaskRun to Pod and Task to TaskRun to Pod. This commit also adds a label whose key is pipeline.knative.dev/task to all TaskRuns that refer to a Task with a TaskRef (the label is not added to TaskRuns using an embedded TaskSpec) that contains the name of the Task. In addition, this commit introduces a builder for Pod values to increase the readability of the taskrun reconciliation tests. Fixes tektoncd#501
With this change, labels are propagated from Pipeline and Task to PipelineRun and TaskRun, respectively, giving us full label propagation from Pipeline to PipelineRun to TaskRun to Pod and Task to TaskRun to Pod. This commit also adds a label whose key is pipeline.knative.dev/task to all TaskRuns that refer to a Task with a TaskRef (the label is not added to TaskRuns using an embedded TaskSpec) that contains the name of the Task. In addition, this commit introduces a builder for Pod values to increase the readability of the taskrun reconciliation tests. Fixes tektoncd#501
Turns out that I was a bit confused, and I don't think we ended up needing to change any data types. I think the main question left is how best to update the PipelineRun/TaskRun with the labels from the Pipeline/Task so that we don't keep doing the same work in the reconciler and so we can keep the core status logic clear. See #517 (comment). |
With this change, labels are propagated from Pipeline and Task to PipelineRun and TaskRun, respectively, giving us full label propagation from Pipeline to PipelineRun to TaskRun to Pod and Task to TaskRun to Pod. This commit also adds a label whose key is pipeline.knative.dev/task to all TaskRuns that refer to a Task with a TaskRef (the label is not added to TaskRuns using an embedded TaskSpec) that contains the name of the Task. Documentation related to labels was moved to labels.md in order to avoid duplicating similar content across four other pages. In addition, this commit introduces a builder for Pod values to increase the readability of the taskrun reconciliation tests. Fixes tektoncd#501
With this change, labels are propagated from Pipeline and Task to PipelineRun and TaskRun, respectively, giving us full label propagation from Pipeline to PipelineRun to TaskRun to Pod and Task to TaskRun to Pod. This commit also adds a label whose key is pipeline.knative.dev/task to all TaskRuns that refer to a Task with a TaskRef (the label is not added to TaskRuns using an embedded TaskSpec) that contains the name of the Task. Documentation related to labels was moved to labels.md in order to avoid duplicating similar content across four other pages. Fixes tektoncd#501
With this change, labels are propagated from Pipeline and Task to PipelineRun and TaskRun, respectively, giving us full label propagation from Pipeline to PipelineRun to TaskRun to Pod and Task to TaskRun to Pod. This commit also adds a label whose key is pipeline.knative.dev/task to all TaskRuns that refer to a Task with a TaskRef (the label is not added to TaskRuns using an embedded TaskSpec) that contains the name of the Task. Documentation related to labels was moved to labels.md in order to avoid duplicating similar content across four other pages. Fixes #501
Sorry for missing all the thoughts and potential discussion here @dwnusbaum 🙏 but thanks so much for taking this on and fixing it!! ❤️ |
Expected Behavior
Custom labels specified on
Pipeline
andTask
resources should be added toPipelineRun
andTaskRun
objects that reference them. In other words, labels should propagate as follows:Pipeline -> PipelineRun -> TaskRun -> Pod
Task -> TaskRun -> Pod
In addition, similarly to how the
pipeline.knative.dev/pipeline
label is added to generatedTaskRuns
, apipeline.knative.dev/task
label should be added to generatedPods
.Actual Behavior
Custom labels on
Pipeline
andTask
resources are not propagated to other resources. Labels propagate as follows:PipelineRun -> TaskRun -> Pod
TaskRun -> Pod
Additional Info
See #458. #488 added label propagation from
PipelineRun
toTaskRun
toPod
, but did not handle propagation forPipeline
andTask
. PropagatingPipeline
andTask
labels will require updating a few data structures so that either theObjectMeta
field or the labels field specifically ofPipelines
andTasks
is available whenTaskRuns
andPods
are created so that they can be propagated correctly.Consistent label propagation is desirable because it allows users to easily find all resources associated with a given Pipeline/Task.
Open questions:
The text was updated successfully, but these errors were encountered: