Skip to content

MWPW-206153: repair desync variations field in - #1194

Open
yesil wants to merge 3 commits into
mainfrom
MWPW-206153
Open

MWPW-206153: repair desync variations field in#1194
yesil wants to merge 3 commits into
mainfrom
MWPW-206153

Conversation

@yesil

@yesil yesil commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

live copies.

script runs in dry run mode by default, use --apply to write.

Resolves https://jira.corp.adobe.com/browse/MWPW-206153
QA Checklist: https://wiki.corp.adobe.com/display/adobedotcom/M@S+Engineering+QA+Use+Cases

Please do the steps below before submitting your PR for a code review or QA

  • C1. Cover code with Unit Tests
  • C2. Add a Nala test (double check with #fishbags if nala test is needed)
  • C3. Verify all Checks are green (unit tests, nala tests)
  • C4. PR description contains working Test Page link where the feature can be tested
  • C5: you are ready to do a demo from Test Page in PR (bonus: write a working demo script that you'll use on Thursday, you can eventually put in your PR)
  • C.6 read your Jira one more time to validate that you've addressed all AC's and nothing is missing

🧪 Nala E2E Tests

Nala tests run automatically when you open this PR.

To run Nala tests again:

  1. Add the run nala label to this PR (in the right sidebar)
  2. Tests will run automatically on the current commit
  3. Any future commits will also trigger tests as long as the label remains

To stop automatic Nala tests:

  • Remove the run nala label

Note: Tests only run on commits if the run nala label is present. Add the label whenever you need tests to run on new changes.

Test URLs:

Output

~/git/mas/scripts/content  on MWPW-206153 *9 !3 ?1                                                                                                                                                                                                                                                                          INT ✘  at 16:11:57 
❯ node repair-variations.mjs --source c2649d71-baff-496f-806b-98aeab38ba07 --apply
Source /content/dam/mas/acom-dc/en_US/acrobat-pro-individuals
Source variations = []
--apply (writes enabled)
Live copies to process: 38

[ms_MY/acrobat-pro-individuals 45fbdb8b-d12c-41fd-8375-d158c99058ab] variations already equals source — skipping; live copy isSuspended=false
[ar_SA/acrobat-pro-individuals d967a5c3-d467-4f29-8037-4848c5f2ac70] live copy isSuspended=false
[it_IT/acrobat-pro-individuals 044244a7-ccaa-4fa4-b568-6ae073ec69cc] live copy isSuspended=true
[ar_SA/acrobat-pro-individuals d967a5c3-d467-4f29-8037-4848c5f2ac70] OK  variations == source
[en_GB/acrobat-pro-individuals 9f63901e-4502-4841-950a-12b0b9fe66fe] live copy isSuspended=false
[it_IT/acrobat-pro-individuals 044244a7-ccaa-4fa4-b568-6ae073ec69cc] OK  variations == source
[fr_FR/acrobat-pro-individuals 01749364-1766-4d15-a0a5-184b2b368cb5] live copy isSuspended=false
[fr_FR/acrobat-pro-individuals 01749364-1766-4d15-a0a5-184b2b368cb5] OK  variations == source
[en_GB/acrobat-pro-individuals 9f63901e-4502-4841-950a-12b0b9fe66fe] OK  variations == source
[bg_BG/acrobat-pro-individuals 0b88e136-a724-44ad-a52d-d180909e377a] variations already equals source — skipping; live copy isSuspended=false
[cs_CZ/acrobat-pro-individuals 98843b17-d9c0-46dc-9a39-7301a6290ddf] live copy isSuspended=false
[de_DE/acrobat-pro-individuals 7ec0d9ba-2473-4194-947b-ef0614c2e4ff] live copy isSuspended=false
  - [cs_CZ/acrobat-pro-individuals 98843b17-d9c0-46dc-9a39-7301a6290ddf] MISMATCH after write: ["/content/dam/mas/acom-dc/en_US/apcc_direct_individual/pzn/acrobat-pro-subs-cc-individual-mas-locale-ch-it-ch-mas-pzn-country-br-mas-pzn-country-ie"] != []
[el_GR/acrobat-pro-individuals a6b0a3fe-aa2b-4d6b-9792-d50cb07da55c] live copy isSuspended=true
[de_DE/acrobat-pro-individuals 7ec0d9ba-2473-4194-947b-ef0614c2e4ff] OK  variations == source
[da_DK/acrobat-pro-individuals 34fbf7b1-1c85-4b5b-9b6e-4bcdde618365] live copy isSuspended=false
[el_GR/acrobat-pro-individuals a6b0a3fe-aa2b-4d6b-9792-d50cb07da55c] OK  variations == source
[da_DK/acrobat-pro-individuals 34fbf7b1-1c85-4b5b-9b6e-4bcdde618365] OK  variations == source
[es_ES/acrobat-pro-individuals 80e8383c-2557-4816-a5b5-393b75384fbe] live copy isSuspended=false
[et_EE/acrobat-pro-individuals 6982a6c3-61df-42ec-9e2e-dc93b26f567b] live copy isSuspended=false
[es_ES/acrobat-pro-individuals 80e8383c-2557-4816-a5b5-393b75384fbe] OK  variations == source
  - [et_EE/acrobat-pro-individuals 6982a6c3-61df-42ec-9e2e-dc93b26f567b] MISMATCH after write: ["/content/dam/mas/acom-dc/en_US/apcc_direct_individual/pzn/acrobat-pro-subs-cc-individual-mas-locale-ch-it-ch-mas-pzn-country-br-mas-pzn-country-ie"] != []
[fi_FI/acrobat-pro-individuals 43c65f23-10a3-40fc-b375-34c2aa9f8910] live copy isSuspended=false
[fi_FI/acrobat-pro-individuals 43c65f23-10a3-40fc-b375-34c2aa9f8910] OK  variations == source
[fil_PH/acrobat-pro-individuals aca996a3-c2ef-444c-b2c7-347bdac17639] live copy isSuspended=false
[fil_PH/acrobat-pro-individuals aca996a3-c2ef-444c-b2c7-347bdac17639] OK  variations == source
[hi_IN/acrobat-pro-individuals 1b61453a-9f38-4407-b5a2-fddb4e0d5be0] live copy isSuspended=false
[he_IL/acrobat-pro-individuals 623a4820-1ee7-46a0-8667-ad8c2d0f8c48] live copy isSuspended=true
[hu_HU/acrobat-pro-individuals 00084e8b-6e21-4f36-8bc9-0d5d34689138] live copy isSuspended=true
[hi_IN/acrobat-pro-individuals 1b61453a-9f38-4407-b5a2-fddb4e0d5be0] OK  variations == source
[he_IL/acrobat-pro-individuals 623a4820-1ee7-46a0-8667-ad8c2d0f8c48] OK  variations == source
[hu_HU/acrobat-pro-individuals 00084e8b-6e21-4f36-8bc9-0d5d34689138] OK  variations == source
[id_ID/acrobat-pro-individuals 5bee32e7-51ae-4fe3-8d15-1efa477b94bb] live copy isSuspended=true
[id_ID/acrobat-pro-individuals 5bee32e7-51ae-4fe3-8d15-1efa477b94bb] OK  variations == source
[ja_JP/acrobat-pro-individuals 2541a889-cc57-49d0-ab39-74f0d9ca4b3f] live copy isSuspended=false
[ko_KR/acrobat-pro-individuals b32ffdbf-72cd-47e6-8944-288d00e06ec7] live copy isSuspended=true
[ja_JP/acrobat-pro-individuals 2541a889-cc57-49d0-ab39-74f0d9ca4b3f] OK  variations == source
[lt_LT/acrobat-pro-individuals 0d29f34c-3c7a-4ee9-ac44-d7b94d79ddcf] live copy isSuspended=true
[ko_KR/acrobat-pro-individuals b32ffdbf-72cd-47e6-8944-288d00e06ec7] OK  variations == source
  - [lt_LT/acrobat-pro-individuals 0d29f34c-3c7a-4ee9-ac44-d7b94d79ddcf] MISMATCH after write: ["/content/dam/mas/acom-dc/en_US/apcc_direct_individual/pzn/acrobat-pro-subs-cc-individual-mas-locale-ch-it-ch-mas-pzn-country-br-mas-pzn-country-ie"] != []
[lv_LV/acrobat-pro-individuals 0b62c32e-f413-4847-a3a5-328001aca87f] live copy isSuspended=true
  - [lv_LV/acrobat-pro-individuals 0b62c32e-f413-4847-a3a5-328001aca87f] MISMATCH after write: ["/content/dam/mas/acom-dc/en_US/apcc_direct_individual/pzn/acrobat-pro-subs-cc-individual-mas-locale-ch-it-ch-mas-pzn-country-br-mas-pzn-country-ie"] != []
[nb_NO/acrobat-pro-individuals b4042fc2-5a43-46e6-815a-34a042c95934] live copy isSuspended=false
[pl_PL/acrobat-pro-individuals 5c6dc008-65ad-425d-bc70-ba19e3eef921] live copy isSuspended=false
[nb_NO/acrobat-pro-individuals b4042fc2-5a43-46e6-815a-34a042c95934] OK  variations == source
[nl_NL/acrobat-pro-individuals 3066111c-0d46-4382-9e94-e31c205ea1f4] live copy isSuspended=false
[pl_PL/acrobat-pro-individuals 5c6dc008-65ad-425d-bc70-ba19e3eef921] OK  variations == source
  - [nl_NL/acrobat-pro-individuals 3066111c-0d46-4382-9e94-e31c205ea1f4] MISMATCH after write: ["/content/dam/mas/acom-dc/en_US/apcc_direct_individual/pzn/acrobat-pro-subs-cc-individual-mas-locale-ch-it-ch-mas-pzn-country-br-mas-pzn-country-ie"] != []
[pt_BR/acrobat-pro-individuals cedbf933-df3b-4636-b885-fbe162bbee56] live copy isSuspended=true
  - [pt_BR/acrobat-pro-individuals cedbf933-df3b-4636-b885-fbe162bbee56] MISMATCH after write: ["/content/dam/mas/acom-dc/en_US/apcc_direct_individual/pzn/acrobat-pro-subs-cc-individual-mas-locale-ch-it-ch-mas-pzn-country-br-mas-pzn-country-ie"] != []
[pt_PT/acrobat-pro-individuals a887004d-2ee3-4a2c-8864-8ef4f168bb07] live copy isSuspended=false
[ru_RU/acrobat-pro-individuals ca325759-2809-45fe-8524-7ff984d6b14e] live copy isSuspended=false
[pt_PT/acrobat-pro-individuals a887004d-2ee3-4a2c-8864-8ef4f168bb07] OK  variations == source
[ro_RO/acrobat-pro-individuals 3b756ff5-1c68-4171-97e5-02598b0835e4] live copy isSuspended=false
  - [ru_RU/acrobat-pro-individuals ca325759-2809-45fe-8524-7ff984d6b14e] MISMATCH after write: ["/content/dam/mas/acom-dc/en_US/apcc_direct_individual/pzn/acrobat-pro-subs-cc-individual-mas-locale-ch-it-ch-mas-pzn-country-br-mas-pzn-country-ie"] != []
  - [ro_RO/acrobat-pro-individuals 3b756ff5-1c68-4171-97e5-02598b0835e4] MISMATCH after write: ["/content/dam/mas/acom-dc/en_US/apcc_direct_individual/pzn/acrobat-pro-subs-cc-individual-mas-locale-ch-it-ch-mas-pzn-country-br-mas-pzn-country-ie"] != []
[sk_SK/acrobat-pro-individuals 53200346-8bfd-4ecf-963f-8e3bedeb630d] live copy isSuspended=true
[sk_SK/acrobat-pro-individuals 53200346-8bfd-4ecf-963f-8e3bedeb630d] OK  variations == source
[sl_SI/acrobat-pro-individuals e0e38c2a-72da-4d5f-8558-cf4ba78bbe69] live copy isSuspended=false
[sv_SE/acrobat-pro-individuals be9840a8-4be3-4925-854a-88aa7908105f] live copy isSuspended=false
[sl_SI/acrobat-pro-individuals e0e38c2a-72da-4d5f-8558-cf4ba78bbe69] OK  variations == source
[sv_SE/acrobat-pro-individuals be9840a8-4be3-4925-854a-88aa7908105f] OK  variations == source
[th_TH/acrobat-pro-individuals 2339e02c-7a1e-4d5a-8c9f-1d96faaf2b07] live copy isSuspended=false
  - [th_TH/acrobat-pro-individuals 2339e02c-7a1e-4d5a-8c9f-1d96faaf2b07] MISMATCH after write: ["/content/dam/mas/acom-dc/en_US/apcc_direct_individual/pzn/acrobat-pro-subs-cc-individual-mas-locale-ch-it-ch-mas-pzn-country-br-mas-pzn-country-ie"] != []
[tr_TR/acrobat-pro-individuals 1e8f17b1-c97e-4cba-9c13-3e9c9d5270e7] live copy isSuspended=false
[tr_TR/acrobat-pro-individuals 1e8f17b1-c97e-4cba-9c13-3e9c9d5270e7] OK  variations == source
[fr_FR/acrobat-pro-individuals8 ba0d28a7-c937-4c50-b7e9-8afa65009361] variations already equals source — skipping; live copy isSuspended=false
[uk_UA/acrobat-pro-individuals 47b75df9-9df5-41dd-841e-a22cfacc3d81] live copy isSuspended=false
[vi_VN/acrobat-pro-individuals 6e6cdc2b-6ebe-48b1-bb08-657f40af3d2e] live copy isSuspended=false
  - [uk_UA/acrobat-pro-individuals 47b75df9-9df5-41dd-841e-a22cfacc3d81] MISMATCH after write: ["/content/dam/mas/acom-dc/en_US/apcc_direct_individual/pzn/acrobat-pro-subs-cc-individual-mas-locale-ch-it-ch-mas-pzn-country-br-mas-pzn-country-ie"] != []
[vi_VN/acrobat-pro-individuals 6e6cdc2b-6ebe-48b1-bb08-657f40af3d2e] OK  variations == source
[zh_TW/acrobat-pro-individuals 4f62b21e-3fde-45cb-be59-ce7e322e39b2] live copy isSuspended=false
[zh_TW/acrobat-pro-individuals 4f62b21e-3fde-45cb-be59-ce7e322e39b2] OK  variations == source

Done.

 ~/git/mas/scripts/content  on MWPW-206153 *9 !3 ?1                                                                                                                                                                                                                                                                       took 50s  at 16:12:49 
❯ node repair-variations.mjs --source c2649d71-baff-496f-806b-98aeab38ba07        
Source /content/dam/mas/acom-dc/en_US/acrobat-pro-individuals
Source variations = []
DRY-RUN (no writes; pass --apply to write)
Live copies to process: 38

[ms_MY/acrobat-pro-individuals 45fbdb8b-d12c-41fd-8375-d158c99058ab] variations already equals source — skipping; live copy isSuspended=false
[en_GB/acrobat-pro-individuals 9f63901e-4502-4841-950a-12b0b9fe66fe] variations already equals source — skipping; live copy isSuspended=false
[it_IT/acrobat-pro-individuals 044244a7-ccaa-4fa4-b568-6ae073ec69cc] variations already equals source — skipping; live copy isSuspended=false
[bg_BG/acrobat-pro-individuals 0b88e136-a724-44ad-a52d-d180909e377a] variations already equals source — skipping; live copy isSuspended=false
[ar_SA/acrobat-pro-individuals d967a5c3-d467-4f29-8037-4848c5f2ac70] variations already equals source — skipping; live copy isSuspended=false
[cs_CZ/acrobat-pro-individuals 98843b17-d9c0-46dc-9a39-7301a6290ddf] variations already equals source — skipping; live copy isSuspended=false
[de_DE/acrobat-pro-individuals 7ec0d9ba-2473-4194-947b-ef0614c2e4ff] variations already equals source — skipping; live copy isSuspended=false
[fr_FR/acrobat-pro-individuals 01749364-1766-4d15-a0a5-184b2b368cb5] variations already equals source — skipping; live copy isSuspended=false
[da_DK/acrobat-pro-individuals 34fbf7b1-1c85-4b5b-9b6e-4bcdde618365] variations already equals source — skipping; live copy isSuspended=false
[el_GR/acrobat-pro-individuals a6b0a3fe-aa2b-4d6b-9792-d50cb07da55c] variations already equals source — skipping; live copy isSuspended=false
[es_ES/acrobat-pro-individuals 80e8383c-2557-4816-a5b5-393b75384fbe] variations already equals source — skipping; live copy isSuspended=false
[et_EE/acrobat-pro-individuals 6982a6c3-61df-42ec-9e2e-dc93b26f567b] variations already equals source — skipping; live copy isSuspended=false
[fil_PH/acrobat-pro-individuals aca996a3-c2ef-444c-b2c7-347bdac17639] variations already equals source — skipping; live copy isSuspended=false
[fi_FI/acrobat-pro-individuals 43c65f23-10a3-40fc-b375-34c2aa9f8910] variations already equals source — skipping; live copy isSuspended=false
[he_IL/acrobat-pro-individuals 623a4820-1ee7-46a0-8667-ad8c2d0f8c48] variations already equals source — skipping; live copy isSuspended=false
[hi_IN/acrobat-pro-individuals 1b61453a-9f38-4407-b5a2-fddb4e0d5be0] variations already equals source — skipping; live copy isSuspended=false
[id_ID/acrobat-pro-individuals 5bee32e7-51ae-4fe3-8d15-1efa477b94bb] variations already equals source — skipping; live copy isSuspended=false
[hu_HU/acrobat-pro-individuals 00084e8b-6e21-4f36-8bc9-0d5d34689138] variations already equals source — skipping; live copy isSuspended=false
[ko_KR/acrobat-pro-individuals b32ffdbf-72cd-47e6-8944-288d00e06ec7] variations already equals source — skipping; live copy isSuspended=false
[ja_JP/acrobat-pro-individuals 2541a889-cc57-49d0-ab39-74f0d9ca4b3f] variations already equals source — skipping; live copy isSuspended=false
[nb_NO/acrobat-pro-individuals b4042fc2-5a43-46e6-815a-34a042c95934] variations already equals source — skipping; live copy isSuspended=false
[nl_NL/acrobat-pro-individuals 3066111c-0d46-4382-9e94-e31c205ea1f4] variations already equals source — skipping; live copy isSuspended=false
[lt_LT/acrobat-pro-individuals 0d29f34c-3c7a-4ee9-ac44-d7b94d79ddcf] variations already equals source — skipping; live copy isSuspended=false
[lv_LV/acrobat-pro-individuals 0b62c32e-f413-4847-a3a5-328001aca87f] variations already equals source — skipping; live copy isSuspended=false
[pt_BR/acrobat-pro-individuals cedbf933-df3b-4636-b885-fbe162bbee56] variations already equals source — skipping; live copy isSuspended=false
[pl_PL/acrobat-pro-individuals 5c6dc008-65ad-425d-bc70-ba19e3eef921] variations already equals source — skipping; live copy isSuspended=false
[pt_PT/acrobat-pro-individuals a887004d-2ee3-4a2c-8864-8ef4f168bb07] variations already equals source — skipping; live copy isSuspended=false
[ro_RO/acrobat-pro-individuals 3b756ff5-1c68-4171-97e5-02598b0835e4] variations already equals source — skipping; live copy isSuspended=false
[ru_RU/acrobat-pro-individuals ca325759-2809-45fe-8524-7ff984d6b14e] variations already equals source — skipping; live copy isSuspended=false
[sl_SI/acrobat-pro-individuals e0e38c2a-72da-4d5f-8558-cf4ba78bbe69] variations already equals source — skipping; live copy isSuspended=false
[sk_SK/acrobat-pro-individuals 53200346-8bfd-4ecf-963f-8e3bedeb630d] variations already equals source — skipping; live copy isSuspended=false
[sv_SE/acrobat-pro-individuals be9840a8-4be3-4925-854a-88aa7908105f] variations already equals source — skipping; live copy isSuspended=false
[th_TH/acrobat-pro-individuals 2339e02c-7a1e-4d5a-8c9f-1d96faaf2b07] variations already equals source — skipping; live copy isSuspended=false
[uk_UA/acrobat-pro-individuals 47b75df9-9df5-41dd-841e-a22cfacc3d81] variations already equals source — skipping; live copy isSuspended=false
[tr_TR/acrobat-pro-individuals 1e8f17b1-c97e-4cba-9c13-3e9c9d5270e7] variations already equals source — skipping; live copy isSuspended=false
[vi_VN/acrobat-pro-individuals 6e6cdc2b-6ebe-48b1-bb08-657f40af3d2e] variations already equals source — skipping; live copy isSuspended=false
[fr_FR/acrobat-pro-individuals8 ba0d28a7-c937-4c50-b7e9-8afa65009361] variations already equals source — skipping; live copy isSuspended=false
[zh_TW/acrobat-pro-individuals 4f62b21e-3fde-45cb-be59-ce7e322e39b2] variations already equals source — skipping; live copy isSuspended=false

Done.

@aem-code-sync

aem-code-sync Bot commented Sep 1, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.59%. Comparing base (c5da104) to head (3cdc19f).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1194      +/-   ##
==========================================
+ Coverage   90.55%   90.59%   +0.03%     
==========================================
  Files         312      312              
  Lines      100837   100837              
==========================================
+ Hits        91316    91351      +35     
+ Misses       9521     9486      -35     

see 6 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5da104...3cdc19f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yesil

yesil commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

MISMATCH after write

I think it checks too fast and still sees the old value although the change is applied.

@yesil
yesil requested review from honstar and npeltier September 1, 2026 14:29
return;
}

if (!apply) {

@mirafedas mirafedas Sep 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Suspend/resume errors do not include liveCopyId. If resume fail in finally (line 208-213), original write error swallowed, live copy stays suspended, log shows no id/rootPath. Concurrency=4 means logs interleave — operator can't tell which live copy needs a manual fix.
Fix: Embed liveCopyId in error msg:
if (!response.ok) throw new Error(resume ${liveCopyId} -> ${response.status} ${await response.text().catch(() => '')});

@mirafedas mirafedas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with one nit comment

@Axelcureno Axelcureno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran your script in dry-run against the same fragment: all 38 are [] and unsuspended, so those 10 MISMATCH errors were just AEM's read lagging the write. Worth a retry before throwing, since right now a clean run still exits 1.

Also, from repo root the .env lookup hits mas/.env first and never sees scripts/content/.env, so it only works if you cd in. And dotenv is in package.json but unused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants