Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Aug 28, 2025

Summary

This PR uses SLACK_TRACE_PLATFORM_RUN_START variable as a signal of an active running app instead of the exact output:

Connected, awaiting events

Fixes an issue where bolt apps were not detected as running.

Requirements

@zimeg zimeg added this to the [email protected] milestone Aug 28, 2025
@zimeg zimeg self-assigned this Aug 28, 2025
@zimeg zimeg added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch pkg:cli-test applies to `@slack/cli-test` labels Aug 28, 2025
@codecov
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.77%. Comparing base (06a3dcf) to head (6f90edf).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2355   +/-   ##
=======================================
  Coverage   92.77%   92.77%           
=======================================
  Files          39       39           
  Lines       10693    10693           
  Branches      692      692           
=======================================
  Hits         9920     9920           
  Misses        761      761           
  Partials       12       12           
Flag Coverage Δ
cli-hooks 95.23% <ø> (ø)
cli-test 94.80% <100.00%> (ø)
oauth 77.39% <ø> (ø)
socket-mode 61.87% <ø> (ø)
web-api 97.99% <ø> (ø)
webhook 96.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

👾 Rambling thoughts on this change but I am open to follow up or updates otherwise!

);
sandbox.assert.calledWith(
waitForOutputSpy,
SlackTracerId.SLACK_TRACE_PLATFORM_RUN_START,
Copy link
Member Author

Choose a reason for hiding this comment

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

🗣️ note: This is preferred over SLACK_TRACE_PLATFORM_RUN_READY since the "ready" variable appears once activity logs stream for CLI managed connections. It does not appear for bolt apps at this time.

👁️‍🗨️ thought: I'm unsure if we should add that trace to the CLI outputs in a follow up PR? For now I think using a trace is still an improvement but I'm somewhat worried about tests skipping to the next step before run is settled for some apps... 🦕

Copy link
Member

Choose a reason for hiding this comment

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

I'm unsure if we should add that trace to the CLI outputs in a follow up PR?

Just checking if I understand correctly - are you thinking that the CLI would print the SLACK_TRACE_PLATFORM_RUN_READY trace for sdk-managed socket connections?

@ewanek1
Copy link

ewanek1 commented Aug 29, 2025

LGTM! Like the more reliable detection of running Slack apps 👏 👏

Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

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

✅ Very healthy fix for Bolt tests! Sorry that this review took 3 weeks! :shame:

);
sandbox.assert.calledWith(
waitForOutputSpy,
SlackTracerId.SLACK_TRACE_PLATFORM_RUN_START,
Copy link
Member

Choose a reason for hiding this comment

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

I'm unsure if we should add that trace to the CLI outputs in a follow up PR?

Just checking if I understand correctly - are you thinking that the CLI would print the SLACK_TRACE_PLATFORM_RUN_READY trace for sdk-managed socket connections?

@zimeg
Copy link
Member Author

zimeg commented Sep 18, 2025

@ewanek1 @mwbrooks Thanks both for the kind reviews. And never worries on a rushed review for this! 👾

Just checking if I understand correctly - are you thinking that the CLI would print the SLACK_TRACE_PLATFORM_RUN_READY trace for sdk-managed socket connections?

Exactly this! I'm not finding such printed at this time, but I'm also not sure if that'd be possible to know for SDK managed connections...

Somewhat following that, I'm hesitant to release this change since it might disrupt our E2E tests if workflows are started after "PLATFORM_RUN_START" and before "PLATFORM_RUN_READY" but we can perhaps wait for the second trace in an explicit step?

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

Labels

bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:cli-test applies to `@slack/cli-test` semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants