[AI] Add host model cache API surface for 5.5.22#4325
Conversation
The VM model-cache feature needs persistent schema rows and generated client surfaces before premium can expose scheduling and cache-management controls. Resolves: ZSTAC-0 Change-Id: I424f987899216872309b42439f8ba8a1353ae505
Host model cache identity and reservation lifecycle fields must be non-null to keep database uniqueness and capacity accounting consistent with the premium VO model. Resolves: ZSTAC-0 Change-Id: Ibbc18ef1436e3ec8366b38c055451fc610fff88a
host cache storage and policy rows are keyed by hostUuid/sourceRoot and are removed through host cascade, so the DDL now rejects null key components instead of relying on nullable unique-key behavior. Resolves: ZSTAC-0 Change-Id: If75425fc43b3ba407b807c7440fe1982b376cf9e
Regenerated ApiHelper after adding host model cache API actions. Resolves: ZSTAC-0 Change-Id: Ic04457599d0e3d3e59d26a7a22156b6785d3e913
Regenerated SDK in verify-case with the premium host model cache branch mounted so update_sdk stays clean. Tested: verify-case ./runMavenProfile premium Tested: verify-case ./runMavenProfile sdk Resolves: ZSTAC-0 Change-Id: I42c8e3c0edc320588097236dc8d207ebfcb8cdce
Add zoneUuid to ModelCenter-derived AI resource SDK inventories and update the 5.5.28 schema migration to persist, backfill, and constrain the zone relation for models, model services, datasets, and model service instance groups. When existing ModelCenter rows do not have zoneUuid, infer a historical default only from deployed inference service VMs and only when all observed VM zones under the same resource agree on one zone. This keeps ModelCenter as the binding point for new behavior while avoiding an arbitrary zone choice during upgrade. Constraint: Source branch must end with @@2 for the linked MR set Rejected: Default to the first ZoneEO row | arbitrary and can bind AI resources to the wrong physical zone Rejected: Leave all historical derived resources NULL when deployed inference VMs reveal a single zone | loses a reliable existing placement signal Confidence: high Scope-risk: moderate Directive: Keep migration inference conservative; do not backfill from mixed-zone deployed services without an explicit product rule Tested: Docker verify container ./runMavenProfile premium Tested: Docker verify container ./runMavenProfile sdk Tested: Restored 172.20.1.159 MySQL backup 2026-06-03_14-30-01 into MySQL 5.7 and ran beforeMigrate.sql plus V5.5.28__schema.sql twice Resolves: ZSTAC-75429 Change-Id: If0a2176680abb9911d63b0281779616215d9a787
Store VmModelMountVO lastAttachedEpoch in database so restore cleanup can distinguish successful asynchronous attach from stale failure callbacks.\n\nTested: docker verify-case runMavenProfile premium\nTested: docker verify-case VmModelMountCase Resolves: ZSTAC-84246 Change-Id: Ib426797059be9401c3e2556ecc31c1879dd04049
Move the lastAttachedEpoch schema change out of the 5.5.16 upgrade file by restoring that file to match the 5.5.16 release branch. The 5.5.22 upgrade file already carries the ADD_COLUMN migration, which keeps the change scoped to the target release. Constraint: 5.5.16 release schema must remain byte-for-byte aligned with upstream/5.5.16 Rejected: Leave the column in V5.5.16__schema.sql | would mutate an already released upgrade file Confidence: high Scope-risk: narrow Tested: git diff --exit-code upstream/5.5.16 -- conf/db/upgrade/V5.5.16__schema.sql Tested: git diff --exit-code upstream/5.5.22 -- conf/db/upgrade/V5.5.22__schema.sql Tested: git diff --check Resolves: ZSTAC-84246 Change-Id: Ibf18c6665d9d3c90361ed7f57d65fc609f6a1bfb
Tighten host cache SDK typing, client-side watermark validation, and null-safe query helper conditions. Resolves: ZSTAC-85984 Change-Id: I86b1215f6698decbe9dfdb0411ba39f42de36c13
Host cache replies now opt in to typed collection generation through SDKGeneric so generated SDK output remains repeatable. The generated action keeps validation on the server side instead of hand-written SDK code that runMavenProfile sdk overwrites. Resolves: ZSTAC-85984 Change-Id: Ic7d27efe4a1551802f725560b3406544b78efa69
|
Warning Review limit reached
More reviews will be available in 4 minutes and 52 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (29)
Warning
|
Use a stable sourceRootIdentity for host cache policy uniqueness and backfill existing rows during upgrade. Resolves: ZSTAC-85984 Change-Id: I4ada66f7436c1c120a06adbca4128e99065bb03c
|
Comment from ye.zou: Pushed follow-up fix Local verification with paired premium branch:
|
Summary
Root Cause
./runMavenProfile sdk.Change
@SDKGenericmarker and SDK generator support for typed collection output.Verification
./runMavenProfile premiumpassed after rebuilding from:aithroughtest-premium.AccessKeyBasicCasepassed with this core branch mounted.mvn -P premium -pl premium/plugin-premium/ai -am install -DskipTests -Djacoco.skip=truepassed.mvn -pl sdk -DskipTests -Djacoco.skip=true compilepassed../runMavenProfile sdkpassed; a later rerun after full local install hit a localzstack-iam2VerifyError during reflections scan, not an SDK compile error.Risk
Resolves: ZSTAC-85984
sync from gitlab !10285