Repository navigation
fix(cli-test): stop the output wait timeout from killing run and activity --tail - #2865
Conversation
…vity --tail execAsyncUntilOutputPresent passed its shell options, timeout included, to spawnProcess. Node's child.spawn then sent SIGTERM to the Slack CLI once the timeout passed, even after the expected output arrived. The timeout now goes only to waitForOutput. Fixes #2864
🦋 Changeset detectedLatest commit: 689dbc4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2865 +/- ##
==========================================
- Coverage 94.33% 94.32% -0.01%
==========================================
Files 67 67
Lines 10824 10826 +2
Branches 676 677 +1
==========================================
+ Hits 10211 10212 +1
- Misses 580 583 +3
+ Partials 33 31 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
srtaalej
left a comment
There was a problem hiding this comment.
Confirmed the new test fails against main's cli-process.ts (12 pass / 1 fail) and passes with this change. The full @slack/cli-test suite passes (109/109) ✅ Splitting timeout out of the spawn options is the right fix, and the changeset reads well. The codecov/project check is red but that looks like project-level drift and not this diff. LGTM!
|
Thanks @srtaalej for the review and for checking that the new test fails against |
Summary
This pull request keeps
slack runandslack activity --tailrunning in tests after their output arrives, for developers who useplatform.runStartandplatform.activityTailStartfrom@slack/cli-test. Fixes #2864.SlackCLIProcess.execAsyncUntilOutputPresentpassed itstimeouttochild.spawnas well as toshell.waitForOutput, so Node sentSIGTERMto the process once the timeout passed.timeoutnow goes only toshell.waitForOutput. Other shell options, such ascwd, still reach the process.child.spawngets notimeout, with a patch changeset.Testing
main(child.spawngetstimeout) and passes with this change.cli-process.test.tsruns all 13 tests (the 12 frommainand the new one) andshell.test.tsruns all 12.Requirements