jenkinsci / slack-plugin

A Jenkins plugin for posting notifications to a Slack channel
https://plugins.jenkins.io/slack/
MIT License
670 stars 413 forks source link

Introduce a channel name to ID cache #965

Closed timja closed 4 months ago

timja commented 4 months ago

Fixes https://github.com/jenkinsci/slack-plugin/issues/964

Testing done

Tested on a large workspace (~1900 channels) where this only worked for 1 file upload before it got rate limited before. It now works as long as you don't clear the cache and then immediately try upload a file.

I added in some functionality to refresh when a channel isn't found so that new channels are picked up immediately, to de- risk it I made it not invalidate the old cache on errors.

I've tested it quite thoroughly, but its quite painful, really annoying of slack to implement it like this...

### Submitter checklist
- [ ] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [ ] Ensure that the pull request title represents the desired changelog entry
- [ ] Please describe what you did
- [ ] Link to relevant issues in GitHub or Jira
- [ ] Link to relevant pull requests, esp. upstream and downstream changes
- [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue
sebaturen commented 4 months ago

Hi! This update removes the possibility to upload files under the threads using threadId from the last message sent. Is this intentional, or am I missing the option to use threadId again?

timja commented 4 months ago

Hi please create an issue with steps to reproduce.

I am able to upload files in threads using the instructions in the README