MWPW-199041: bulk-edit find IO action#987
Conversation
…400/everywhere paths
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
Commits
|
|
SNOW Change Request Transaction ID [IO]: 0000019c1eec85a3-13f8a5e2 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #987 +/- ##
==========================================
+ Coverage 89.59% 89.95% +0.36%
==========================================
Files 273 282 +9
Lines 84441 88978 +4537
==========================================
+ Hits 75653 80042 +4389
- Misses 8788 8936 +148
... and 25 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Axelcureno
left a comment
There was a problem hiding this comment.
nice! runId cancel and CSV formula escaping are clean.
two things:
search.jshasfragmentTitleinSCOPE_FIELDSandmatchEverywherereturns title hits — but PR description says title is excluded. stale or accidental?patchJobis non-atomic but fine since workers are sequential. tiny race on force-refresh self-heals viarunIdmismatch. nbd.
Cards/collections-only search, scoped field matching, CSV upload alias matching, presigned exports, 7-day cache, and find-worker finalization. Replace stays on MWPW-199042. Co-authored-by: Cursor <cursoragent@cursor.com>
Require replace on find POST, drop replace from CSV export/upload, and align export pipeline, docs, and tests. Replace execution stays on 199042. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Adds the bulk-edit-find Adobe I/O Runtime API — the Find stage of M@S bulk Find & Replace. Studio (MWPW-191300) and operators can start a cross-fragment text search, poll job progress, download match exports (JSON + CSV), upload an edited CSV subset, and remove the upload to restore full results. Replace lands separately in MWPW-199042 / PR #999.
Search targets card and collection fragments only — dictionary entries are excluded.
Two-stage search: Odin CF Search API does recall (
path+fullText+ optionaltags/status, cursor-paged viafetchOdin), then the find worker does precision matching viaSCOPE_FIELDS.*scans scoped fields only (not arbitrary CF fields). Fragment title is searchable (fragmentTitlescope or*); fragment name is never matched.API
Base URL:
https://14257-masstudio-yesil.adobeioruntime.net/api/v1/web/MerchAtScaleStudio/bulk-edit-findAuth:
Authorization: Bearer <mas-studio IMS token>(seeio/studio/.env→MAS_TOKEN)POST{ find, surface, … }202 { jobId, reused }GET?jobId=exportReady, body includes presignedexports.json+exports.csvURLsPOST?jobId=+ CSV body (multipart ortext/csv)DELETE?jobId=POST find parameters
find,surfacesearchIn(*default, orprices,ctas,calloutText,productDescription,promoText,subtitle,fragmentDescription,fragmentTitle,tags, or array of scopes),locale(string or array),tags,status,matchCase,forceRefresh,supersedes(cancels a prior RUNNING job)GET poll response
{ "jobId": "abc…", "type": "find", "status": "DONE", "done": true, "total": 42, "report": { "total": 42, "byLocale": { "en_US": 30, "fr_FR": 12 } }, "filteredByUpload": false, "exportReady": true, "exports": { "json": "https://…presigned…", "csv": "https://…presigned…" } }Result rows are not inline in the poll body — follow the presigned
exportsURLs (no IMS auth on redirect)..json/.csvsuffixes onjobIdreturn400.CSV upload rows match by
(fragment_id, field, find)with scope/field aliases (e.g.productDescription↔cardTitle). Omitted rows are excluded from exports until upload is removed.Architecture
bulk-edit-find— web action: auth, job lifecycle, poll/upload/delete, export regenerationbulk-edit-find-worker— async worker (60 min timeout): Odin search +findMatches, writes exports on completionexport.js— Adobe I/O Files presigned JSON/CSV exports (24 h URLs)supersedes+forceRefreshcancel an in-flight RUNNING job before re-run;forceRefreshalso clears uploads and exportsLocal tooling
io/studio/requests.http— REST Client examplesio/studio/src/bulk-edit/README.md— API referencescripts/content/bulk-edit-find.mjs— run find in-process against I/O StateOut of scope
bulk-edit-replace→ MWPW-199042 / PR #999Resolves https://jira.corp.adobe.com/browse/MWPW-199041
QA Checklist: https://wiki.corp.adobe.com/display/adobedotcom/M@S+Engineering+QA+Use+Cases
io/studio;npm test -- --grep bulk-edit)requests.http)Test plan
Endpoint:
https://14257-masstudio-yesil.adobeioruntime.net/api/v1/web/MerchAtScaleStudio/bulk-edit-findUse
io/studio/requests.httpor curl withMAS_TOKENfromio/studio/.env.POSTwith{ "surface": "sandbox", "find": "firefly", "searchIn": "*", "matchCase": false }→202 { jobId, reused }GET ?jobId=<jobId>untildone: trueandexportReady: true; confirmexports.json/exports.csvpresigned URLs and per-localereportcardTitle,fragmentTitle)POST ?jobId=<jobId>(multipart) → poll showsfilteredByUpload: trueand reducedtotalDELETE ?jobId=<jobId>→filteredByUpload: false, fulltotalrestoredPOSTfind params →reused: true; add"forceRefresh": true→ worker re-runs, uploads/exports clearedsearchIn,tags,status,matchCase(seerequests.http)Test URLs
Bulk-edit find API (yesil workspace): https://14257-masstudio-yesil.adobeioruntime.net/api/v1/web/MerchAtScaleStudio/bulk-edit-find
Requires
Authorization: Bearer <mas-studio IMS token>. No rendered test page — exercise via REST Client (io/studio/requests.http) or curl.