Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Jan 30, 2026

Summary

This PR adds a default app and manifest option to file watching for server restarts and app reinstalls.

Following: slackapi/slack-cli#310

Testing

Build these changes with the CLI changes noted above. Then reinstall and reload an app:

$ slack run          # Run an app and keep it running
$ vim manifest.json  # Update the manifest file
$ vim app.py         # Update the app configuration
$ vim listeners/__init__.py  # Confirm nested directories work too

⚠️ Note: The manifest.source of ".slack/config.json" must be local for this to work with manifest changes!

Special notes

CLI version >=3.12.0 is required for these changes to be used in development, but these will be released in order or together if all goes well in review 👾

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_and_run_tests.sh after making the changes.

@zimeg zimeg added this to the 0.2.1 milestone Jan 30, 2026
@zimeg zimeg self-assigned this Jan 30, 2026
@zimeg zimeg requested a review from a team as a code owner January 30, 2026 07:23
@zimeg zimeg added enhancement New feature or request semver:minor labels Jan 30, 2026
@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.68%. Comparing base (49f25d8) to head (973a9b6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #89   +/-   ##
=======================================
  Coverage   94.68%   94.68%           
=======================================
  Files          11       11           
  Lines         207      207           
=======================================
  Hits          196      196           
  Misses         11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

Tested this out locally 🚀 The experience is much better then I expected 🌟

My only concern before merging this is that the CLI seems to be using a keyboard interrupt to stop the process and this is leading to a traceback being printed 🤔 I don't think this traceback should be printed when the CLI does its "refresh"

INFO:slack_bolt.App:Starting to receive messages from a new connection (session id: c946512435)
App change detected: ~/bolt-python-search-template/listeners/functions/search.py, restarting server...
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "~/bolt-python-search-template/.venv/lib/python3.13/site-packages/slack_cli_hooks/hooks/start.py", line 44, in <module>
    start(os.getcwd())
    ~~~~~^^^^^^^^^^^^^
  File "~/bolt-python-search-template/.venv/lib/python3.13/site-packages/slack_cli_hooks/hooks/start.py", line 37, in start
    runpy.run_path(entrypoint_path, run_name="__main__")
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen runpy>", line 287, in run_path
  File "<frozen runpy>", line 98, in _run_module_code
  File "<frozen runpy>", line 88, in _run_code
  File "~/bolt-python-search-template/app.py", line 19, in <module>
    SocketModeHandler(app, os.environ.get("SLACK_APP_TOKEN")).start()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "~/bolt-python-search-template/.venv/lib/python3.13/site-packages/slack_bolt/adapter/socket_mode/base_handler.py", line 58, in start
    Event().wait()
    ~~~~~~~~~~~~^^
  File "/Users/wbergamin/.pyenv/versions/3.13.1/lib/python3.13/threading.py", line 659, in wait
    signaled = self._cond.wait(timeout)
  File "/Users/wbergamin/.pyenv/versions/3.13.1/lib/python3.13/threading.py", line 359, in wait
    waiter.acquire()
    ~~~~~~~~~~~~~~^^
KeyboardInterrupt

Not sure if this is something we could handle on the CLI side 🤔 from my quick search it seems like sending a syscall.SIGTERM to the python process might prevent this tracback log from showing up

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

Labels

enhancement New feature or request semver:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants