Skip to content

Create product routes#1040

Open
mastastny wants to merge 8 commits into
3scale-qe:mainfrom
mastastny:create-routes
Open

Create product routes#1040
mastastny wants to merge 8 commits into
3scale-qe:mainfrom
mastastny:create-routes

Conversation

@mastastny

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread testsuite/gateways/apicast/system.py Outdated
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"""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what if route is already created, and service is updated and promoted (no change for route needed)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

If route exists, it's deleted and recreated. Brief downtime during delete+create, but resilient.Request retries cover it.

Comment thread testsuite/gateways/apicast/system.py Outdated
if not self._zync_disabled:
return
proxy = service.proxy.fetch()
self._create_route(self._route_name(service), proxy["sandbox_endpoint"], "apicast-staging")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

does this wait on a route creation? or we count on api_client to retry on 404/503?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

@mastastny
mastastny marked this pull request as ready for review July 1, 2026 07:42
Comment thread doc/GATEWAYS.md Outdated
Comment thread testsuite/capabilities/providers.py Outdated
zync_routes_disabled = weakget(settings)["threescale"]["zync_routes_disabled"] % False

if zync_routes_disabled:
return {Capability.ZYNC_OIDC_SYNC}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we don't know here that zync is enabled and will do OIDC for us

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed, I also added check that the route creation is disabled on the zync-que deployment.

Comment thread testsuite/tests/conftest.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants