Skip to content

feat: allow multiple CR connections of the same type#1078

Open
tyler-catlin wants to merge 16 commits intomasterfrom
allow-multiple-crs-of-same-type
Open

feat: allow multiple CR connections of the same type#1078
tyler-catlin wants to merge 16 commits intomasterfrom
allow-multiple-crs-of-same-type

Conversation

@tyler-catlin
Copy link

@tyler-catlin tyler-catlin commented Feb 4, 2026

What does this PR do?

This PR adds the capability to route container registry API requests more intelligently, allowing multiple container registries of the same type to exist on a single universal broker. There is also fallback logic if a routing key is not present.

Where should the reviewer start?

The meat of this change is in the websocketConnectionSelectorMiddleware. There are substantial changes to the routing logic for where a request ends up, and this should only affect universal broker setups.

How should this be manually tested?

Not sure... I have set up a legacy broker locally and connected it to pre-prod, but setting up a universal broker locally seems like it is quite a different setup. Help from the team would be appreciated here.

Any background context you want to provide?

This is to support a larger change of supporting multiple registries of the same type in a single org.

Screenshots

Additional questions

@CLAassistant
Copy link

CLAassistant commented Feb 4, 2026

CLA assistant check
All committers have signed the CLA.

@snyk-io
Copy link
Contributor

snyk-io bot commented Feb 4, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@snyk-io
Copy link
Contributor

snyk-io bot commented Feb 4, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@tyler-catlin tyler-catlin force-pushed the allow-multiple-crs-of-same-type branch from 610a38d to ee6ed32 Compare February 5, 2026 15:41
@tyler-catlin tyler-catlin marked this pull request as ready for review February 5, 2026 15:52
@tyler-catlin tyler-catlin requested review from a team as code owners February 5, 2026 15:52
'connection found but type is not CRA-compatible',
);
res
.status(505)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: is this supposed to be a 505? Maybe a 400 would be better?

Copy link
Author

Choose a reason for hiding this comment

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

I agree this is an odd return value, but the reason it's here is because that was the previous behavior.

505 is kind of related to this (version not supported), but I agree that a 4xx is probably the better return code. If we're okay changing the status codes that we're returning here then I can change it, but I'm not sure if that falls under the purview of this change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sensei @pavel-snyk what do you think?

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.

5 participants