-
Notifications
You must be signed in to change notification settings - Fork 630
Fix spec #4515 #4654
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
Merged
knative-prow-robot
merged 8 commits into
knative:master
from
slinkydeveloper:issues/4515_spec
Feb 1, 2021
Merged
Fix spec #4515 #4654
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8fb4b79
Propose #4515
slinkydeveloper 9a46d6c
Suggestions
slinkydeveloper ac6a2ec
Little change to the spec
slinkydeveloper bd8cdfc
Better comment
slinkydeveloper 624528b
Update codegen
slinkydeveloper b6eb4b5
Updated yamls
slinkydeveloper 9fdc766
Removed default word
slinkydeveloper a43b49d
Added the delivery field to v1beta1 spec too
slinkydeveloper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just want to understand how this is supposed to work with the wording about defaulting fields. It's more of an implementation question but has implications on when the defaulting happens and if it even should happen. The PR description seems to say that we default the triggerspec.delivery field, so if that's how we're going to implement it then it matters when the defaulting applies. If however you implement it by not actually updating the triggerspec.delivery but look at the brokerspec.delivery if triggerspec.delivery is missing then the behaviour is different.
In particular, it would be good to clarify that, for example, what happens in the following scenarios:
Create Broker, no delivery
Create Trigger, no delivery
Update Broker, configure delivery, what happens here?
Create Broker, with delivery
Create Trigger, no delivery -> defaulting happens
Update Broker, delete/update broker delivery -> what happens to trigger above
Create Trigger2, no delivery, will it match what Trigger from 2 has?
Just want to understand that behaviour little better about what "defaulting" really means and what the expected behaviour is.
As I said, depending on how this is implemented and if we actually modify the triggerspec.delivery vs. treating missing triggerspec.delivery as 'use brokerspec.delivery' has different semantics potentially and certainly makes the implementation more tricky depending on how it's implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the PR description, this is what I'm trying to understand with the description on the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defaulting basically means that the trigger delivery spec, if any, wins on the broker delivery spec, exactly as it works today with subscription and channel delivery fields. So the result of the above cases:
defaults to Broker.Delivery -> no delivery
defaults to Broker.Delivery -> delivery from Broker.Delivery
defaults to Broker.Delivery -> delivery from Broker.Delivery
defaults to Broker.Delivery -> delivery from Broker.Delivery (no delivery if Broker.Delivery was removed)
defaults to Broker.Delivery -> delivery from Broker.Delivery (no delivery if Broker.Delivery was removed)
Another case:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can provide the implementation for mtbroker to show how that works, but I don't see any particular implementation issues with it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, so I think it was (as I tried to say) how it's worded about "defaulting" since typically defaulting means filling in the fields and if that's how you were going to implement it, it could get confusing. If you remove the word defaulting I think I'd be much happier. What I tried to say :) was that spec seems ok, but your PR description confused me wrt. using words defaulting.
If you say:
If triggerspec.delivery is specified it is used. If triggerspec.delivery does not exist brokerspec.delivery is used. Nothing about defaulting :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about now? I removed the default word everywhere and added some wording to the spec