You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Re-enable draft_admin_integrity only after deploying real ADMINSERVICE_*_DRAFTS cascade constraints #2993
#2909 enabled CAP 10.2 cds.fiori.draft_admin_integrity: true to get optimized (DB-level cascade) draft deletion. But the required ON DELETE CASCADE.hdbconstraint files were never generated or deployed, so the flag ran with no supporting DB structure and corrupted drafts — every mission draft activate/discard orphaned child draft rows, making missions un-editable in PROD (2026-11-02 outage).
#2992 (merged to DEV) disabled the flag for all profiles and fixed the preflight check (which had been validating non-existent com_sap_developers_ims_*_drafts table names instead of the real ADMINSERVICE_*_DRAFTS). That stops the bleeding but does not deliver the #2909 optimization.
What this issue tracks
Re-enabling draft_admin_integritycorrectly, if we still want the cascade benefit. Required before the flag can be turned back on:
Generate the real cascade constraints. Confirm how cds build emits the ON DELETE CASCADE FK on each ADMINSERVICE_<ENTITY>_DRAFTS.DRAFTADMINISTRATIVEDATA_DRAFTUUID → DRAFT_DRAFTADMINISTRATIVEDATA(DRAFTUUID). If the build does not emit them for HANA, author the .hdbconstraint artifacts explicitly (NOT VALIDATED first, per the deploy-before-serve ordering in CLAUDE.md gotcha "Optimized draft deletion").
Deploy constraints to HANA BEFORE flipping the flag (DEV → prod), on all *_DRAFTS tables that carry the FK column.
Verify via the now-fixed preflight — srv/lib/draft-integrity-preflight.js discovers draft tables from SYS.TABLE_COLUMNS and reports found/total. It must log verified (N/N) (not a WARN) on the target env.
Then set cds.fiori.draft_admin_integrity: true again (package.json) and redeploy.
Add a smoke/integration check that draftEdit→discard on a Mission leaves zero orphaned child draft rows.
Guardrails
Do NOT re-enable the flag until steps 1–3 are green on the target environment.
The runtime CDS_* env override does NOT work on the deployed build (verified during the outage) — the flag state is whatever is baked into package.json at build time.
Update (2026-11-02): the build-time cascade-constraint patch was reverted in #3003 because it blocked every MTA deploy and isn't needed while draft_admin_integrity is off.
Findings for whoever picks up the dad-strategy re-enable:
Inline FK in .hdbtable → HDI error 8250014 "this artifact type must not have references to other objects". Not allowed.
Standalone .hdbconstraint (format confirmed from SAP-samples hana-shine-xsa): got past 8250014, but on a delta deploy to an existing container → HDI error 8212001 "the file requires db://AdminService_X_drafts which is not provided by any file" + 8212012 "Could not compose a consistent make graph." The ON "<table>" clause makes HDI require the base .hdbtable in the same make set, which a delta deploy (unchanged tables not re-provided) doesn't satisfy.
Verified empirically: DRAFT_DRAFTADMINISTRATIVEDATAdoes exist in the HDI container schema (same schema as the draft tables, PK DRAFTUUID) — so the referenced table resolves; the blocker is the base-table make-graph dependency, not the FK target.
Confirmed CAP 10.2.2 / cds-dk 10.2.0 does not emit the cascade FK in the generated .hdbtable even with draft_admin_integrity: true — so a hand-rolled artifact (or a CAP upgrade/config that generates+manages it) is required.
Next step before re-enabling: solve the HDI make-graph co-deploy (force the base .hdbtables into the make set with the constraints, or find the CAP-native mechanism). The flag must stay OFF until a full deploy to a real HANA container succeeds. Orphan cleanup meanwhile: scripts/cleanup-draft-orphans.cjs --commit (#2994).
Activity
Merge pull request #2994 from sap-tutorials/worktree-draft-orphan-cle…
Merge pull request #2999 from sap-tutorials/worktree-draft-integrity-…
Merge pull request #3002 from sap-tutorials/worktree-unblock-disable-…
jung-thomas commentedon Nov 3, 2026
Update (2026-11-02): the build-time cascade-constraint patch was reverted in #3003 because it blocked every MTA deploy and isn't needed while
draft_admin_integrityis off.Findings for whoever picks up the
dad-strategy re-enable:.hdbtable→ HDI error 8250014 "this artifact type must not have references to other objects". Not allowed..hdbconstraint(format confirmed from SAP-sampleshana-shine-xsa): got past 8250014, but on a delta deploy to an existing container → HDI error 8212001 "the file requires db://AdminService_X_drafts which is not provided by any file" + 8212012 "Could not compose a consistent make graph." TheON "<table>"clause makes HDI require the base.hdbtablein the same make set, which a delta deploy (unchanged tables not re-provided) doesn't satisfy.DRAFT_DRAFTADMINISTRATIVEDATAdoes exist in the HDI container schema (same schema as the draft tables, PKDRAFTUUID) — so the referenced table resolves; the blocker is the base-table make-graph dependency, not the FK target..hdbtableeven withdraft_admin_integrity: true— so a hand-rolled artifact (or a CAP upgrade/config that generates+manages it) is required.Next step before re-enabling: solve the HDI make-graph co-deploy (force the base
.hdbtables into the make set with the constraints, or find the CAP-native mechanism). The flag must stay OFF until a full deploy to a real HANA container succeeds. Orphan cleanup meanwhile:scripts/cleanup-draft-orphans.cjs --commit(#2994).Merge pull request #3003 from sap-tutorials/worktree-remove-cascade-p…
Merge pull request #3005 from sap-tutorials/worktree-doc-fix-claude-m…