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

TEP-0114: Reconciler, event, config, webhook support for CustomRuns #5662

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

abayer
Copy link
Contributor

@abayer abayer commented Oct 19, 2022

Changes

This adds a reconciler for CustomRuns, and adds support for events and cloud events for CustomRuns as well.

It also adds the actual CRD for CustomRun to config/, along with cluster role changes for CustomRuns, and adds support for CustomRun to the webhook.

/kind feature

Submitter Checklist

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

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • 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)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Reconciler, event, config, and webhook support for CustomRuns

@abayer abayer added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 19, 2022
@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Oct 19, 2022
@abayer
Copy link
Contributor Author

abayer commented Oct 19, 2022

/assign @jerop

@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 19, 2022
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/reconciler/customrun/controller.go Do not exist 100.0%
pkg/reconciler/customrun/customrun.go Do not exist 100.0%
pkg/reconciler/events/cache/cache.go 82.4% 86.4% 4.0
pkg/reconciler/events/cloudevent/cloud_event_controller.go 88.2% 88.4% 0.2
pkg/reconciler/events/cloudevent/cloudevent.go 91.0% 90.1% -0.9
test/controller.go 19.8% 19.0% -0.8

@abayer abayer changed the title WIP: Reconciler and event support for CustomRuns WIP: Reconciler, event, config, webhook support for CustomRuns Oct 19, 2022
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/reconciler/customrun/controller.go Do not exist 100.0%
pkg/reconciler/customrun/customrun.go Do not exist 100.0%
pkg/reconciler/events/cache/cache.go 82.4% 86.4% 4.0
pkg/reconciler/events/cloudevent/cloud_event_controller.go 88.2% 88.4% 0.2
pkg/reconciler/events/cloudevent/cloudevent.go 91.0% 90.1% -0.9
test/controller.go 19.8% 19.0% -0.8

@abayer
Copy link
Contributor Author

abayer commented Oct 19, 2022

/hold

Moving this out of WIP but leaving it on hold until after 0.41.0 releases.

Oh, and I have a work-in-progress on switching pkg/reconciler/pipelinerun/pipelinerun.go to creating v1beta1.CustomRuns instead of v1alpha1.Runs - working on that is what made me realize the work in this PR needed to be done first. =)

/assign @lbernick

@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 Oct 19, 2022
@abayer abayer changed the title WIP: Reconciler, event, config, webhook support for CustomRuns Reconciler, event, config, webhook support for CustomRuns Oct 19, 2022
@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 Oct 19, 2022
pkg/reconciler/customrun/customrun.go Outdated Show resolved Hide resolved
pkg/reconciler/customrun/customrun.go Outdated Show resolved Hide resolved
pkg/reconciler/customrun/customrun.go Outdated Show resolved Hide resolved
pkg/reconciler/customrun/customrun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/customrun/customrun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/customrun/customrun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/customrun/customrun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/customrun/customrun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/customrun/customrun_test.go Show resolved Hide resolved
pkg/reconciler/customrun/customrun_test.go Show resolved Hide resolved
@jerop
Copy link
Member

jerop commented Oct 19, 2022

thank you @abayer!!

@jerop jerop added this to the Pipelines v0.42 milestone Oct 19, 2022
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/reconciler/customrun/controller.go Do not exist 100.0%
pkg/reconciler/customrun/customrun.go Do not exist 100.0%
pkg/reconciler/events/cache/cache.go 82.4% 86.4% 4.0
pkg/reconciler/events/cloudevent/cloud_event_controller.go 88.2% 88.4% 0.2
pkg/reconciler/events/cloudevent/cloudevent.go 91.0% 90.1% -0.9
test/controller.go 19.8% 19.0% -0.8

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/reconciler/customrun/controller.go Do not exist 100.0%
pkg/reconciler/customrun/customrun.go Do not exist 100.0%
pkg/reconciler/events/cache/cache.go 82.4% 86.4% 4.0
pkg/reconciler/events/cloudevent/cloud_event_controller.go 88.2% 88.4% 0.2
pkg/reconciler/events/cloudevent/cloudevent.go 91.0% 90.1% -0.9
test/controller.go 19.8% 19.0% -0.8

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/reconciler/customrun/controller.go Do not exist 100.0%
pkg/reconciler/customrun/customrun.go Do not exist 100.0%
pkg/reconciler/events/cache/cache.go 82.4% 86.4% 4.0
pkg/reconciler/events/cloudevent/cloud_event_controller.go 88.2% 88.4% 0.2
pkg/reconciler/events/cloudevent/cloudevent.go 91.0% 90.8% -0.3
test/controller.go 19.8% 19.0% -0.8

config/300-customrun.yaml Show resolved Hide resolved
config/300-customrun.yaml Show resolved Hide resolved
// to the custom tasks they control. To avoid sending duplicate events,
// CloudEvents for "CustomRuns" are only sent when enabled
Copy link
Member

Choose a reason for hiding this comment

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

out of scope for this PR but this seems like something that would vary between custom tasks, not tekton installations

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/reconciler/customrun/controller.go Do not exist 100.0%
pkg/reconciler/customrun/customrun.go Do not exist 100.0%
pkg/reconciler/events/cache/cache.go 82.4% 86.4% 4.0
pkg/reconciler/events/cloudevent/cloud_event_controller.go 88.2% 88.4% 0.2
pkg/reconciler/events/cloudevent/cloudevent.go 91.0% 90.8% -0.3
test/controller.go 19.8% 19.0% -0.8

