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

kebabfy broker channel spec and pingsource opts #5875

Merged

Conversation

odacremolbap
Copy link
Contributor

@odacremolbap odacremolbap commented Nov 4, 2021

Fixes #5789

Following the same path as PRs at serving, this one is setting config element names that were previously camel cased to kebab case in a backwards compatible way.


Note: I tried to also change camelcased annotations/labels, found this that could probably need to be:

actual desired
eventing.knative.dev/brokerRole broker-role
eventing.knative.dev/broker.class broker-class
eventing.knative.dev/sourceName source-name
eventing.knative.dev/brokerEverything broker-everything

But the first one is being used at Deployment selectors, changing it would mean re-deploying broker's controllers and losing data. I am not sure if it is worth it since it wasn't part of the issue I was tackling, hence de-scoping.

Proposed Changes

  • 🧹 Update or clean up current behavior

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

The Channel template at the ConfigMap that Brokers use to declare the underlying channel must be located under the `channel-template-spec` element. The previous `channelTemplateSpec` element has been deprecated.

PingSource's ConfigMap element for maximum size has been redefined as `data-max-size`. The previous  `dataMaxSize` element has been deprecated.

Docs

📖 knative/docs#4453

@knative-prow-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 4, 2021
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 4, 2021
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/test-and-release Test infrastructure, tests or release labels Nov 4, 2021
@codecov
Copy link

codecov bot commented Nov 4, 2021

Codecov Report

Merging #5875 (6da07d3) into main (aef6803) will increase coverage by 0.10%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5875      +/-   ##
==========================================
+ Coverage   81.96%   82.07%   +0.10%     
==========================================
  Files         220      220              
  Lines        7458     7458              
==========================================
+ Hits         6113     6121       +8     
+ Misses        918      909       -9     
- Partials      427      428       +1     
Impacted Files Coverage Δ
pkg/reconciler/broker/config.go 76.47% <75.00%> (-10.20%) ⬇️
pkg/apis/sources/config/ping_defaults.go 87.50% <100.00%> (+31.94%) ⬆️
pkg/reconciler/broker/trigger/trigger.go 83.33% <0.00%> (+2.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aef6803...6da07d3. Read the comment docs.

@odacremolbap odacremolbap marked this pull request as ready for review November 5, 2021 17:22
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 5, 2021
@odacremolbap
Copy link
Contributor Author

/assign @lberk

@odacremolbap
Copy link
Contributor Author

/test all

@knative-prow-robot knative-prow-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 9, 2021
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 9, 2021
@odacremolbap
Copy link
Contributor Author

/test pull-knative-eventing-upgrade-tests

@matzew
Copy link
Member

matzew commented Nov 9, 2021

/hold

Do we need to have some post-install job for this ? Or any plan of migration?

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 9, 2021
@odacremolbap
Copy link
Contributor Author

/hold

Do we need to have some post-install job for this ? Or any plan of migration?

@matzew
Not needed because previous names still work.
tbh, I am not sure why serving went the compatibility way instead of adding a migration job, I just followed through.

@lionelvillard
Copy link
Member

@odacremolbap can you keep the unit tests with the old keys, to make sure we are not breaking anything?

@odacremolbap
Copy link
Contributor Author

@lionelvillard previous names are being maintained at the configuration tests along with the new values:

"channelTemplateSpec": `

I didn't duplicate tests for both labels everywhere because it sounded a bit repetitive, but maybe I can switch and use the old naming at most places and the new one only at the configuration tests. The reason I decided in the opposite direction was to educate by example.

@matzew
Copy link
Member

matzew commented Nov 9, 2021 via email

@odacremolbap
Copy link
Contributor Author

Added more tests using the previous name, scattered at each affected location and including messages that warns about future deprectaion. See: 6da07d3

@matzew @lionelvillard

@knative-metrics-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/sources/config/ping_defaults.go 55.6% 92.3% 36.8
pkg/reconciler/broker/config.go 93.3% 85.7% -7.6

@odacremolbap
Copy link
Contributor Author

/retest

Copy link
Member

@pierDipi pierDipi 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-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 18, 2021
@lionelvillard
Copy link
Member

/approve

@matzew If you are ok with this, can you unhold?

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lionelvillard, odacremolbap

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-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 18, 2021
@odacremolbap
Copy link
Contributor Author

@matzew is there something pending here or can this be unholded?

@matzew
Copy link
Member

matzew commented Dec 13, 2021

I will unhold once we have cut the 1.1 release, if that's OK

@csantanapr
Copy link
Member

bump @matzew @odacremolbap

@matzew
Copy link
Member

matzew commented Dec 16, 2021 via email

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 16, 2021
@knative-prow-robot knative-prow-robot merged commit 6f1ed33 into knative:main Dec 16, 2021
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. area/test-and-release Test infrastructure, tests or release cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Case convention inconsistent in Knative Eventing config maps
9 participants