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

Switch reconciler & sink to using v1beta1 types #1125

Merged
merged 1 commit into from
Jun 15, 2021

Conversation

dibyom
Copy link
Member

@dibyom dibyom commented Jun 11, 2021

The reconciler and sink code now use v1beta1 Triggers types instead of v1alpha1
ones. The v1beta1 type has also been enabled as the storage type. This should
be a backwards compatible change. Users should still be able to use the
v1alpha1 types as they have before.

Part of #1067

Signed-off-by: Dibyo Mukherjee dibyo@google.com

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Release Notes

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jun 11, 2021
@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 11, 2021
@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/interceptors/interceptors.go 91.0% 88.7% -2.3

@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/interceptors/interceptors.go 91.0% 88.7% -2.3

The reconciler and sink code now use v1beta1 Triggers types instead of v1alpha1
ones. The v1beta1 type has also been enabled as the storage type. This should
be a backwards compatible change. Users should still be able to use the
v1alpha1 types as they have before.

Part of tektoncd#1067

Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/interceptors/interceptors.go 91.0% 88.7% -2.3

@dibyom
Copy link
Member Author

dibyom commented Jun 13, 2021

/test pull-tekton-triggers-integration-tests

@dibyom
Copy link
Member Author

dibyom commented Jun 15, 2021

/assign @wlynch
/assign @savitaashture

Copy link
Member

@wlynch wlynch left a comment

Choose a reason for hiding this comment

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

LGTM! One small question.

Comment on lines -97 to -125
case i.DeprecatedGitHub != nil:
if i.DeprecatedGitHub.EventTypes != nil {
ip["eventTypes"] = i.DeprecatedGitHub.EventTypes
}
if i.DeprecatedGitHub.SecretRef != nil {
ip["secretRef"] = i.DeprecatedGitHub.SecretRef
}
case i.DeprecatedGitLab != nil:
if i.DeprecatedGitLab.EventTypes != nil {
ip["eventTypes"] = i.DeprecatedGitLab.EventTypes
}
if i.DeprecatedGitLab.SecretRef != nil {
ip["secretRef"] = i.DeprecatedGitLab.SecretRef
}
case i.DeprecatedCEL != nil:
if i.DeprecatedCEL.Filter != "" {
ip["filter"] = i.DeprecatedCEL.Filter
}

if i.DeprecatedCEL.Overlays != nil {
ip["overlays"] = i.DeprecatedCEL.Overlays
}
case i.DeprecatedBitbucket != nil:
if i.DeprecatedBitbucket.EventTypes != nil {
ip["eventTypes"] = i.DeprecatedBitbucket.EventTypes
}
if i.DeprecatedBitbucket.SecretRef != nil {
ip["secretRef"] = i.DeprecatedBitbucket.SecretRef
}
Copy link
Member

Choose a reason for hiding this comment

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

Is this a breaking change? is it possible to break this out into its own PR for visibility, or does it need to be coupled with the alpha->beta change?

Copy link
Member Author

Choose a reason for hiding this comment

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

It should backwards compatible. Users can still create ELs with the old Deprecated interceptor syntax in the v1alpha1 API group. The defaulting webhook should convert it to the new syntax and the sink code can still work -- this defaulting logic has been around for a couple of releases so as long as the EL was created after v0.13 or after this change should be backwards compatible.

@wlynch
Copy link
Member

wlynch commented Jun 15, 2021

/lgtm
/approve

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 15, 2021
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wlynch

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 Jun 15, 2021
@tekton-robot tekton-robot merged commit df265d0 into tektoncd:main Jun 15, 2021
@dibyom dibyom deleted the beta_reconciler branch June 15, 2021 19:56
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. 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants