Move left over delivery helpers from pkg/buses to pkg/provisioners#626
Conversation
|
/test pull-knative-eventing-integration-tests |
I'm not sure this is a safe change. I don't think we validate the spec of the VirtualService during normal |
You are right, I confused the Few ways to fix this: Proposal 1 (the right fix)
Proposal 2 (compromise)
Proposal 3 (least impactful)
|
I guess one important thing we need to know is how backwards compatibility will work. I'm fairly sure we want to support 0.N -> 0.N+1 (upgrading directly from 0.N to 0.N+1) and 0.N+1 -> 0.N+2, without anything breaking. Do we also need to support 0.N -> 0.N+2 (upgrading directly from 0.N to 0.N+2)? @vaikas-google @evankanderson Regardless of the backwards compatibility story, I think that we should do:
We can use a similar procedure as in eventing-sources. And then, for the short-term, I think this is the proper fix until we determine how long we need to be compatible with the current
|
I will raise this in the weekly meeting.
Thanks! I just did that, please take a look. |
Ping @vaikas-google @evankanderson - what are the requirements for backwards compatibility? |
|
/milestone v0.2.1 |
|
/approve The release note should mention that the controller will delete the previous service. If we don't delete the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: grantr, neosab The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
|
||
| // The name of the svc has changed since version 0.2.1. Hence, delete old dispatcher service (in-memory-channel-clusterbus) | ||
| // that was created previously in version 0.2.0 to ensure backwards compatibility. | ||
| err := r.deleteOldDispatcherService(ctx, ccp) |
There was a problem hiding this comment.
I'm not sure how much it matters because Istio won't notice right away, but move this after util.CreateDispatcherService, so that the correct VirtualService is updated before the old Service is deleted.
There was a problem hiding this comment.
I don't think it matters, I changed the order.
| // Update VirtualService if it has changed. This is possible since in version 0.2.0, the destinationHost in | ||
| // spec.HTTP.Route for the dispatcher was changed from *-clusterbus to *-dispatcher. Even otherwise, this | ||
| // reconciliation is useful for the future mutations to the object. | ||
| expected := newVirtualService(channel) |
There was a problem hiding this comment.
Let's make the same change to K8s Services as well (comparing and updating if needed).
There was a problem hiding this comment.
Hmm, I did this but had to tweak a bit since service.spec.clusterIP is immutable. Take a look and let me know.
Nothing will break, but we will always have lingering doubts that something depends on it. |
|
The following is the coverage report on pkg/.
|
* Initial work on the GCP PubSub Channel Controller. * Switch to the more standard model, a single global dispatcher. * Args are now defaulted on the controller, removed the ability to customize them per channel. We can add them back later if desired. * YAML and scaffold for the dispatcher. * Created the 'receive' side of the dispatcher. The dispatch side is totally unimplemented. * Initial work on the dispatcher. * More work on the dispatcher. * Dispatcher mostly working. * Handle the reconcileChan * Minor improvements. * Touch ups. * Rename Run->Start. * Fake PubSub. * Util unit tests. * Unit tests for the channel controller. * Beginning unit tests for dispatcher. * update-deps * Unit tests for dispatcher/reconcile.go * Unit test dispatcher/receiver. * Add a README. * DeepCopy the sub * Add the ServiceEntry to the Channel's config. * Typo * PR comments * buses -> provisioners * Switch to the common utils. * Add VirtualService.Update RBAC now that VirtualServices are updated if incorrect. * PR comments * Move the contoller packages inside the controller folder. * PR comments (mostly log levels). * Desugar to get the fields right. * Switch service name, to match #626.
Fixes #625 #572
Proposed Changes
message_dispatcher,message_receiver,logginghelpers frompkg/busestopkg/provisioners<provisioner>-clusterbusto<provisioner>-dispatcher. UPGRADE IMPACT Please follow the discussion below. Thanks @HarwayneRelease Note