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

1218 Commits

Author SHA1 Message Date
Mateusz Kwasniewski
d49ff03464
feat: delete all feature dependencies (#4832) 2023-09-26 09:38:34 +02:00
Fredrik Strand Oseberg
b919c445b4
feat: add kill switch for client metrics (#4829)
This PR adds a killswitch for client metrics that we can use to disable
metrics in our cloud offering.
2023-09-26 09:37:42 +02:00
Mateusz Kwasniewski
a9805b312b
feat: Delete dependency api (#4824) 2023-09-25 15:50:05 +02:00
Jaanus Sellin
2bf995e731
feat: context/segment usage private (#4826) 2023-09-25 15:50:44 +03:00
Jaanus Sellin
c84f39ad7c
fix: project mode count even if no settings exist (#4825) 2023-09-25 12:44:02 +03:00
Jaanus Sellin
f7d87a2339
feat: add project collaboration mode to prometheus (#4819) 2023-09-25 12:07:59 +03:00
Mateusz Kwasniewski
06ea70ef00
feat: enforce no transitive parents (#4818) 2023-09-25 10:12:32 +02:00
Nuno Góis
b9946ee35c
docs: Unleash Slack App integration (#4801)
https://linear.app/unleash/issue/2-1235/docs-slack-app-integration-documentation

This adds a new reference doc for the new Unleash Slack App integration
and marks the previous Slack integration as deprecated.

As a side-effect this PR also fixes an issue where we wouldn't be able
to delete tags with special characters.

---------

Co-authored-by: David Leek <david@getunleash.io>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-09-22 23:19:17 +01:00
Nuno Góis
91edae3ccf
refactor: contract event group deleted after #4816 (#4817)
As mentioned in
https://github.com/Unleash/unleash/pull/4816#discussion_r1334162284
2023-09-22 12:57:09 +01:00
Nuno Góis
b6b0f83e3d
feat: add group-deleted event (#4816)
Adds a missing `group-deleted` event.
2023-09-22 11:04:46 +01:00
Mateusz Kwasniewski
b4742df8be
feat: UI stub for adding dependent features (#4814) 2023-09-22 11:26:45 +02:00
Jaanus Sellin
ac018447f9
feat: optimize private projects for enterprise (#4812) 2023-09-22 11:54:33 +03:00
Nuno Góis
7eae1f8382
fix: datadog addon needs flagResolver (#4806)
Fixes what this breaks: https://github.com/Unleash/unleash/pull/4765 -
The Datadog integration needs a `flagResolver`.
2023-09-21 15:07:24 +02:00
Nuno Góis
ea9901c968
chore: GA (remove flag) for Slack App integration (#4765)
https://linear.app/unleash/issue/2-1405/remove-slackappaddon-feature-flag-and-make-this-ga

GA's the new Slack App integration by removing the feature flag 🚀
2023-09-21 13:55:58 +01:00
Jaanus Sellin
5e6ed0baac
feat: private projects handle in playground (#4791) 2023-09-21 11:22:29 +03:00
Tymoteusz Czech
18f7d0f9e1
Remove integrationsRework flag (#4770)
https://linear.app/unleash/issue/1-1359/remove-integrationsrework-flag
2023-09-20 16:27:40 +02:00
Mateusz Kwasniewski
85c7f84f8d
feat: Client api dependent features (#4778) 2023-09-20 11:53:43 +02:00
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
Jaanus Sellin
e4f8e1692a
feat: make application usage private through project (#4786) 2023-09-20 10:35:30 +03:00
Jaanus Sellin
e4577362bc
feat: move middleware to enterprise (#4767) 2023-09-20 08:37:52 +03:00
Gastón Fournier
bed0a2962f
chore: Improve access service iter 2 (#4779)
## About the changes
In https://github.com/Unleash/unleash/pull/4689 I forgot to add backward
compatibility for a public method that was being used in Enterprise.
2023-09-19 16:15:27 +02:00
Ivar Conradi Østhus
013efac46b
feat: open-source segments 🚀 (#4690)
We love all open-source Unleash users. in 2022 we built the [segment
capability](https://docs.getunleash.io/reference/segments) (v4.13) as an
enterprise feature, simplify life for our customers.

Now it is time to contribute it to the world 🌏

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2023-09-19 11:24:26 +00: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
Mateusz Kwasniewski
be7f0d8b4e
feat: Persist dependent features (#4772) 2023-09-19 13:01:38 +02:00
Gastón Fournier
12d9297f68
Revert "chore: improve access service" (#4773)
Reverts Unleash/unleash#4689 temporarily to figure out what's the
problem with the failing test
2023-09-19 11:03:16 +01:00
Gastón Fournier
2186e2b568
chore: improve access service (#4689)
## About the changes
This enables us to use names instead of permission ids across all our
APIs at the computational cost of searching for the ids in the DB but
improving the API user experience

## Open topics
We're using methods that are test-only and circumvent our business
logic. This makes our test to rely on assumptions that are not always
true because these assumptions are not validated frequently.

i.e. We are expecting that after removing a permission it's no longer
there, but to test this, the permission has to be there before:

78273e4ff3/src/test/e2e/services/access-service.e2e.test.ts (L367-L375)

But it seems that's not the case.

We'll look into improving this later.
2023-09-19 11:36:29 +02:00
Mateusz Kwasniewski
2843388673
refactor: feature oriented architecture for feature dependencies (#4771) 2023-09-19 11:23:21 +02:00
Mateusz Kwasniewski
59f2ae435e
feat: stub for create dependent features (#4769) 2023-09-19 10:04:05 +02:00
Fredrik Strand Oseberg
a71c3fe43a
feat: add ids to scheduled jobs (#4764)
* Adds an ID to scheduled jobs so that they are easier to identify in
the future
2023-09-18 16:31:42 +02:00
Gastón Fournier
2c55e929ae
chore: merge one of with properties (#4763)
## About the changes
Open API code generator does not get along with `oneOf` alongside
`properties`:
```shell
$ openapi-generator-cli validate -i modified-openapi.json --recommend
Validating spec (modified-openapi.json)
Warnings: 
        - Schemas defining properties and oneOf are not clearly defined in the OpenAPI
          Specification. While our tooling supports this, it may cause issues with other tools.
```


bab67e44e4/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/OpenApiSchemaValidations.java (L25-L29)

This PR adds a meta-schema rule to validate this and fixes one issue
2023-09-18 15:43:01 +02:00
Tymoteusz Czech
2c826bdbba
feat: Add active users statistics to metrics (#4674)
## About the changes
- `getActiveUsers` is using multiple stores, so it is refactored into
read-model
- Refactored Instance stats service into `features` to co-locate related
code

Closes https://linear.app/unleash/issue/UNL-230/active-users-prometheus

### Important files
`src/lib/features/instance-stats/getActiveUsers.ts`


## Discussion points
`getActiveUsers` is coded less _class-based_ then previous similar
read-models. In one file instead of 3 (read-model interface, fake read
model, sql read model). I find types and functions way more readable,
but I'm ready to refactor it to interfaces and classes if consistency is
more important.
2023-09-18 15:05:17 +02:00
Jaanus Sellin
39d2d065cd
feat: private project filtering and store implementation (#4758) 2023-09-18 11:06:26 +03: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
Jaanus Sellin
15baea1d25
feat: walking skeleton of private projects (#4753) 2023-09-15 15:52:54 +03:00
Thomas Heartman
94b65542e8
refactor: remove check for feature naming data object (#4745)
We already check for its presence before doing anything. We don't need
to
check it twice (we're not Santa Claus, after all).
2023-09-15 12:51:47 +02:00
Simon Hornby
aa5afad502
feat: patch user access query to return projects provided by groups (#4750) 2023-09-15 12:10:16 +02:00
andreas-unleash
76a834ca91
fix: sort toggleNames before updating last seen (#4747)
Seems like when 2 pods are trying to POST lastSeen metrics, the db gets
into a deadlock state.

This is an attempt to fix the deadlock by sorting the toggleNames before
the update.

The hypothesis is that sorted toggle names will reduce the chance of
working on the same row at the same exact time

Closes #
[1-1382](https://linear.app/unleash/issue/1-1382/order-data-before-updating-the-lastseen-to-reduce-change-of-deadlock)

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-09-15 13:02:38 +03:00
Simon Hornby
7843c93dc5
feat: add a button to download user access information (#4746) 2023-09-15 11:51:29 +02:00
andreas-unleash
f9bca20c78
Feat/project private mode (#4743)
Adds `private` option to project mode
Update schemas and models to accept and persist

Closes #
[1-1366](https://linear.app/unleash/issue/1-1366/introduce-private-in-collaboration-mode)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-09-15 11:01:25 +03:00
Mateusz Kwasniewski
c3540e1396
feat: sdk flat context schema (#4738) 2023-09-15 09:30:54 +02:00
Thomas Heartman
f89d42ff44
fix: disable all errors (#4707)
This was recently flagged as a security warning by our pipeline. AJV
also tells users not to use this in prouduction, which we must have
missed:
https://ajv.js.org/security.html#security-risks-of-trusted-schemas
2023-09-14 14:11:18 +02: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
Mateusz Kwasniewski
c2b068e28f
fix: include strategy variants in the event log (#4716) 2023-09-14 13:23:11 +02:00
Nuno Góis
f68b0ad001
fix: env variants event changelog (#4712)
https://linear.app/unleash/issue/2-1397/fix-environment-variants-change-event-does-not-include-changelogs

By running `applyPatch` without cloning the `oldVariants`, `applyPatch`
would patch the `oldVariants` by reference, effectively making them the
same as the `newVariants`. This fix `deepClone`s the oldVariants when
sending them in as an `applyPatch` parameter so that the `oldVariants`
variable is left untouched.


![image](https://github.com/Unleash/unleash/assets/14320932/089e118d-c5c4-432e-b11c-08d362ce155d)
2023-09-14 12:22:20 +01:00
Nuno Góis
31216d1ffb
fix: include tags in variants event (#4711)
https://linear.app/unleash/issue/2-1396/fix-variants-event-should-include-the-respective-feature-flag-tags

This fixes an issue where the `feature-environment-variants-updated`
event would not post to a tagged Slack channel, since it would not take
into consideration the feature flag tags.
2023-09-14 13:16:40 +02:00
Mateusz Kwasniewski
878780f068
feat: playground custom properties are nested (#4686) 2023-09-14 12:28:28 +02:00
Simon Hornby
10afbc8a9e
feat: add service method to retrieve group and project access for all users (#4708) 2023-09-14 11:43:39 +02:00
Tymoteusz Czech
66c790fbf1
fix: Integrations quality updates (#4677)
Fix issues uncovered when reviewing integrations list and form.

- YouTube CSP
- Text content and formatting
- Margins
- Update old integration icons
- Fix headers in dark theme
2023-09-14 10:17:33 +02:00
Thomas Heartman
9bdee12ad9
feat: stop regexes with whitespace (#4681)
This PR stops regexes with whitespace from being added as feature naming
patterns.
2023-09-14 07:56:23 +00:00