[#3108] Closed every 'task' output helper with a matching 'pass' or 'fail'. - #3121
Conversation
…he shipped scripts.
|
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 2 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 (16)
Comment |
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
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 #3121 +/- ##
==========================================
- 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://6aa09a9413cf8f28286f33b8--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
Closes #3108
Summary
vortex-deploy-lagoon,vortex-deploy-artifact,vortex-export-db-image,vortex-push-container-registry,vortex-setup-ssh,vortex-task-copy-db-acquia,vortex-task-copy-files-acquia,vortex-task-purge-cache-acquia, andvortex-fetch-db-acquianow close everytaskthey open with exactly onepassorfailon every code path, matching the rule stated in.vortex/CLAUDE.mdand.vortex/docs/content/contributing/maintenance/template.mdx.An audit of
.vortex/tooling/src/found ten sites that left ataskunclosed, closed it conditionally, or reopened it inside a loop iteration - the fourvortex-deploy-lagoondeploy sites guarded their closingpassbehind[ "${exit_code}" = "0" ]and fell back to a script-finalfail "Lagoon deployment completed with errors."that named no step, whilevortex-fetch-db-acquiacould emitpass "Backup completed successfully."inside the wait loop and then stillfail "Backup creation timed out ..."for the same task when a backup finished on the poll that exhaustedelapsed -ge max_wait.A failed Lagoon deploy or redeploy now fails through the new
close_deploy()helper with a message naming the specific request (e.g.Failed to request redeployment of environment: project: X, branch: Y.) instead of the generic end-of-script line, andvortex-provision's double close oftask "Running database updates."on the config-verification path is deliberately left alone because it is a double close rather than a missing one and its output is captured in the publishedbuildandprovisiondemo videos.Before / After
Changes
vortex-deploy-lagoon- addedclose_deploy()to close each deploy task withpass "Requested <what>"on success, ordeploy_errorplusfail "Failed to request <what>"on failure; moved theVORTEX_PROVISION_OVERRIDE_DBrestore ahead of that check in both redeploy branches and switched it tonote; removed the now-unreachable script-final failure block.vortex-deploy-artifact- addedpass "Ran artifact builder."to closetask "Running artifact builder.", which was previously closed only by the laterpass "Finished artifact deployment."banner.vortex-export-db-image- promoted thenotereportingtask "Exporting database image archive to file ..."'s outcome topass, keeping the message text unchanged since.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.phpasserts it verbatim.vortex-push-container-registry- changed the per-servicetask "Processing service ..."wrapper and its closing line tonote, leaving the commit and pushtask/passpairs as siblings instead of nesting under it.vortex-setup-ssh- collected the fingerprint match intomatched_filesotask "Searching for MD5 hash ..."closes once after the loop on both the match and no-match paths; changedtask "SSH agent does not have a required key loaded. Trying to load."tonoteand addedtask "Loading key ${file} into the SSH agent."immediately beforessh-add.vortex-task-copy-db-acquia,vortex-task-copy-files-acquia,vortex-task-purge-cache-acquia- changed the token-refreshtask "Retrieving authentication token."inside each retry loop tonote "Refreshed authentication token."; changed the hand-rolledecho -n " > Checking task status: "prefix to thenoteindent viaprintf.vortex-fetch-db-acquia- added abackup_completedflag sotask "Waiting for backup to complete."closes exactly once; movedpass "Backup completed successfully."after thebackup_completedguard, replacing theelapsed -ge max_waitcheck that could still fire after a backup completed on the poll that exhausted the wait budget..vortex/CLAUDE.md,.vortex/docs/content/contributing/maintenance/template.mdx- documented the task closure rule as exactly onepassorfailpertaskon every path, that ataskmust not open while another is open (loop iterations usenote), that the rule is one-directional so a check or a skip may reportpassorfailon its own, and corrected the rationale for sourcing another Vortex script instead of sub-processing it.deploy-lagoon.batsfailure expectations to the per-step message and renamed the "deploy error survives" test; added the newRan artifact builder.line todeploy-artifact.batsandDeploymentTest.php; added afetch-db-acquia.batscase for a backup completing on the last allowed poll; added asetup-ssh.batscase for a SHA256 fingerprint with no matching key file.