-
Notifications
You must be signed in to change notification settings - Fork 592
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
Make Broker availability based on the Endpoints not Deployments. #2766
Make Broker availability based on the Endpoints not Deployments. #2766
Conversation
Today the fact that the Broker lifecycle stuff propagates *Deployment* status for filter/ingress leaks implementation details into the API types. An example of where this leakage is bas would be if I were to run a multi-tenant broker (knative#2760) as something other than a Deployment. This change corrects one small part of this leaky interface by shifting from Deployment to Endpoints as the canonical resource for establishing readiness. This is also slightly more correct as it assesses not just whether the Deployment is ready, but whether that information has propagated to the Service / Endpoints.
The following is the coverage report on the affected files.
|
/lgtm |
Is this an API purity concern or a user concern? Can you give more details on the user impact of leaking the implementation detail? The Go type hasn't changed here, so I'm not sure which API type you're referring to. Does the switch to using endpoint availability from deployment availability change the meaning of Broker readiness? I.e. from a user perspective, if the Broker is ready, can I make the same assumptions about its state as before? If not, is the new set of assumptions more accurate or better for the user? |
/retest (this test seems to be flaky on testgrid)
Many levels of API 🐢 . Specifically I'm talking about the fact that in a class-based world the API exposed for folks to manipulate Broker status is perhaps overly fitted to our current implementation. Frankly even the notion of distinct ingress and filters is somewhat leaky of implementation details.
In practice, this should be effectively the same. In theory, this is more correct as I would interpret readiness to mean that if I POST to the Happy to discuss more in whatever medium makes the most sense, this is just something I noticed looking over #2760 and wanted to lend a hand. |
As far as the Conditions, the user should only rely on the status.Ready as whether the Broker is good to go or not, Overall, the Broker Spec does not talk about any of these, nor should it. And from that spec:
So this is definitely a more better change. |
Well, what I said about the sub-conditions applies indirectly to how it manifests in Ready too. @grantr do you have [other] concerns you'd like to discuss? |
Ok, IIUC you're talking about the Go API (for contributors), not the content of the object's status (for users).
I'm not super familiar with the relationship between Service and Endpoints. Does a pod ip only make it into Endpoints if it's confirmed ready via liveness/readiness? Concretely it seems like you're saying that the sequence is normally
And never
It's this second one that would be a behavior change, because it moves the readiness earlier than before. If, after this change, the user can be more sure that a Ready Broker is available to receive requests, then 👍. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattmoor, n3wscott, vaikas 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 |
There are two sections
Just to be super nit picky / pedantic the flow of readiness is:
It is possible that an Endpoints is ready before the Deployment has reported ready, but this is fine because the Deployment isn't actually what matters. It is possible that a Deployment is ready before the Endpoints has ready addresses, which is a potential bug with what is at HEAD today.
Yeah that's exactly what I'm saying. In practice this is likely a small change, but in theory a race exists today. |
This has been out for a while, and I believe we've resolved concerns. Going to land to unblock @vaikas's PR. /unhold |
/test pull-knative-eventing-integration-tests |
Today the fact that the Broker lifecycle stuff propagates Deployment status for filter/ingress leaks implementation details into the API types. An example of where this leakage is bas would be if I were to run a multi-tenant broker (#2760) as something other than a Deployment.
This change corrects one small part of this leaky interface by shifting from Deployment to Endpoints as the canonical resource for establishing readiness.
This is also slightly more correct as it assesses not just whether the Deployment is ready, but whether that information has propagated to the Service / Endpoints.
/hold
/assign @vaikas @lionelvillard @grantr