Conversation
…ions Remove published page layout processing from getLayoutOnLoadActionsForPage. The import's actionIdMap maps Git/import IDs, not production IDs, so remapping published layout action IDs corrupts them (sets to null). The published page state should only be updated by the publishPages step during successful deploy.
WalkthroughThe change removes logic that processes published page layouts during import, specifically the iteration and mutation of action IDs and collection IDs within Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
When a CD deployment is rejected by the orphan check (
GIT_CD_PUBLISH_ARTIFACT_FAILURE), the previously deployed published app was being corrupted. ThelayoutOnLoadActionsin the published page's layout — which determines which actions auto-execute on page load — was being mutated with wrong/null action IDs by the import step, before the orphan check had a chance to block the deployment.Root cause:
getLayoutOnLoadActionsForPageinNewPageImportableServiceCEImpl(lines 600-616) processed and mutated the published page'slayoutOnLoadActionsusing the import'sactionIdMap. This map is keyed by Git/import action IDs, but the published layout contains production action IDs from the last successful deployment. The lookupactionIdMap.get(productionId)returns null, corrupting the published layout. The page is then saved via full-documentsaveAll, persisting the corruption before the orphan check runs.Fix: Remove the published page layout processing from
getLayoutOnLoadActionsForPage. Published page state must only be updated by the explicitpublishPagesstep during a successful deploy, never during import.EE Companion PR: https://github.com/appsmithorg/appsmith-ee/pull/8918
Fixes https://linear.app/appsmith/issue/APP-15122/cd-deployment-corrupts-published-apps-layoutonloadactions-even-when
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/24331202801
Commit: 94a4e1c
Cypress dashboard.
Tags:
@tag.AllSpec:
Mon, 13 Apr 2026 08:31:45 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit