Skip to content

[backend] feat(multi-tenancy): xtmhub auto-register, contact-us and clean up PlatformSettings (#5575)#5575

Merged
carinelebas merged 14 commits intorelease/currentfrom
issue/priv/94
Apr 29, 2026
Merged

[backend] feat(multi-tenancy): xtmhub auto-register, contact-us and clean up PlatformSettings (#5575)#5575
carinelebas merged 14 commits intorelease/currentfrom
issue/priv/94

Conversation

@carinelebas
Copy link
Copy Markdown
Member

@carinelebas carinelebas commented Apr 23, 2026

Proposed changes

  • Use new entitiy TenantXtmHubRegistration for auto register and contact us endpoints
  • send tenant id in auto-register
  • clean up now useless registration information in platform settings

Testing Instructions

Auto-register:

  • request an openaev trial on xtmhub, set it to provisioning state with your platform id, get the token.
  • call the autoregister endpoint with curl:
curl -X PUT 'http://localhost:3001/api/xtmhub/auto-register' -d '{"token": "<token>"}'  -H "Content-Type: application/json"  -b '<JSESSIONID cookie>'
  • check default tenant is successfully registered

contact-us:

  • setup a trial license
  • click on 'reach out to sales' in the banner: check the message is successfully sent.

Clean up:

  • check in the network panel, for the settings call, that xtmhub registration information are not sent anymore

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

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...

@carinelebas carinelebas self-assigned this Apr 23, 2026
@carinelebas carinelebas changed the title [backend] feat(Multi-tenancy): Xtmhub auto-register, contact-us and clean up PlatformSettings [backend] feat(Multi-tenancy): Xtmhub auto-register, contact-us and clean up PlatformSettings (#5575) Apr 23, 2026
@carinelebas carinelebas requested a review from Copilot April 23, 2026 14:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Introduces tenant-scoped XTM Hub registration storage and removes legacy XTM Hub registration fields from platform settings, including sending the tenant id during auto-registration.

Changes:

  • Persist XTM Hub registration data in TenantXtmHubRegistration (incl. auto-register + contact-us adjustments).
  • Extend XTM Hub auto-register payload to include tenantId.
  • Remove obsolete XTM Hub registration fields from platform settings + delete legacy keys via Flyway migration.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
openaev-model/src/main/java/io/openaev/database/model/SettingKeys.java Removes unused XTM Hub registration-related setting keys.
openaev-front/src/utils/api-types.d.ts Updates generated frontend types to reflect removed platform settings fields.
openaev-api/src/test/java/io/openaev/xtmhub/XtmHubServiceTest.java Updates unit tests for entity-based registration persistence + tenantId payload.
openaev-api/src/test/java/io/openaev/rest/XtmHubApiTest.java Updates integration test setup for contact-us to use tenant registration entity.
openaev-api/src/main/java/io/openaev/xtmhub/XtmHubService.java Writes registration to TenantXtmHubRegistration; reads default-tenant registration for contact-us.
openaev-api/src/main/java/io/openaev/xtmhub/XtmHubClient.java Adds tenantId parameter and includes it in the auto-register JSON body.
openaev-api/src/main/java/io/openaev/service/PlatformSettingsService.java Removes legacy XTM Hub registration read/write logic from platform settings.
openaev-api/src/main/java/io/openaev/rest/settings/response/PlatformSettings.java Removes XTM Hub registration/token fields from API response model.
openaev-api/src/main/java/io/openaev/migration/V4_99__Remove_xtmhub_settings_keys.java Deletes legacy XTM Hub keys from parameters table after migration to tenant entity.
openaev-api/src/main/java/io/openaev/api/xtmhub/XtmHubApi.java Updates RBAC resource type for auto-register endpoint to XTM_HUB_REGISTRATION.

Comment thread openaev-api/src/main/java/io/openaev/xtmhub/XtmHubService.java
Comment thread openaev-api/src/main/java/io/openaev/xtmhub/XtmHubService.java
Comment thread openaev-api/src/main/java/io/openaev/api/xtmhub/XtmHubApi.java
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.83%. Comparing base (a83fadd) to head (a6223d6).
⚠️ Report is 46 commits behind head on release/current.

Files with missing lines Patch % Lines
...src/main/java/io/openaev/xtmhub/XtmHubService.java 84.61% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##             release/current    #5575      +/-   ##
=====================================================
+ Coverage              63.76%   63.83%   +0.06%     
- Complexity              5825     5828       +3     
=====================================================
  Files                   1145     1146       +1     
  Lines                  34375    34356      -19     
  Branches                2652     2648       -4     
=====================================================
+ Hits                   21920    21930      +10     
+ Misses                 11161    11132      -29     
  Partials                1294     1294              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@carinelebas carinelebas marked this pull request as ready for review April 23, 2026 14:54
Base automatically changed from issue/private/78 to release/current April 24, 2026 12:13
@carinelebas carinelebas changed the title [backend] feat(Multi-tenancy): Xtmhub auto-register, contact-us and clean up PlatformSettings (#5575) [backend] feat(multi-tenancy): Xtmhub auto-register, contact-us and clean up PlatformSettings (#5575) Apr 24, 2026
@antoinemzs
Copy link
Copy Markdown
Member

note #5555 (to be merged to master but will end up on release/current imminently) might have an impact on this patch @carinelebas FYI

@carinelebas carinelebas changed the title [backend] feat(multi-tenancy): Xtmhub auto-register, contact-us and clean up PlatformSettings (#5575) [backend] feat(multi-tenancy): xtmhub auto-register, contact-us and clean up PlatformSettings (#5575) Apr 24, 2026
@carinelebas carinelebas merged commit 63c9e3d into release/current Apr 29, 2026
14 checks passed
@carinelebas carinelebas deleted the issue/priv/94 branch April 29, 2026 07:29
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.

4 participants