Nuno Góis
1dcb33d4e7
fix: simplify channels logic in slack app integration ( #4756 )
...
https://linear.app/unleash/issue/2-1393/drop-the-always-post-to-default-channels-field
This drops the "Always post to default channels" field in the Slack App
integration in favor of always posting to the configured channels. This
should simplify the configuration of this integration.
Here's a breakdown of the logic with this change:
- Always post to the configured Slack channels, regardless of tags;
- Tags are still respected. E.g. if we have a configured channel
"channel-1" and a tag for "channel-2", then we post to both channels;
- As channels are optional, if you would like to skip default channels
for certain events and handle everything through tags, you can just
create a new configuration without any default channels;
This also updates the labels and changes the tests to better reflect the
intended behavior.
![image](https://github.com/Unleash/unleash/assets/14320932/a2427bdd-4b92-44b3-9bad-8adb0f94c34d )
2023-09-18 08:32:37 +01:00
Nuno Góis
ba416e1656
fix: use postmessage in slack app addon ( #4688 )
...
https://linear.app/unleash/issue/2-1392/fix-flaky-unhandled-events
- Reverts part of https://github.com/Unleash/unleash/pull/4490 and uses
`postMessage` instead. This prevents an error where scheduling the
message was flaky and some events ended up not being handled at all (see
screenshot below). As a bonus, this simplifies our code and prevents
having a delay. It seems like this method still works with the channel
name instead of needing an id, which was the main motivation towards the
changes in the aforementioned PR;
- Removes `FEATURE_UPDATED` from the event options for the Slack App
addon, as [this event is
deprecated](https://docs.getunleash.io/reference/environments#addons );
- Adds support for events without a specific project, including a test,
similar to https://github.com/Unleash/unleash/pull/4672
- Misc cleanups;
![image](https://github.com/Unleash/unleash/assets/14320932/3fcd085c-a60f-42f6-9739-b600db7a7cee )
2023-09-14 08:19:38 +01:00
Christopher Kolstad
d7c7abdda3
fix: update slack-app tests to reflect what we now do
2023-08-15 13:17:06 +02:00
Nuno Góis
d6c8493156
feat: slack app addon default channels ( #4308 )
...
https://linear.app/unleash/issue/2-1249/add-support-for-default-slack-channels
Adds support for default Slack channels (multiple, comma-separated).
Some of the events we are handling do not have associated tags, or maybe
the tags are empty. This adds a "default Slack channels" parameter to
the addon configuration in order to post messages to those channels in
those cases.
<img width="643" alt="image"
src="https://github.com/Unleash/unleash/assets/14320932/ee23d6c7-33b7-4968-a0b1-13b546b5b2a2 ">
---------
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2023-07-21 14:15:43 +01:00
Nuno Góis
bb58a516bd
feat: improve slack app addon scalability ( #4284 )
...
https://linear.app/unleash/issue/2-1237/explore-slack-app-addon-scalability-and-limitations
Relevant document:
https://linear.app/unleash/document/894e12b7-802c-4bc5-8c22-75af0e66fa4b
- Implements 30s cache layer for Slack channels;
- Adds error logging;
- Adds respective tests;
- Slight refactors and improvements for overall robustness;
---------
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2023-07-20 13:37:06 +01:00
Nuno Góis
3b20978eb2
test: add some basic tests to the new slack app ( #4259 )
...
https://linear.app/unleash/issue/2-1244/write-some-tests-for-the-new-slack-app-addon
Pretty self-explanatory. These are based on the tests we have for the
other addons.
If you're reading this and have any suggestions of tests we could add at
this stage, please let me know.
Thanks!
2023-07-18 08:12:15 +01:00