MWPW-194144: Add opt-in cascade publishing for references - #912
Conversation
- bulk-snapshot: create pre-publish CF version snapshots with processBatchWithConcurrency - bulk-revert: restore versions and unpublish via /adobe/sites/cf/workflows - bulk-check-modifications: compare fragment modified timestamps against snapshot - Register all three actions in app.config.yaml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use /adobe/sites/cf/fragments/publish with scheduled_deactivation workflow instead of non-existent /adobe/sites/cf/workflows endpoint - Fix STATUS_PUBLISHED/MODIFIED constants to use uppercase (PUBLISHED, MODIFIED) matching AEM CF API response values Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…partial ref publish
- Add includeVariations/includeCards checkboxes to bulk-publish confirm dialog - Update publishBulk client to pass cascade options in request body - IO action computes filterReferencesByStatus from includeVariations||includeCards - publisher.js accepts filterReferencesByStatus param (default DRAFT,UNPUBLISHED) - startPublishing and mas-bulk-publish-editor wire cascade options end-to-end - Add tests for new IO action and publisher behavior Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Switch from sp-dialog-wrapper to sp-underlay+sp-dialog pattern (white background) - Append dialog inside sp-theme for correct Spectrum token inheritance - Add emphasized to Select All checkbox (blue), keep individual items standard - Add ref-item card style (blue-100 background, border-radius) - Fix intro text: "Check items to include" instead of "Uncheck to keep in draft" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
Commits
|
- Adopt project-based architecture: publishBulk now uses projectId - Preserve cascade options (includeVariations/includeCards) through new architecture - Add filterReferencesByStatus logic to runWithProject in IO action - Add MODIFIED status to all filterReferencesByStatus arrays - Fix handleConfirmPublish to use optional chaining on e?.detail Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cards, and variations - snapshot.js: rewrite createSnapshot with recursive BFS — when includeCards is true, follows cards and collections fields at every level of the tree; when includeVariations is true, also includes variations of all in-scope fragments. Visited Set prevents cycles and deduplication. Parameter renamed from includeRefs to includeCards + includeVariations. - index.js: pass includeCards and includeVariations separately to createSnapshot. - confirm-dialog: update labels — CB1 "Include sub-collections & cards", CB2 "Include variations (incl. nested items)"; cascade note simplified. - editor: fix handleConfirmPublish optional chaining for programmatic calls. - tests: update snapshot tests for new params; add recursive, collections-field, and sub-item variation test cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #912 +/- ##
==========================================
+ Coverage 90.25% 90.36% +0.10%
==========================================
Files 303 305 +2
Lines 96845 97382 +537
==========================================
+ Hits 87409 87997 +588
+ Misses 9436 9385 -51
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Add 'NEW' to filterReferencesByStatus so Odin cascade-publishes freshly created fragments (status NEW) when includeCards or includeVariations is enabled. Previously only DRAFT/MODIFIED/UNPUBLISHED fragments were cascade-published, causing newly seeded cards and locale variations to be skipped. Also adds seed-test-data.mjs and cleanup-test-data.mjs scripts for manual testing of the bulk-publish snapshot/revert flow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use snapshot paths as explicit publish targets instead of cascade to include NEW-status fragments that cascade status filter would skip - Add 412/500 retry logic to updateProjectFragment to recover from AEM CDN cache serving stale ETags after a preceding PUT - Serialize fragment paths into snapshot entries so they survive across publish retries - Guard pending snapshot reuse: only reuse if entries contain path field (new format); fall back to fresh snapshot for old-format entries - Enable REVERT during Publishing state when snapshots exist, giving users an escape hatch when a project gets stuck Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… mode When only CB2 (Include variations) was checked without CB1 (Include sub-collections & cards), Odin's cascade was following the collection's `cards` and `collections` references and publishing fragments that were never added to the snapshot. On revert, those extra fragments remained published because they weren't tracked. Root cause: filterReferencesByStatus was enabled whenever includeVariations OR includeCards was true, triggering Odin cascade. But in project mode the snapshot already performs explicit traversal based on the checked flags — cascade must be disabled so the publish scope stays exactly what the snapshot captured. Fix: always use filterReferencesByStatus=[] in runWithProject. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t.js - Add 10 new tests in index.test.js covering project-read error, empty paths, pending snapshot reuse, resolve edge cases, paths/locales validation, and filterReferencesByStatus passthrough in direct mode - Add snapshot.test.js coverage for sub-fragment skip when versionId=null - Apply prettier formatting to long function signatures in snapshot.js, publisher.js, bulk-publish-client.js, bulk-publish-store.js Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@seanchoi0 could you please resolve the conflicts on this? Will try to find time to validate it tomorrow my time. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
- Fix indefinite bulk publish polling: worker was getting 404 on project fragment because masAccessToken (sessionStorage) must be used instead of the plain IMS token; forward aemOdinEndpoint through the dispatch chain so the worker hits the correct AEM environment - Prevent double-dispatch: move publishing store flag before first await in startPublishing so it acts as a synchronous mutex; add early-return guard when project is already in-flight - Skip hydrated references during status polls (skipReferences:true) to avoid repeated ?references=direct-hydrated requests while polling - Fail fast in worker when project has no fragment paths: set FAILED status immediately instead of silently returning published with 0 items - Selection panel: restore opt-in cascade publish dialog for multi-select and resolve fragment refs from field values instead of hydrated refs - Publish dialog: show fragment title and studio path instead of DAM path Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@seanchoi0 Regarding issue No.2 - We should not display AEM paths at any time. We should use the exact same information a user uses to find a variation in the fragments view. Therefore, these paths either need to be removed and leave only Fragment title or the path should be in the format of the fragment path like "merch-card: SANDBOX / Plans v2 / Individual / com / Creative Cloud Individual" or instead of the path just have a link to the fragment that opens in new tab/window. If there is no clear requirement right now, remove the paths, leave only the Fragment title and create a separate follow-up jira to discuss what information beside Title should be shown in this dialog
|
…cale for PZN variations Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Addressed @afmicka's feedback on the publish dialog:
Redeployed to: https://mwpw-194144--mas--adobecom.aem.live/studio.html?io.studio.env=seanchoi Side note — promotions not included in the dialog: `getPublishableReferences()` sources refs from the `variations` field only. Promo variations can also live directly in `references` (without a `variations` field entry), so they're silently skipped. That said, promo variations have their own publish lifecycle managed through the promotions workflow, so excluding them here seems intentional — flagging in case it needs a follow-up. |
@npeltier @3ch023 could you please confirm comment for the promo variations? |
|
@seanchoi0 i am still seeing the issue #1. When i add one fragment to bulk publish and choose to publish only that one fragment, it gets stuck in the infinite loop. Please check what is causing this. On main it works |
I re-deployed AIO and it seems working now.
|
|
@seanchoi0 Cancel button does not work for me in the publish dialog. Could you try? |








Resolves https://jira.corp.adobe.com/browse/MWPW-194144
Add opt-in cascade publishing for fragment references (variations and cards/collections), with snapshot-based tracking for project bulk publish.
Changes
Single fragment publish
Bulk publish — snapshot-based targeting
Resilience improvements
Test coverage
Test URLs
Checklist