Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

khrm
Copy link
Contributor

@khrm khrm commented Aug 14, 2025

Added a "managedBy" field to delegate responsibility of controlling the lifecycle of PipelineRuns/TaskRuns.

The semantics of the field:

Whenever the value is set, and it does not point to the built-in controller, then we skip the reconciliation.

  • The field is immutable
  • The field is not defaulted

Addresses: #8891

Changes

Submitter Checklist

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

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Added a "managedBy" field to delegate responsibility of controlling the lifecycle of PipelineRuns/TaskRuns.

The semantics of the field:

Whenever the value is set, and it does not point to the built-in controller, then we skip the reconciliation.
* The field is immutable
* The field is not defaulted

@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Aug 14, 2025
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 14, 2025
@khrm
Copy link
Contributor Author

khrm commented Aug 14, 2025

/kind feature

@tekton-robot tekton-robot added kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesnt merit a release note. labels Aug 14, 2025
@khrm khrm changed the title Add Support for managedBy field in TaskRun and PipelineRun [WIP] Add Support for managedBy field in TaskRun and PipelineRun Aug 14, 2025
@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 14, 2025
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipelinerun_validation.go 94.7% 94.7% 0.1
pkg/apis/pipeline/v1/taskrun_validation.go 97.4% 97.5% 0.0
pkg/reconciler/pipelinerun/controller.go 82.1% 71.9% -10.3
pkg/reconciler/taskrun/controller.go 85.7% 70.6% -15.1

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipelinerun_validation.go 94.7% 94.7% 0.1
pkg/apis/pipeline/v1/taskrun_validation.go 97.4% 97.5% 0.0
pkg/reconciler/pipelinerun/controller.go 82.1% 71.9% -10.3
pkg/reconciler/taskrun/controller.go 85.7% 70.6% -15.1

@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 14, 2025
@khrm
Copy link
Contributor Author

khrm commented Aug 14, 2025

/hold cancel

@khrm khrm changed the title [WIP] Add Support for managedBy field in TaskRun and PipelineRun Add Support for managedBy field in TaskRun and PipelineRun Aug 14, 2025
@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 14, 2025
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipelinerun_validation.go 94.7% 94.7% 0.1
pkg/apis/pipeline/v1/taskrun_validation.go 97.4% 97.5% 0.0
pkg/reconciler/pipelinerun/controller.go 82.1% 71.9% -10.3
pkg/reconciler/taskrun/controller.go 85.7% 70.6% -15.1

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipelinerun_validation.go 94.7% 94.7% 0.1
pkg/apis/pipeline/v1/taskrun_validation.go 97.4% 97.5% 0.0
pkg/reconciler/pipelinerun/controller.go 82.1% 71.9% -10.3
pkg/reconciler/taskrun/controller.go 85.7% 70.6% -15.1

@khrm
Copy link
Contributor Author

khrm commented Aug 18, 2025

/assign @waveywaves @vdemeester

@khrm
Copy link
Contributor Author

khrm commented Aug 18, 2025

/hold
I just found a bug in this implementation. When I bring down deployment and redeploy, somehow pipelinerun starts.

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 18, 2025
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipelinerun_validation.go 93.8% 93.9% 0.1
pkg/apis/pipeline/v1/taskrun_validation.go 97.4% 97.5% 0.0
pkg/reconciler/pipelinerun/controller.go 82.1% 85.3% 3.2
pkg/reconciler/taskrun/controller.go 85.7% 88.2% 2.5

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipelinerun_validation.go 93.8% 93.9% 0.1
pkg/apis/pipeline/v1/taskrun_validation.go 97.4% 97.5% 0.0
pkg/reconciler/pipelinerun/controller.go 82.1% 85.3% 3.2
pkg/reconciler/taskrun/controller.go 85.7% 88.2% 2.5

@khrm
Copy link
Contributor Author

khrm commented Sep 4, 2025

/retest

@khrm
Copy link
Contributor Author

khrm commented Sep 4, 2025

@waveywaves Can you please review and merge this?
/retest

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 4, 2025
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 5, 2025
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipelinerun_validation.go 93.8% 93.5% -0.3
pkg/apis/pipeline/v1/taskrun_validation.go 97.4% 96.9% -0.5
pkg/reconciler/pipelinerun/controller.go 82.1% 85.3% 3.2
pkg/reconciler/taskrun/controller.go 85.7% 88.2% 2.5

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipelinerun_validation.go 93.8% 93.5% -0.3
pkg/apis/pipeline/v1/taskrun_validation.go 97.4% 96.9% -0.5
pkg/reconciler/pipelinerun/controller.go 82.1% 85.3% 3.2
pkg/reconciler/taskrun/controller.go 85.7% 88.2% 2.5

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipelinerun_validation.go 93.8% 93.5% -0.3
pkg/apis/pipeline/v1/taskrun_validation.go 97.4% 96.9% -0.5
pkg/reconciler/pipelinerun/controller.go 82.1% 85.3% 3.2
pkg/reconciler/taskrun/controller.go 85.7% 88.2% 2.5

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipelinerun_validation.go 93.8% 93.5% -0.3
pkg/apis/pipeline/v1/taskrun_validation.go 97.4% 96.9% -0.5
pkg/reconciler/pipelinerun/controller.go 82.1% 85.3% 3.2
pkg/reconciler/taskrun/controller.go 85.7% 88.2% 2.5

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipelinerun_validation.go 93.8% 93.5% -0.3
pkg/apis/pipeline/v1/taskrun_validation.go 97.4% 96.9% -0.5
pkg/reconciler/pipelinerun/controller.go 82.1% 85.3% 3.2
pkg/reconciler/taskrun/controller.go 85.7% 88.2% 2.5

@khrm
Copy link
Contributor Author

khrm commented Sep 16, 2025

/retest

Added a "managedBy" field to delegate responsibility of controlling
the lifecycle of PipelineRuns/TaskRuns.

The semantics of the field:

Whenever the value is set, and it does not point to the built-in
controller, then we skip the reconciliation.
* The field is immutable
* The field is not defaulted

Assisted By: Gemini
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/pipelinerun_validation.go 93.8% 93.5% -0.3
pkg/apis/pipeline/v1/taskrun_validation.go 97.4% 96.9% -0.5
pkg/reconciler/pipelinerun/controller.go 82.1% 85.3% 3.2
pkg/reconciler/taskrun/controller.go 85.7% 88.2% 2.5

@khrm
Copy link
Contributor Author

khrm commented Sep 16, 2025

/retest

3 similar comments
@khrm
Copy link
Contributor Author

khrm commented Sep 16, 2025

/retest

@waveywaves
Copy link
Member

/retest

@waveywaves
Copy link
Member

/retest

@waveywaves
Copy link
Member

/hold

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 16, 2025
@waveywaves
Copy link
Member

@khrm, as noted from other maintainers as well, I think there is a fair point to be made here, that there isn't enough information on why this feature is being implemented. I think internally in the Red Hat team, we are well aware of it, but we need to take the community into account here and make sure that the proper design spec and issue are linked to the PR. We are missing the "whys" on this change and and relevant work that is being done in other upstreams. We need to add this in the PR description as it is just a part of the process.

cc @afrittoli

@khrm
Copy link
Contributor Author

khrm commented Sep 17, 2025

@waveywaves We did discuss this in WG call. We have an issue regarding this here: #8891

@waveywaves
Copy link
Member

waveywaves commented Sep 23, 2025

@afrittoli could you take a look at this, needs another set of eyes

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants