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

@khrm
Copy link
Contributor Author

khrm commented Sep 25, 2025

/assign @afrittoli Can you please take a look at this? @afrittoli

Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@khrm As done for all other v1 api changes, could you please add this into the v1beta1 branch as well?

@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/apis/pipeline/v1beta1/pipelinerun_validation.go 95.7% 95.4% -0.3
pkg/apis/pipeline/v1beta1/taskrun_validation.go 98.1% 97.5% -0.5
pkg/reconciler/pipelinerun/controller.go 82.1% 85.3% 3.2
pkg/reconciler/taskrun/controller.go 85.7% 88.2% 2.5

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/apis/pipeline/v1beta1/pipelinerun_validation.go 95.7% 95.4% -0.3
pkg/apis/pipeline/v1beta1/taskrun_validation.go 98.1% 97.5% -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 25, 2025

@afrittoli I added this field to v1beta1 also. Can you please review again?

@afrittoli
Copy link
Member

/retest

1 similar comment
@khrm
Copy link
Contributor Author

khrm commented Sep 28, 2025

/retest

@khrm
Copy link
Contributor Author

khrm commented Sep 28, 2025

@waveywaves Can you add retest here?I still don't have that power.

@vdemeester
Copy link
Member

/retest

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.

Is the hold still valid ?

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester, waveywaves

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:
  • OWNERS [vdemeester,waveywaves]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@khrm
Copy link
Contributor Author

khrm commented Sep 29, 2025

@vdemeester We discussed this in WG call again. So I don't think it's valid now.

@waveywaves @afrittoli

@waveywaves
Copy link
Member

waveywaves commented Sep 29, 2025

/retest

@khrm thanks for confirming, removed hold

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

/retest

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

5 participants