test/controller.go Outdated Show resolved Hide resolved
pkg/reconciler/customrun/customrun.go Outdated Show resolved Hide resolved
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/reconciler/customrun/controller.go Do not exist 100.0%
pkg/reconciler/customrun/customrun.go Do not exist 100.0%
pkg/reconciler/events/cache/cache.go 82.4% 86.4% 4.0
pkg/reconciler/events/cloudevent/cloud_event_controller.go 88.2% 88.4% 0.2
pkg/reconciler/events/cloudevent/cloudevent.go 91.0% 90.8% -0.3
test/controller.go 19.8% 19.0% -0.8

@abayer
Copy link
Contributor Author

abayer commented Nov 1, 2022

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 1, 2022
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/reconciler/customrun/controller.go Do not exist 100.0%
pkg/reconciler/customrun/customrun.go Do not exist 100.0%
pkg/reconciler/events/cache/cache.go 82.4% 86.4% 4.0
pkg/reconciler/events/cloudevent/cloud_event_controller.go 88.2% 88.4% 0.2
pkg/reconciler/events/cloudevent/cloudevent.go 91.0% 90.8% -0.3
test/controller.go 19.8% 19.0% -0.8

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 Nov 3, 2022
This adds a reconciler for `CustomRun`s, and adds support for events and cloud events for `CustomRun`s as well.

It also adds the actual CRD for `CustomRun` to `config/`, along with cluster role changes for `CustomRun`s, and adds support for `CustomRun` to the webhook.

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/reconciler/customrun/controller.go Do not exist 100.0%
pkg/reconciler/customrun/customrun.go Do not exist 100.0%
pkg/reconciler/events/cache/cache.go 82.4% 86.4% 4.0
pkg/reconciler/events/cloudevent/cloud_event_controller.go 88.2% 88.4% 0.2
pkg/reconciler/events/cloudevent/cloudevent.go 91.0% 90.8% -0.3
test/controller.go 30.4% 29.2% -1.2

Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

/lgtm

thank you @abayer!

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 3, 2022
@tekton-robot tekton-robot merged commit 14eba83 into tektoncd:main Nov 3, 2022
@lbernick
Copy link
Member

lbernick commented Nov 3, 2022

It looks like this PR removed retries from the spec but not retriesStatus from the status. Was this intentional?

@jerop jerop mentioned this pull request Nov 3, 2022
3 tasks
jerop added a commit to jerop/pipeline that referenced this pull request Nov 3, 2022
As discussed in [TEP-0114][tep-0114], `retries` and `retriesStatus`
will not be included in the initial release of `CustomRuns`.

In tektoncd#5662, we removed the
`retries` field from the spec. This is a follow up change removing
`retriesStatus` field from the status.

[tep-0114]: https://github.com/tektoncd/community/blob/main/teps/0114-custom-tasks-beta.md#exclude-retries-and-retriesstatus
@abayer
Copy link
Contributor Author

abayer commented Nov 3, 2022

It looks like this PR removed retries from the spec but not retriesStatus from the status. Was this intentional?

Nope, that was a mistake. I'll open a followup.

@abayer
Copy link
Contributor Author

abayer commented Nov 3, 2022

...or @jerop's already on it. =)

jerop added a commit to jerop/pipeline that referenced this pull request Nov 3, 2022
As discussed in [TEP-0114][tep-0114], `retries` and `retriesStatus`
will not be included in the initial release of `CustomRuns`.

In tektoncd#5662, we removed the
`retries` field from the spec. This is a follow up change removing
`retriesStatus` field from the status.

[tep-0114]: https://github.com/tektoncd/community/blob/main/teps/0114-custom-tasks-beta.md#exclude-retries-and-retriesstatus
@jerop
Copy link
Member

jerop commented Nov 3, 2022

haha yes, should have commented here first 😁

jerop added a commit to jerop/pipeline that referenced this pull request Nov 8, 2022
As discussed in [TEP-0114][tep-0114], `retries` and `retriesStatus`
will not be included in the initial release of `CustomRuns`.

In tektoncd#5662, we removed the
`retries` field from the spec. This is a follow up change removing
`retriesStatus` field from the status.

[tep-0114]: https://github.com/tektoncd/community/blob/main/teps/0114-custom-tasks-beta.md#exclude-retries-and-retriesstatus
tekton-robot pushed a commit that referenced this pull request Nov 9, 2022
As discussed in [TEP-0114][tep-0114], `retries` and `retriesStatus`
will not be included in the initial release of `CustomRuns`.

In #5662, we removed the
`retries` field from the spec. This is a follow up change removing
`retriesStatus` field from the status.

[tep-0114]: https://github.com/tektoncd/community/blob/main/teps/0114-custom-tasks-beta.md#exclude-retries-and-retriesstatus
@jerop jerop changed the title Reconciler, event, config, webhook support for CustomRuns TEP-0114: Reconciler, event, config, webhook support for CustomRuns Nov 9, 2022
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. lgtm Indicates that a PR is ready to be merged. 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
None yet
Development

Successfully merging this pull request may close these issues.

7 participants