1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
Commit Graph

63 Commits

Author SHA1 Message Date
Nuno Góis
39b0c089d1
feat: simpler integration filters (#4766)
https://linear.app/unleash/issue/2-1407/remove-the-all-checkboxes-from-project-and-environment-filters

Simplifies integration event filters by removing the "ALL" checkboxes
from these components. Whether you opted to check the "ALL" checkbox, or
not to filter at all, the result is the same - The selected options
would act as a filter.

Includes some refactoring and clean up.


![image](https://github.com/Unleash/unleash/assets/14320932/2e30c5c5-12e1-4bc6-bd4a-8be4226d625d)
2023-09-20 09:21:30 +01:00
David Leek
bff1bd1026
feat: implement optional json payload and template (#4752)
## About the changes

Adds optional support for specifying JSON templates for datadog message
payload


![image](https://github.com/Unleash/unleash/assets/707867/eb7c838a-7abf-441e-972e-ddd7ada07efa)


### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->

`frontend/src/component/integrations/IntegrationForm/IntegrationParameters/IntegrationParameter/IntegrationParameterEnableWithDropdown.tsx`
- a new component comprising of a text field and a dropdown menu
`src/lib/addons/datadog.ts` - Where the integration is taking place

## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

- Should I have implemented the new component type as a specifiable
addon parameter type in definitions? Felt a bit YAGNI/Premature
- Would like input on naming and the new component etc
2023-09-19 13:08:10 +02:00
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
055cf15262
fix: misc integration-related fixes and improvements (#4754)
https://linear.app/unleash/issue/2-1401/misc-fixes-and-improvements-related-to-the-new-slack-app-integration

This includes multiple UI-related misc fixes and improvements that are
not only related with the new Slack App integration but also
integrations in general.

 - Improves the styling in the "how does it work" section;
 - Improves the text in the `IntegrationMultiSelector`s;
 - Switches "Configure" and "Open" around to match designs;
- Properly handles click event on `IntegrationCardMenu` (fix navigation
on dialog click);
- Fixes titles and contents for "enable/disable" and "delete"
integration dialogs to match designs;
- Updates Slack App integration "how does it work" section to better
reflect the intended behavior;
 - Removes redundant alerts after previous point;
- Adds an alert in the old Slack integration configuration warning of
its deprecation and suggesting the new Slack App integration instead;
 - Fixes typos;
 - Slight refactors;


![image](https://github.com/Unleash/unleash/assets/14320932/17b09742-f00b-4be2-829f-8248ffe67996)

Co-authored by @nicolaesocaciu
2023-09-15 14:50:59 +01:00
Tymoteusz Czech
e8d5f0cf56
fix: integrations text review (#4706)
## About the changes
Update copy

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-09-14 12:01:29 +00: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
Tymoteusz Czech
ed6547b6f1
fix: integrations UI (#4670)
## About the changes
UI adjustments - text, spacing

Co-authored-by: NicolaeUnleash <103567375+NicolaeUnleash@users.noreply.github.com>
2023-09-12 15:45:51 +03:00
Tymoteusz Czech
dbaa386697
feat: Edge integration page (#4657)
## About the changes

![image](https://github.com/Unleash/unleash/assets/2625371/6f4dcf7f-c3cf-45a2-9525-2965c31b6d89)
2023-09-12 14:25:38 +02:00
Tymoteusz Czech
2aa63fbacd
fix: addon schema validation (#4643)
Fix addon schema breaking build
2023-09-08 09:39:57 +00:00
Tymoteusz Czech
dff0420ca8
feat: proxy and edge integration cards (#4636) 2023-09-08 10:45:37 +02:00
Tymoteusz Czech
e97859af91
Integrations form (#4622)
## About the changes
Redesigned/refactored integrations form.


![image](https://github.com/Unleash/unleash/assets/2625371/9f3ad019-e367-4f89-932d-539d7a370f88)

Closes
[1-1298/resesign-of-integrations-form](https://linear.app/unleash/issue/1-1298/resesign-of-integrations-form)
2023-09-07 10:27:46 +00:00
Gastón Fournier
adec9138ea
fix: Add feature environment variants updated event (#4598)
## About the changes
Add additional event that can be configured inside Slack App Addon
2023-09-01 16:54:09 +02:00
Christopher Kolstad
f114aa401a
feat: slack-app can now post to both tagged and default channel (#4520)
Currently the slack-app addon only posts to either the tagged channel
for the feature or the default channels. This PR adds a new field that
will allow you to configure the addon to post to both the default
channels and the tagged channel (s)
2023-08-21 09:00:06 +02:00
Christopher Kolstad
d7c7abdda3
fix: update slack-app tests to reflect what we now do 2023-08-15 13:17:06 +02:00
Christopher Kolstad
4ad370450d
fix: Change slackapp to using scheduleMessage (#4490)
### What
This PR changes the slack-app addon to use slack-api's scheduleMessage
instead of postMessage.

### Why
When using postMessage we had to find the channel id in order to be able
to post the message to the channel. scheduleMessage allows using the
channel name instead of the id, which saves the entire struggle of
finding the channel name. It did mean that we had to move to defining
blocks of content instead of the easier formatting we did with
postMessage.

### Message look

![image](https://github.com/Unleash/unleash/assets/177402/a9079c4d-07c0-4846-ad0c-67130e77fb3b)
2023-08-15 10:29:45 +00:00
Christopher Kolstad
edcbf2acbf
fix: Added cursor pagination to slackapp conversations query (#4442)
We've been struggling with not getting hold of all channels. Reading the
documentation I found the support for next_cursor in the
response_metadata, as long as the response has a next_cursor, there are
responses left, so this PR adds a loop for querying until the next
cursor or the channels list is undefined or `''`. This should solve the
issue Wayfair had as well.
2023-08-08 12:54:32 +02:00
Gastón Fournier
1017260c00
chore: add more debug logs (#4388)
This add more debug logs to help us trace how channels are being
filtered out
2023-08-02 15:03:51 +02:00
Gastón Fournier
55c785c2ff
chore: Add debug information to slack addon (#4379)
Logs to help us debug the addon
2023-08-02 10:33:44 +00: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
Thomas Heartman
fc25bc6b82
Feat(#4205): add potentially stale events to addons (#4279)
This PR adds potentially stale events as available to all addons and
adds a formatted message.

## Discussion

I'd still be interested in hearing input on whether the event type
should be selectable by addons or not before we start emitting the
event. I'm leaning towards "yes", but I'll take your thoughts into
consideration.
2023-07-19 13:52:19 +00: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
Nuno Góis
383e522127
feat: Slack App addon (#4238)
https://linear.app/unleash/issue/2-1232/implement-first-iteration-of-the-new-slack-app-addon

This PR implements the first iteration of the new Slack App addon.
Unlike the old Slack addon, this one uses a Slack App (bot) that is
installed to Slack workspaces in order to post messages. This uses
`@slack/web-api`, which internally uses the latest Slack API endpoints
like `postMessage`.

This is currently behind a flag: `slackAppAddon`.

The current flow is that the Unleash Slack App is installed from
whatever source:
 - Unleash addons page;
 - Direct link;
 - https://unleash-slack-app.vercel.app/ (temporary URL);
 - Slack App Directory (in the future);
 - Etc;

After installed, we resolve the authorization to an `access_token` that
the user can paste into the Unleash Slack App addon configuration form.


https://github.com/Unleash/unleash/assets/14320932/6a6621b9-5b8a-4921-a279-30668be6d46c

Co-authored by: @daveleek

---------

Co-authored-by: David Leek <david@getunleash.io>
2023-07-14 09:49:34 +01:00
Gastón Fournier
b37851acea
chore: Datadog addon, ability to include source type name (#4196)
## About the changes
Include a new configuration parameter to be able to specify
source_type_name. This is an opt-in feature which provides backward
compatibility to our existing users.


![image](https://github.com/Unleash/unleash/assets/455064/0e65584f-f601-4f17-b7a5-e73dae55772e)


Closes #4109 

## Discussion points
Maybe this should be hardcoded to `Unleash` but this gives additional
flexibility
2023-07-10 15:38:53 +02:00
Christopher Kolstad
186fda1657
task: Add customHeaders as possible parameter. (#4139)
###What
Adds an optional sensitive parameter for customHeaders to all current
addons. It is sensitive because the user might be including api key headers.
2023-07-05 09:42:17 +02:00
Nicholas Lydon
4f14549fa1
Detailed slack notifications on feature toggle update (#3155)
## About the changes
Adds more specifics to addon notifications when a flexibleRollout is
updated.

- [x] Specific text for all strategy types
- [x] Add constraint differences for all strategy types 

<!-- Does it close an issue? Multiple? -->
Closes [#3140](https://github.com/Unleash/unleash/issues/3140)
2023-02-27 09:56:56 +00:00
Gastón Fournier
9ea67a74b4
feat: add error logs for addons (#2739)
## About the changes
This uses log-level warning so we can turn off the log without turning
off all error logs. This could potentially be tweaked further by using
log categories in the log configuration.

Closes #2057
2023-01-11 09:13:22 +01:00
Thomas Heartman
8c42fbf34b
Docs(fix): add more (missing) redirects, fix links (#2592)
## What

This PR fixes some broken links we had in the application. It also adds
redirects for those links so that they should work in the future.

## Why

Because it's important to have links that work 💁
2022-12-06 09:32:42 +01:00
Mateusz Kwasniewski
8af64e9370
add events and expose them for webhooks (#2493) 2022-11-22 13:39:15 +01:00
Sebastian Bury
f316e99dca
Authorization header webhook (#2356)
Added unit test and made code prettier in 
webhook.ts
webhook.test.ts
2022-11-09 11:45:30 +01:00
Aneesh Relan
1d5249eddc
fix: slack back link url to point to the feature page (#2128)
* fix: slack back link url to point to the feature page

* update snapshots

* update feature link in case project info is available in event

* update missing snapshot
2022-10-05 11:30:51 +02:00
Christopher Kolstad
8648649047
task: use swc instead of ts-jest (#2042) 2022-09-06 13:22:41 +02:00
Tymoteusz Czech
18fc5eebd2
fix: show addon event select validation (#2031)
* fix: show addon event select validation

* fix: addon form parameters error not clearing

* fix: addon required parameter field indicators
2022-09-05 11:00:59 +02:00
Ivar Conradi Østhus
d711c4749d
fix: correct types used in addon.ts 2022-05-10 09:35:39 +02:00
Connor Teague
e67c0d115b
1568 fix datadog type/value order in addon (#1569) 2022-05-06 09:07:19 +02:00
Christopher Kolstad
3e40cb935e
task: Use make-fetch-happen (#1500)
closes #739
2022-04-28 10:57:52 +02:00
abhinav1708
66c66c7e4a
feat: events for feature tag and untag (#1355) 2022-04-06 20:51:01 +02:00
Ivar Conradi Østhus
8d8d48026d
fix: adjust feature-variant-updated event 2021-12-17 04:30:39 +01:00
Ivar Conradi Østhus
d8478dd928
feat: clean up events (#1089)
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-11-12 13:15:51 +01:00
Ivar Conradi Østhus
8040abb1c4
fix: reuse message formatter for addons (#1058) 2021-10-28 14:09:11 +02:00
Christopher Kolstad
f0dfe204ee
fix: Remove duplicate FEATURE_METADATA_UPDATED from events list for webhook addon (#1052) 2021-10-21 20:54:03 +02:00
Christopher Kolstad
b4b222f4c9
feat: add new more specific feature/environment events to addons (#994)
* feat: add new more specific feature/environment events to addons

* Updated strategy change text

* Update all three addon messages for strategy

* Link to new features view for strategy change text

Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-10-07 10:22:20 +02:00
Christopher Kolstad
efdbda68e4
fix: reduce data in FEATURE_ENVIRONMENT events 2021-09-29 12:58:02 +02:00
renovate[bot]
120eb2b2fa
fix(deps): update dependency js-yaml to v4 (#985)
* fix(deps): update dependency js-yaml to v4

* fix: upgrade to js-yaml v4

* fix: upgrade to js-yaml 4.1.0

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-09-28 20:53:39 +02:00
Ivar Conradi Østhus
cecdd96863
fix: only add strategies to addon texts when available 2021-08-27 10:15:56 +02:00
Ivar Conradi Østhus
2bcdb5ec31
fix: Controller wraps handler with try/catch (#909)
By having the controller perform try/catch around the
handler function allows us to add extra safety to all
our controllers and safeguards that we will always catch
exceptions thrown by a controller method.
2021-08-13 10:36:19 +02:00
Ivar Conradi Østhus
5760d10e70
Revert "fix: upgrade js-yaml to 4.1.0"
This reverts commit 4852d67049.
2021-08-12 23:00:47 +02:00
Ivar Conradi Østhus
4852d67049
fix: upgrade js-yaml to 4.1.0 2021-08-12 22:47:44 +02:00
Christopher Kolstad
ff7be7696c
fix: Stores as typescript and with interfaces. (#902)
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-08-12 15:04:37 +02:00
Christopher Kolstad
3a65847aa7
Migrate to jest (#854)
* Migrate to jest
* Use --force-exit until dns close handle issue https://github.com/facebook/jest/issues/9982

Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-05-28 11:10:24 +02:00