Skip to content

refactor(management): move the Mongock change units to openframe-saas-tenant - #2828

Merged
semen-flamingo merged 4 commits into
mainfrom
feature/move-mongock-migrations-to-tenant
Oct 30, 2026
Merged

semen-flamingo merged 4 commits into
mainfrom
feature/move-mongock-migrations-to-tenant

Conversation

@semen-flamingo

@semen-flamingo semen-flamingo commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Companion: flamingo-stack/openframe-saas-tenant#4197 (adds everything removed here).

Why

Mongock runs in one place: openframe-saas-management in openframe-saas-tenant (@EnableMongock, migration-scan-package: com.openframe.management.migration). openframe-oss-tenant never enables it. Still, 21 change units lived here in openframe-management-service-core and 9 in the tenant, in the same package, with colliding order values (007, 011, 012 twice here; 013, 014, 015, 016 on both sides), and every migration written here needed a lib release before the tenant saw it. From now on the tenant owns all of them.

What leaves this repo (lands verbatim in #4197)

  • the 21 change units and their 7 unit tests, with id, order, author and runAlways untouched
  • com.openframe.management.systemscript (ManagedScriptDefinition, SystemScriptDefinition, SoftwareScriptDefinition) and the system-scripts/* bodies: read only by seed-system-scripts
  • TicketStatusSeedCatalog from openframe-data-mongo-sync: read only by seed-ticket-statuses
  • dependencies nothing else here used: mongock-springboot-v3, mongodb-springdata-v4-driver, lexorank4j (management-service-core and data-mongo-sync poms), and the root-pom plexus-utils pin that only Mongock pulled in (dependency:tree finds no plexus-utils anywhere now)

SystemScriptCode and SoftwareScriptCode stay: the package-manager bootstrap reads them.

Behaviour on tenants

None. Same package, same class names, same ids and orders, so Mongock's changelog and its sort by (order, class name) see the same set as before. Executed units stay executed. The two runAlways units (archive-stale-devices, seed-system-scripts) keep running from the tenant image. Script bodies are byte-identical, so contentHash does not change and no managed script is refreshed.

Release train

  1. merge this, cut an oss-lib release (7.0.37 … 7.0.48 went out without it; main as of 2026-10-30 is merged in, PR snapshot is 7.0.49-2828-SNAPSHOT)
  2. merge flamingo-stack/openframe-saas-tenant#4197 with the pin on that release

In flight

#2795 still adds EncryptScriptSecretEnvVarsChangeUnit here (order 020, already taken by backfill-notification-read-state-type-and-severity). After this merges it will not compile here: it belongs in the tenant's migration package.

Verified

  • mvn -o install -Drevision=999-SNAPSHOT: green; openframe-data-mongo-sync 398 tests, openframe-management-service-core 25 tests
  • tenant openframe-saas-management built and tested against that 999-SNAPSHOT: 536 tests green (see #4197)
  • feature tenant tenant-4197-93 on the 7.0.37-2828-SNAPSHOT of this branch (before the merges of main): management started, Mongock ran all 30 change units in the expected order with no error, all 7 service pods running (details in #4197)
  • every merge of main since leaves the diff against main at exactly the 52 removed files and the three pom edits

🤖 Generated with Claude Code

https://claude.ai/code/session_011ynKke4PhxdSMdDDKBC44x

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦩 Flamingo Code Review

Not reviewed yet. Reviews start when you ask, so the reviewer reads this pull request when it is ready, not when it is opened.

When it is ready:

  • Review this pull request

Or comment @flamingo-review. Add the flamingo-review-always label to review every push.

🧪 Tests and mutation

Checks

Check Kind Language Project Status Time
Trivy security XML (Trivy) . ✅ passed 8 s
Trivy config security XML (Trivy) . ✅ passed 5.2 s

Updated 2026-10-26 14:37 UTC · workflow run

…-tenant

The SaaS tenant is the only service that runs Mongock (openframe-oss-tenant never enables it), yet 21 of its
change units lived here, in the same package as the 9 the tenant keeps, with colliding `order` values across
the two repos. The tenant now owns every change unit; this drops them here together with what only they used:
the managed-script definitions and their bodies, the ticket-status seed catalog, the Mongock and lexorank
dependencies, and the plexus-utils pin that only Mongock pulled in.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ynKke4PhxdSMdDDKBC44x
@semen-flamingo
semen-flamingo force-pushed the feature/move-mongock-migrations-to-tenant branch from f963afa to 3c10e81 Compare October 26, 2026 14:39
@semen-flamingo semen-flamingo added the no-task PR has no ClickUp task; skips the ClickUp Task check label Oct 26, 2026
@semen-flamingo
semen-flamingo added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 479c1b3 Oct 30, 2026
18 of 19 checks passed
@semen-flamingo
semen-flamingo deleted the feature/move-mongock-migrations-to-tenant branch October 30, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-task PR has no ClickUp task; skips the ClickUp Task check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants