-
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
TEP-0114: Add support for PipelineRun reconciler to create CustomRuns #5832
TEP-0114: Add support for PipelineRun reconciler to create CustomRuns #5832
Conversation
/assign @jerop |
The following is the coverage report on the affected files.
|
Also cc @XinruZhang due to the changes I had to make to the |
customruninformer.Get(ctx).Informer().AddEventHandler(cache.FilteringResourceEventHandler{ | ||
FilterFunc: tkncontroller.FilterRunRef("wait.testing.tekton.dev/v1beta1", "Wait"), | ||
Handler: controller.HandleAll(impl.Enqueue), | ||
// TODO: Replace with the following once tkncontroller.FilterCustomRunRef is merged (fromhttps://github.com/tektoncd/pipeline/pull/5822) |
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.
The relevant changes have been merged (#5822) but unless we change the wait-task-beta
's go.mod
to depend on a specific sha of tektoncd/pipeline
instead of a release, we still need to wait for the next to release to switch this properly.
51dd522
to
0f9e257
Compare
The following is the coverage report on the affected files.
|
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.
Thanks @abayer!
FilterFunc: func(obj interface{}) bool { | ||
r, ok := obj.(*v1beta1.CustomRun) | ||
if !ok { | ||
// Somehow got informed of a non-Run object. |
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.
nit: non-CustomRun
0f9e257
to
c0cd44b
Compare
/hold @XinruZhang - default changed. I'm holding the PR for the moment so that if for some reason we change our minds and want |
The following is the coverage report on the affected files.
|
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.
Several minor comments, thanks!
I support defaulting to cc @tektoncd/core-maintainers |
c0cd44b
to
2eb32e2
Compare
/hold cancel Ok, that's enough confirmation for me - I've squashed and removed the hold. |
The following is the coverage report on the affected files.
|
2eb32e2
to
2e02810
Compare
The following is the coverage report on the affected files.
|
Name: "r1", | ||
PipelineTaskName: "run-1", | ||
}, | ||
{ | ||
TypeMeta: runtime.TypeMeta{Kind: "Run"}, | ||
TypeMeta: runtime.TypeMeta{Kind: pipeline.CustomRunControllerName}, |
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.
TypeMeta: runtime.TypeMeta{Kind: pipeline.CustomRunControllerName}, | |
TypeMeta: runtime.TypeMeta{Kind: pipeline.RunControllerName}, |
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.
also, can we please add customRuns
to the TestCancelPipelineRun
test?
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.
Done!
d35791b
to
0e5bbde
Compare
The following is the coverage report on the affected files.
|
0e5bbde
to
f0b33b0
Compare
The following is the coverage report on the affected files.
|
/retest |
2 similar comments
/retest |
/retest |
f0b33b0
to
69881a2
Compare
The following is the coverage report on the affected files.
|
Modifies the `PipelineRun` reconciler to allow creating `CustomRun`s, rather than `Run`s, if the new `custom-task-version` feature flag is set to `v1beta1`, rather than the default value of `v1alpha1`. See [TEP-0114](https://github.com/tektoncd/community/blob/main/teps/0114-custom-tasks-beta.md#new-feature-flag-custom-task-version) for more information on the feature flag. The `Run`-flavored `wait-task` is renamed to `wait-task-alpha` for better clarity. Also adds a new integration test for using the beta `CustomRun` with the `custom-task-version` feature flag set to `v1beta1`. Followups needed: * Docs updates * Deprecation notice on the `custom-task-version` flag * After the next release, `test/custom-task-ctrls/wait-task-beta/cmd/controller/main.go` needs to switch to using `tkncontroller.FilterCustomRunRef` * And also after that release, `test/custom-task-ctrls/wait-task-beta/pkg/reconciler/reconciler_test.go` needs to switch to using `parse.MustParseCustomRun` Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
69881a2
to
e1eee36
Compare
The following is the coverage report on the affected files.
|
/retest |
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.
thank you @abayer!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jerop 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 @abayer - this looks good to me! There are quite a few follow ups - are we tracking them somewhere besides the PR description (just want to make sure we get all of them in for the release) EDIT: looks like we only need 2 of the follow ups before the release |
/lgtm /hold (feel free to cancel the hold if the docs/deprecation notice stuff is already being tracked and is on track for the release) |
Changes
Modifies the
PipelineRun
reconciler to allow creatingCustomRun
s, rather thanRun
s, if the newcustom-task-version
feature flag is set tov1beta1
, rather than the default value ofv1alpha1
.See TEP-0114 for more information on the feature flag.
The
Run
-flavoredwait-task
is renamed towait-task-alpha
for better clarity.Also adds a new integration test for using the beta
CustomRun
with thecustom-task-version
feature flag set tov1beta1
.Followups needed:
custom-task-version
flagtest/custom-task-ctrls/wait-task-beta/cmd/controller/main.go
needs to switch to usingtkncontroller.FilterCustomRunRef
test/custom-task-ctrls/wait-task-beta/pkg/reconciler/reconciler_test.go
needs to switch to usingparse.MustParseCustomRun
/kind feature
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes