[#3105] Matched the prod domain placeholder case in the Acquia purge-cache task. - #3118
Conversation
…k-purge-cache-acquia'.
|
Warning Review limit reached
On-demand reviews are free for the next 12 days. After that, they cost $0.25 per reviewed file. Or wait 52 minutes for your next included review. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (2)
Comment |
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
Code coverage (threshold: 90%) Per-class coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3118 +/- ##
==========================================
- Coverage 87.13% 86.77% -0.36%
==========================================
Files 108 101 -7
Lines 5169 5006 -163
Branches 49 3 -46
==========================================
- Hits 4504 4344 -160
+ Misses 665 662 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
📖 Documentation preview for this pull request has been deployed to Netlify: https://6aa08ec9bee5567894364f5c--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
Closes #3105
Summary
.vortex/tooling/src/vortex-task-purge-cache-acquianow strips the$TARGET_ENV_REMAP.and$TARGET_ENV.placeholder tokens from the domain it compiles for theprodenvironment using case-matched patterns, so the domain purged for production isyour-site-domain.exampleinstead ofprod.your-site-domain.example.The two
${domain//pattern/}strip patterns in theprodbranch were lowercase (\$target_env_remap.,\$target_env.) whilehooks/library/domains.txtships the uppercase token$TARGET_ENV_REMAP.your-site-domain.example, and Bash pattern substitution is case-sensitive, so whentarget_envisprodneither pattern matched and the placeholder reacheddomain="$(eval echo "${domain}")", which expands$TARGET_ENV_REMAPby name against the shell variable set toproda few lines earlier.The Acquia purge for
prodnow targets the real production domain instead ofprod.your-site-domain.example, a host that typically does not exist and that the task reported as a skipped missing domain while still exiting successfully; thedev,test, andtest2branches, which intentionally keep their environment prefix, are untouched, and.vortex/tooling/tests/unit/task-purge-cache-acquia.batsadds the script's first BATS coverage so a future token-case change fails the suite instead of passing against a stale fixture.Before / After
Changes
prodbranch of.vortex/tooling/src/vortex-task-purge-cache-acquiato$TARGET_ENV_REMAP.and$TARGET_ENV., matching the case of the tokenhooks/library/domains.txtships and the legacy pre-2022 token some consumer copies may still carry.TARGET_ENV_REMAP/TARGET_ENVuppercase rather than renaming the shell variables to lowercase: the latereval echo "${domain}"resolves the placeholder by name against those variables, so lowercasing them would expand to an empty segment on every environment, not justprod..vortex/tooling/tests/unit/task-purge-cache-acquia.batswith 8 tests driven by the real shippedhooks/library/domains.txt:prodstrips the shipped placeholder,prodstrips the legacy$TARGET_ENV.token,dev/test(remapped tostage) /test2keep their prefixes, an unknown environment compiles no domains, a fullprodpurge completes through the notification-status poll, and the missing-key guard stops before any request.curlcall in the new suite is mocked through theSTEPS/steps_runidiom used byfetch-db-acquia.bats, so the tests run without network access.Screenshots
N/A