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

More EventType v1beta2 work #6903

Merged
merged 3 commits into from
May 3, 2023
Merged

More EventType v1beta2 work #6903

merged 3 commits into from
May 3, 2023

Conversation

matzew
Copy link
Member

@matzew matzew commented May 2, 2023

Fixes #6891
Fixes #6892

Proposed Changes

  • Adding v1beta2 version for EventType and type conversion

Pre-review Checklist

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note

Adding v1beta2 version for EventType and type conversion

Docs

matzew added 2 commits May 2, 2023 16:57
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
@knative-prow knative-prow bot requested review from aliok and creydr May 2, 2023 14:59
@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 2, 2023
@codecov
Copy link

codecov bot commented May 2, 2023

Codecov Report

Patch coverage: 44.23% and project coverage change: -0.15 ⚠️

Comparison is base (66e8257) 79.84% compared to head (40969e1) 79.70%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6903      +/-   ##
==========================================
- Coverage   79.84%   79.70%   -0.15%     
==========================================
  Files         243      243              
  Lines       12530    12576      +46     
==========================================
+ Hits        10005    10024      +19     
- Misses       2028     2055      +27     
  Partials      497      497              
Impacted Files Coverage Δ
cmd/webhook/main.go 1.10% <0.00%> (-0.08%) ⬇️
pkg/apis/eventing/v1beta1/eventtype_conversion.go 58.97% <58.97%> (-41.03%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@matzew
Copy link
Member Author

matzew commented May 3, 2023

@vishal-chdhry interested in doing a review here too?

Comment on lines +140 to +142
name: v1beta2
served: true
storage: false
Copy link
Member

Choose a reason for hiding this comment

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

I had one doubt, why is storage false here and server is true, unlike in #5272 where it was slightly different

Copy link
Member Author

Choose a reason for hiding this comment

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

that was bad idea, you go step by step on these. So we take it like this and turn on storage when the v1b1 is really done/obsolate

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

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

Only a nit / question. Otherwise LGTM

func (source *EventType) ConvertTo(ctx context.Context, to apis.Convertible) error {
return fmt.Errorf("v1beta1 is the highest known version, got: %T", to)
func (source *EventType) ConvertTo(ctx context.Context, obj apis.Convertible) error {
switch sink := obj.(type) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: Isn't the name sink a bit misleading in our case? (instead of using to/from).

Copy link
Member Author

Choose a reason for hiding this comment

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

Co-authored-by: Vishal Choudhary <contactvishaltech@gmail.com>
Copy link
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label May 3, 2023
@knative-prow
Copy link

knative-prow bot commented May 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, matzew

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

@knative-prow knative-prow bot merged commit 999eead into knative:main May 3, 2023
33 of 37 checks passed
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add conversion webhook for eventtypes v1b1 to v1b2 Add EventType v1beta2 to CRD manifest
3 participants