[backend/frontend] feat(xtmhub): send tenant name in register and refresh connectivity (#5615)#5624
Open
carinelebas wants to merge 23 commits intorelease/currentfrom
Open
[backend/frontend] feat(xtmhub): send tenant name in register and refresh connectivity (#5615)#5624carinelebas wants to merge 23 commits intorelease/currentfrom
carinelebas wants to merge 23 commits intorelease/currentfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the XTM Hub registration/connectivity payloads to include the current tenant name so XTM Hub can display it and keep it updated when connectivity is refreshed.
Changes:
- Add
tenantName/tenant_nameto XTM Hub register (FE redirect), auto-register (BE → Hub), and refresh-connectivity (BE → Hub) payloads. - Ensure refresh-all-tenants payloads can include tenant names by carrying
tenantNamethroughTenantRegistrationDetails. - Fetch tenant data alongside registrations to access the tenant name during refresh operations.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
openaev-model/src/main/java/io/openaev/database/repository/TenantXtmHubRegistrationRepository.java |
Adjusts query to fetch the associated Tenant when listing registrations. |
openaev-front/src/admin/components/settings/experience/xtm_hub/XtmHubTab.tsx |
Adds tenant_name to the XTM Hub redirect query params; uses URL-derived tenant id. |
openaev-api/src/test/java/io/openaev/xtmhub/XtmHubServiceTest.java |
Updates service construction/mocks and asserts tenantName is present in Hub payloads. |
openaev-api/src/main/java/io/openaev/xtmhub/XtmHubService.java |
Resolves tenant name for auto-register and includes tenant name in refresh-connectivity calls. |
openaev-api/src/main/java/io/openaev/xtmhub/XtmHubClient.java |
Extends GraphQL request builders to send tenantName for auto-register and refresh operations. |
openaev-api/src/main/java/io/openaev/xtmhub/TenantRegistrationDetails.java |
Extends record to carry tenantName for all-tenants refresh payload. |
Comments suppressed due to low confidence (1)
openaev-api/src/main/java/io/openaev/xtmhub/XtmHubClient.java:186
- issue (blocking):
buildRefreshStatusSingleTenantBody()builds the GraphQL JSON payload viaString.format(...)and now interpolatestenantName. Tenant names can legally contain quotes/newlines/backslashes, which will produce invalid JSON and make the refresh call fail (the JsonParser parse will throw). Prefer building the body withJsonObject/addProperty(likebuildAutoRegisterBodyandbuildRefreshStatusAllTenantsBody) so values are correctly escaped, or explicitly JSON-escape all interpolated fields before formatting.
String mutationBody =
String.format(
"""
{
"query": "
mutation refreshPlatformRegistrationConnectivityStatusSingleTenant($input: RefreshPlatformRegistrationConnectivityStatusSingleTenantInput!) {
refreshPlatformRegistrationConnectivityStatusSingleTenant(input: $input) {
status
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/current #5624 +/- ##
======================================================
- Coverage 64.67% 40.50% -24.18%
- Complexity 6067 6069 +2
======================================================
Files 1159 2118 +959
Lines 35020 56713 +21693
Branches 2711 7184 +4473
======================================================
+ Hits 22650 22970 +320
- Misses 11045 32400 +21355
- Partials 1325 1343 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
corinnekrych
requested changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Send the name of the tenant in register/auto-register/refresh connectivity endpoints so it can be displayed on xtmhub.
Testing Instructions
To be tested with xtmhub local or feature env https://dev-pr-2249.hub.staging.filigran.io/app
Related issues
Checklist
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...