Create product routes#1040
Conversation
| self._create_route(self._route_name(service), proxy["sandbox_endpoint"], "apicast-staging") | ||
|
|
||
| def on_proxy_promote(self, service: Service): | ||
| """Creates production OCP route when zync is disabled""" |
There was a problem hiding this comment.
what if route is already created, and service is updated and promoted (no change for route needed)
There was a problem hiding this comment.
If route exists, it's deleted and recreated. Brief downtime during delete+create, but resilient.Request retries cover it.
| if not self._zync_disabled: | ||
| return | ||
| proxy = service.proxy.fetch() | ||
| self._create_route(self._route_name(service), proxy["sandbox_endpoint"], "apicast-staging") |
There was a problem hiding this comment.
does this wait on a route creation? or we count on api_client to retry on 404/503?
There was a problem hiding this comment.
routes.create() is synchronous. It returns once the Route object is created in OCP. Route propagation may take a moment, but api_client uses resilient.Request which retries on 503/404, so that covers it.
| from testsuite.openshift.client import OpenShiftClient | ||
|
|
||
|
|
||
| class SystemApicast(AbstractApicast): |
There was a problem hiding this comment.
I as imagining to have class ZyncLessApicast(SystemApicast): that will just define those lifecyclehooks, as right now rhsso wont work. but if we have another kind, we could update list of apicast kinds for tests that are supported.
There was a problem hiding this comment.
Done — ZyncLessApicast(SystemApicast) is now a separate class in gateways/apicast/zyncless.py with lifecycle hooks. RHSSO works via ZYNC_OIDC_SYNC capability which is absent for ZyncLessApicast, so OIDC tests are automatically skipped.
| zync_routes_disabled = weakget(settings)["threescale"]["zync_routes_disabled"] % False | ||
|
|
||
| if zync_routes_disabled: | ||
| return {Capability.ZYNC_OIDC_SYNC} |
There was a problem hiding this comment.
we don't know here that zync is enabled and will do OIDC for us
There was a problem hiding this comment.
Fixed, I also added check that the route creation is disabled on the zync-que deployment.
No description provided.