Skip to content

Validate DeliverySpec in Channels & Subscriptions#5777

Merged
knative-prow-robot merged 1 commit into
knative:mainfrom
travis-minke-sap:deliveryspec-validation
Oct 4, 2021
Merged

Validate DeliverySpec in Channels & Subscriptions#5777
knative-prow-robot merged 1 commit into
knative:mainfrom
travis-minke-sap:deliveryspec-validation

Conversation

@travis-minke-sap
Copy link
Copy Markdown
Contributor

Fixes #5776

Proposed Changes

  • 🐛 Added missing validation of DeliverySpec to Channel and Subscription.

Pre-review Checklist

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

I don't see any mention of what is/isn't validated in the Specs and would assume that having consistent validation of the DeliverySpec would just be expected?

Release Note

Channel and Subscription will now enforce validation of the "delivery" field.

Docs

n/a

@google-cla google-cla Bot added the cla: yes Indicates the PR's author has signed the CLA. label Oct 1, 2021
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 1, 2021
@knative-metrics-robot
Copy link
Copy Markdown

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/messaging/v1/channel_validation.go 96.4% 96.8% 0.3
pkg/apis/messaging/v1/subscription_validation.go 97.1% 97.3% 0.2

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 1, 2021

Codecov Report

Merging #5777 (a62799a) into main (c39c5a6) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5777      +/-   ##
==========================================
+ Coverage   82.52%   82.54%   +0.01%     
==========================================
  Files         203      203              
  Lines        6376     6382       +6     
==========================================
+ Hits         5262     5268       +6     
  Misses        768      768              
  Partials      346      346              
Impacted Files Coverage Δ
pkg/apis/messaging/v1/channel_validation.go 84.21% <100.00%> (+1.35%) ⬆️
pkg/apis/messaging/v1/subscription_validation.go 86.04% <100.00%> (+1.04%) ⬆️

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 c39c5a6...a62799a. Read the comment docs.

Copy link
Copy Markdown
Member

@matzew matzew left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 4, 2021
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: matzew, travis-minke-sap

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Oct 4, 2021
@knative-prow-robot knative-prow-robot merged commit 2c059b2 into knative:main Oct 4, 2021
@pierDipi
Copy link
Copy Markdown
Member

pierDipi commented Oct 4, 2021

/cherry-pick release-0.26

@pierDipi
Copy link
Copy Markdown
Member

pierDipi commented Oct 4, 2021

/cherry-pick release-0.25

@pierDipi
Copy link
Copy Markdown
Member

pierDipi commented Oct 4, 2021

/cherry-pick release-0.24

@knative-prow-robot
Copy link
Copy Markdown
Contributor

@pierDipi: new pull request created: #5778

Details

In response to this:

/cherry-pick release-0.26

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot
Copy link
Copy Markdown
Contributor

@pierDipi: new pull request created: #5779

Details

In response to this:

/cherry-pick release-0.25

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot
Copy link
Copy Markdown
Contributor

@pierDipi: new pull request created: #5780

Details

In response to this:

/cherry-pick release-0.24

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@pierDipi
Copy link
Copy Markdown
Member

pierDipi commented Oct 4, 2021

@travis-minke-sap can you please give the CLA consent to the cherry-pick PRs created by the bot?

@travis-minke-sap travis-minke-sap deleted the deliveryspec-validation branch October 4, 2021 13:38
@evankanderson
Copy link
Copy Markdown
Member

This looks like a feature addition, rather than a failure / bug / security vulnerability.

Do we have a cherrypick policy for eventing? (I don't know, just asking the question because I was surprised by the release.)

@travis-minke-sap
Copy link
Copy Markdown
Contributor Author

Hi Evan,

I don't know the cherrypick policy and would defer to Pier as to why he initiated that. Possibly because I created the initial issue as a "bug"?

I would disagree that this is a feature... Aside from the inconsistent validation of the DeliverySpec, the enforcement of the experimental-feature flags was flat out broken for Channels / Subscriptions. I would agree it's not a security vulnerability and would also agree that it might be low-priority.

Apologies if this change is for some reason undesirable - I meant well and would appreciate any advice on how it should have been handled differently? Thanks!

@pierDipi
Copy link
Copy Markdown
Member

This looks like a feature addition, rather than a failure / bug / security vulnerability.

IMHO, specifying an experimental feature that isn't enabled or invalid delivery parameters are bugs.
Why aren't they bugs?

Do we have a cherrypick policy for eventing? (I don't know, just asking the question because I was surprised by the release.)

No, that I'm aware of.

@evankanderson
Copy link
Copy Markdown
Member

I agree that this was a bug, I was just wondering whether we thought it was worth recommendiing anyone who installed 0.26 to reinstall to correct this bug (which is what a patch-fix implies).

This is obviously water under the bridge for this change, my larger question/concern was whether we had documentation so that people didn't have to guess whether a PR should be cherrypicked or not.

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. 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.

Channel & Subscription Validation Does Not Include DeliverySpec

6 participants