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

1450 Commits

Author SHA1 Message Date
Fredrik Strand Oseberg
898c1b4bc7
fix: only get rows for toggles in project (#5141) 2023-10-24 17:26:18 +02:00
Mateusz Kwasniewski
19098808ef
test: speed up the tests (#5140) 2023-10-24 14:31:38 +02:00
Jaanus Sellin
bb136783a3
bug: fix broken links from lychee (#5127)
Fixed https://github.com/Unleash/unleash/issues/5115
2023-10-24 13:22:49 +03:00
Christopher Kolstad
c60bca777f
feat: replace gravatar-url with inline function (#5128)
As #4475 says, MD5 is not available in secure places anymore. This PR
swaps out gravatar-url with an inline function using crypto:sha256 which
is FIPS-140-2 compliant. Since we only used this method for generating
avatar URLs the extra customization wasn't needed and we could hard code
the URL parameters.
 
fixes: Linear
https://linear.app/unleash/issue/SR-112/gh-support-swap-out-gravatar-url-lib
closes: #4475
2023-10-24 10:07:26 +02:00
Mateusz Kwasniewski
ab390dbaab
test: silent migration test (#5131) 2023-10-23 17:14:41 +02:00
Mateusz Kwasniewski
8bc04c59f3
refactor: move metrics service scheduling (#5129) 2023-10-23 16:28:19 +02:00
Mateusz Kwasniewski
8d8a975c6c
Client instance service (#5126) 2023-10-23 15:22:30 +02:00
Mateusz Kwasniewski
1d1aa27ca3
refactor: proxy service scheduler (#5125) 2023-10-23 15:11:38 +02:00
Christopher Kolstad
314a08b4e6
feat: Make multiple roles per group/user GA by removing the flag (#5109)
To prepare for 5.6 GA, 
I've done a find through both Frontend and Backend here to remove the
usages of the flag. Seems like the flag was only in use in the frontend.
@nunogois can you confirm?
2023-10-23 12:32:15 +00:00
Mateusz Kwasniewski
828e463e38
refactor: move version service scheduling to scheduler (#5120) 2023-10-23 09:34:03 +00:00
Fredrik Strand Oseberg
08a1d053dc
feat: add job that cleans last seen every 24 hours (#5114)
This PR adds a cleanup job that removes unknown feature flags from
last_seen_at_metrics table every 24 hours since we no longer have a
foreign key on the name column in the features table.
2023-10-23 11:26:48 +02:00
Jaanus Sellin
ddcd7f47d8
chore: remove invite link flag (#5119) 2023-10-23 12:11:11 +03:00
Gastón Fournier
2aebc8c58e
fix: don't clean up settings when optional data is not present (#5118)
## About the changes
This fixes a bug updating a project, when optional data
(defaultStickiness and featureLimit are not part of the payload).

The problem happens due to:
1. ProjectController does not use the type: UpdateProjectSchema for the
request body (will be addressed in another PR in unleash-enterprise)
2. Project Store interface does not match UpdateProjectSchema (but it
relies on accepting `additional properties: true`, which is what we
agreed on for input)
3. Feature limit is not defined in UpdateProjectSchema (also addressed
in the other PR)
2023-10-23 10:15:25 +02:00
Fredrik Strand Oseberg
71431c7a1d
refactor/last seen at archived (#5102)
Refactor global archive view and project archive view to include last
seen at by environment
2023-10-20 13:17:41 +02:00
Mateusz Kwasniewski
ba758e13c1
test: added tests for has strategies and enabled strategies (#5112) 2023-10-20 12:33:43 +02:00
Mateusz Kwasniewski
433f3e2760
feat: promise timeout on lock (#5108) 2023-10-20 12:10:18 +02:00
Tymoteusz Czech
6fab6633c9
feat: add hasStrategies and hasEnabledStrategies on feature environments (#5012) 2023-10-20 10:50:57 +02:00
Mateusz Kwasniewski
b890df6e12
feat: show warning about dependencies removed on archive (#5104) 2023-10-20 08:58:03 +02:00
Gastón Fournier
b5d9bbaa76
chore: remove ts-ignore and adapt tests (#5103)
## About the changes
Just using proper types and adapting a few tests
2023-10-19 17:17:28 +02:00
Nuno Góis
ba53d392b2
refactor: rename message banners to banners - events (#5100)
https://linear.app/unleash/issue/2-1531/rename-message-banners-to-banners

Follow up to https://github.com/Unleash/unleash/pull/5098
This one adapts the existing events.
2023-10-19 13:53:40 +01:00
andreas-unleash
9cef75d71d
fix/set disableEnvsOnRevive to true (#5101)
Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-10-19 12:37:17 +00:00
Nuno Góis
957546e305
refactor: rename message banners to banners (#5098)
https://linear.app/unleash/issue/2-1531/rename-message-banners-to-banners

This renames "message banners" to "banners".

I also added support for external banners coming from a `banner` flag
instead of only `messageBanner` flag, so we can eventually migrate to
the new one in the future if we want.
2023-10-19 13:18:25 +01:00
Gastón Fournier
3d9f31f839
feat: ensure at least one owner on remove user/group access (#5085)
## About the changes
This makes sure that projects have at least one owner, either a group or
a user. This is to prevent accidentally losing access to a project.

We check this when removing a user/group or when changing the role of a
user/group

**Note**: We can still leave a group empty as the only owner of the
project, but that's okay because we can still add more users to the
group
2023-10-19 14:14:59 +02:00
andreas-unleash
6760fc0723
fix: add project filter to feature-toggle-list-builder (#5099)
Adds `forProject` filter to FeatureToggleQueryBuilder
Filters playground results for an array of projects

Closes #
[1-1525](https://linear.app/unleash/issue/1-1525/getting-results-for-all-projects-when-defining-a-single-project-in-the)

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-10-19 15:05:56 +03:00
Mateusz Kwasniewski
de237d844d
feat: detect grandchild dependency (#5094) 2023-10-19 13:14:32 +02:00
Mateusz Kwasniewski
56892c54d9
feat: check if child and parent are in the same project (#5093) 2023-10-19 11:11:05 +02:00
Fredrik Strand Oseberg
7195a63e56
Refactor/last seen at ft list (#5089)
Refactor last seen at for the feature toggle list
2023-10-19 10:58:10 +02:00
Simon Hornby
1ca3e8d893
fix: force deletion of archived toggles when deleting a project (#5080) 2023-10-19 10:45:09 +02:00
Mateusz Kwasniewski
f8855f8234
feat: prevent self dependencies (#5090) 2023-10-19 08:57:23 +02:00
Fredrik Strand Oseberg
cd864ed09e
fix: add sort to deep diff (#5084)
Sort array items before running compare. Feature flag certain properties
of strategy that were previously not present in the /api/admin/features
endpoint.
2023-10-18 16:34:42 +02:00
Mateusz Kwasniewski
1f8d12bcdc
feat: default session id in frontend api (#5083) 2023-10-18 16:19:03 +02:00
Christopher Kolstad
f8fba501ae
fix: update failing snapshot 2023-10-18 14:30:55 +02:00
Thomas Heartman
39aa300c05
fix(tests): correctly set baseUriPath in setupAppWithBaseUrl (#5068)
This appears to be a bug. I can confirm that the base path did not take
effect with the previous incarnation, but this should fix that.
2023-10-18 13:17:56 +02:00
Christopher Kolstad
b06613d1b0
feat: Adds rate limiting to metric POST endpoints (#5075)
### What
The heaviest requests we serve are the register and metrics POSTs from
our SDKs/clients.
This PR adds ratelimiting to /api/client/register, /api/client/metrics,
/api/frontend/register and /api/frontend/metrics with a default set to
6000 requests per minute (or 100 rps) for each of the endpoints.

It will be overrideable by the environment variables documented.

### Points of discussion
@kwasniew already suggested using featuretoggles with variants to
control the rate per clientId. I struggled to see if we could
dynamically update the middleware after initialisation, so this attempt
will need a restart of the pod to update the request limit.
2023-10-18 13:00:44 +02:00
Fredrik Strand Oseberg
3ac8ab898a
fix: log diff (#5072)
Add a deep diff function to investigate diff in logs
2023-10-18 09:25:25 +02:00
Mateusz Kwasniewski
75b131162e
feat: dependent features use new transaction mechanism (#5073) 2023-10-18 08:59:26 +02:00
Gastón Fournier
db04a1eaa8
chore: introduce type to prevent potential issues (#5066)
## About the changes
This small improvement aims to help developers when instantiating
services. They need to be constructed without injecting services or
stores created elsewhere so they can be bound to the same transactional
scope.

This suggests that you need to create the services and stores on your
own
2023-10-17 12:30:44 +02:00
andreas-unleash
cf42a829f4
feat: add option to return disabled strategies (#5059)
Adds the option to include disabled strategies (behind the
playgroundImprovements flag

Closes #
[1-1505](https://linear.app/unleash/issue/1-1505/return-disabled-strategies-in-the-playground-features-request)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-10-17 12:35:07 +03:00
Gastón Fournier
08116d008a
chore: GA transactional decorator (#5020)
## About the changes
After testing with the flag enabled and fixing a bug, this is ready to
be GA
2023-10-17 10:47:18 +02:00
Nuno Góis
fd580c9539
fix: extract username from user should not return undefined (#5061)
This fixes a return type error by changing the logic of
`extractUsernameFromUser` to never return undefined.

In the previous code, `user` could be truthy, but that doesn't mean
`email` or `username` were defined. This assumes we always fallback to
"unknown" in those scenarios.
2023-10-17 09:18:44 +01:00
Jaanus Sellin
5619db33ed
feat: import dependencies (#5044) 2023-10-17 08:22:54 +03:00
Mateusz Kwasniewski
e9e110f702
feat: show dependencies only when using pro/enterprise or at least on… (#5052) 2023-10-16 20:56:06 +02:00
Fredrik Strand Oseberg
0064c9e1be
refactor: add tests for /api/client/features (#5057)
add more robust tests for /api/client/features
2023-10-16 16:18:41 +02:00
Gastón Fournier
675ec2e836
chore: add enterprise event (#5056)
This just adds a new event type
2023-10-16 15:37:11 +02:00
Nuno Góis
364e315a3c
feat: add new message banner events (#5055)
https://linear.app/unleash/issue/2-1516/add-new-message-banner-events

Adds new message banner events to help us keep track of changes related
to the new feature.
2023-10-16 14:30:40 +01:00
Fredrik Strand Oseberg
9e493f56a0
refactor: create builder class for converting rows to avoid duplication (#5050)
Create a builder for creating the data structures for feature toggle
list and playground api
2023-10-16 14:19:46 +02:00
Fredrik Strand Oseberg
1a46ab7b12
refactor: add test coverage (#5046)
Adds test coverage for different feature flag paths temporarily
2023-10-16 13:17:26 +02:00
andreas-unleash
8561ba8df7
feat: add playground imrpovements flag (#5045)
Adds the playgroundImprovements flag

Close #
[1-1508](https://linear.app/unleash/issue/1-1508/add-playgroundimprovements-feature-flag)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-10-16 14:08:21 +03:00
Fredrik Strand Oseberg
b58d900c2d
fix: feature flag playground features in new store (#5013)
Have playground use the method in the feature-toggle-service instead of
asking the client-feature-toggle-store
2023-10-16 12:29:31 +02:00
Nuno Góis
6c21ed5f74
feat: make maintenance-related 503s more intuitive (#5018)
This makes maintenance-related 503s more intuitive on our UI by
mentioning that maintenance banner is currently enabled.


![image](https://github.com/Unleash/unleash/assets/14320932/43142c58-6b87-4b2d-9239-50f2bb1409e6)
2023-10-16 09:27:29 +01:00