Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Description <!--Add a description of your PR here--> This updates the Slack ``--log-service`` feature added in #170. The ``Slacker`` package is no longer maintained, and legacy slack tokens are no longer generatable. I've replace it with the officially supported [Slack SDK](https://github.com/slackapi/python-slack-sdk) (see ``setup.cfg``), preserving the original functionality with minimal adjustments. This has been minimally tested for functionality. However, the original implementation has a couple issues (which this PR **does not** address) - 1. Lack of `docs/` on how to set up the ``--log-service slack`` feature via Slack 2. Logic is not robust - e.g. when `msg["done"] == msg["total"]`, this does not mean the workflow is complete (checkpoints) 3. The implementation of ``--log-service slack`` is synchronous, meaning that Snakemake workflows will wait for the implemented `log_handler` function to finish. For normal print statements, this isn't an issue, but repeated calls of Slack WebAPI's `postMessage` can significantly slow things down. Depending on the workflow (Snakefile), this can become noticeable. 4. The implementation does not comply with Slack WebAPI's rate limiting. The current implementation will look like this - messages on slack are sent by the user, using a user OAuth token. ![image](https://github.com/snakemake/snakemake/assets/43220811/69e3b335-13fc-4af1-8538-8d65920f9494) I've already addressed points 2, 3, and 4 in a private repository using ``--log-handler`` that should be integrable into this current implementation, but it has not been robustly tested (integration can happen at a later PR). ![image](https://github.com/snakemake/snakemake/assets/43220811/97576f52-1c46-4237-806a-e823bd76f9f7) Thanks! ### QC <!-- Make sure that you can tick the boxes below. --> * [ ] The PR contains a test case for the changes or the changes are already covered by an existing test case. * [ ] The documentation (`docs/`) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake). --------- Co-authored-by: Johannes Köster <johannes.koester@tu-dortmund.de>
- Loading branch information