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

Add deprecation warnings for EventType v1beta1 #7453

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

matzew
Copy link
Member

@matzew matzew commented Nov 15, 2023

Fixes #

Proposed Changes

  • Add deprecation warnings for EventType v1beta1
  • change structure of the CRD (so that we have only on the old v1b1 the deprecation merged in)

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

EventType v1beta1 is deprecated. We now issue warning when those CRs are being created. V1beta1 will be removed in a future release.

Docs

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 15, 2023
Copy link

knative-prow bot commented Nov 15, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 15, 2023
@knative-prow knative-prow bot requested review from creydr and lberk November 15, 2023 13:22
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3162518) 76.74% compared to head (0dd6e11) 76.74%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7453   +/-   ##
=======================================
  Coverage   76.74%   76.74%           
=======================================
  Files         253      253           
  Lines       13916    13916           
=======================================
  Hits        10680    10680           
  Misses       2702     2702           
  Partials      534      534           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 15, 2023
@matzew matzew changed the title WIP: Change structure of crd versions for ET Add deprecation warnings for EventType v1beta1 Nov 15, 2023
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 15, 2023
Copy link
Member

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

I think there may be some missing docs on the eventtype migration, but otherwise this looks good to me (with my limited knowledge of CRDs)

I added a question as well so I can learn more about CRDs in general :)

# API requests to this version receive a warning header in the server response.
deprecated: true
# This overrides the default warning returned to API clients making v1beta1 API requests.
deprecationWarning: "eventing.knative.dev/v1beta1 EventType is deprecated; see https://knative.dev/docs/eventing/event-registry/ for instructions to migrate to eventing.knative.dev/v1beta2 EventType"
Copy link
Member

Choose a reason for hiding this comment

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

@matzew when I check the link here I couldn't find the instructions to migrate to the next eventtype. Should we add an issue to docs to add this, or am I missing it somewhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

no. it's the regular document, which discusses the ET in detail. that is IMO good enough

# API requests to this version receive a warning header in the server response.
deprecated: true
# This overrides the default warning returned to API clients making v1beta1 API requests.
deprecationWarning: "eventing.knative.dev/v1beta1 EventType is deprecated; see https://knative.dev/docs/eventing/event-registry/ for instructions to migrate to eventing.knative.dev/v1beta2 EventType"
# v1beta1 schema is identical to the v1beta2 schema
Copy link
Member

Choose a reason for hiding this comment

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

For this line, even though this v1beta1 is earlier than v1beta2, does omitting the schema still work?

Copy link
Member Author

Choose a reason for hiding this comment

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

why should it not?

@Cali0707
Copy link
Member

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2023
@knative-prow knative-prow bot merged commit 203fa93 into knative:main Nov 16, 2023
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants