Skip to content

deprecate reply.channel#2142

Merged
knative-prow-robot merged 2 commits into
knative:masterfrom
lionelvillard:no_reply_channel
Nov 8, 2019
Merged

deprecate reply.channel#2142
knative-prow-robot merged 2 commits into
knative:masterfrom
lionelvillard:no_reply_channel

Conversation

@lionelvillard
Copy link
Copy Markdown
Contributor

Fixes #1936

Proposed Changes

  • Deprecate reply.channel
  • Add reply.ref and reply.uri (reply is a Destination)

Release Note

Subscription.spec.reply.channel has been deprecated. Instead, use Subscription.spec.reply directly

@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 4, 2019
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 4, 2019
@knative-prow-robot knative-prow-robot added the area/test-and-release Test infrastructure, tests or release label Nov 4, 2019
@lionelvillard
Copy link
Copy Markdown
Contributor Author

/hold

We still need to agree that's a good thing to do.

#1936

@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 4, 2019
@chizhg
Copy link
Copy Markdown
Contributor

chizhg commented Nov 6, 2019

/retest

@lionelvillard
Copy link
Copy Markdown
Contributor Author

/hold cancel

@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 Nov 6, 2019
@lionelvillard
Copy link
Copy Markdown
Contributor Author

/assign @vaikas

// with a reference to the Addressable duck type. If the resource does not meet this contract,
// it will be reflected in the Subscription's status.
// +optional
Destination *apisv1alpha1.Destination `json:",inline"`
Copy link
Copy Markdown
Contributor

@n3wscott n3wscott Nov 7, 2019

Choose a reason for hiding this comment

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

I think what is happening here is go promotes the type as the field name automatically, but I think we should make it clear that we do not intend to have a named field in the future.

If you change this to:

*apisv1alpha1.Destination `json:",inline"`

Then we can do things like subscription.Spec.Reply.URI and this will just work (it will also work with subscription.Spec.Reply.Destination.URI because of go).

At the moment it only will work with subscription.Spec.Reply.Destination.URI

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed.

@n3wscott
Copy link
Copy Markdown
Contributor

n3wscott commented Nov 7, 2019

Other than the named field issue, looks good to me.

@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/v1alpha1/subscription_validation.go 97.1% 94.9% -2.2
pkg/reconciler/subscription/subscription.go 71.0% 70.7% -0.3

@n3wscott
Copy link
Copy Markdown
Contributor

n3wscott commented Nov 8, 2019

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Nov 8, 2019
@knative-prow-robot knative-prow-robot merged commit 1cb281d into knative:master Nov 8, 2019
@lionelvillard lionelvillard deleted the no_reply_channel branch August 28, 2020 15:38
@lionelvillard lionelvillard restored the no_reply_channel branch September 3, 2020 15:42
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.

Rename subscription.reply.channel to subscription.reply.sink

7 participants