1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
Commit Graph

2140 Commits

Author SHA1 Message Date
Jaanus Sellin
708183ce26
feat: optimize search store by removing inline EXISTS (#7394)
Instead of running exists on every row, we are joining the exists, which
runs the query only once.
This decreased load time on my huge dataset from 2000ms to 200ms.

Also added tests that values still come through as expected.
2024-06-14 10:26:12 +03:00
Mateusz Kwasniewski
0c79b36b74
feat: Max strategies metrics (#7392) 2024-06-14 09:20:43 +02:00
Jaanus Sellin
1191f162e5
fix: fix unstable search (#7391)
Reverting

https://github.com/Unleash/unleash/pull/7387
https://github.com/Unleash/unleash/pull/7385
2024-06-13 15:37:31 +03:00
Jaanus Sellin
906940948b
feat: optimize search (#7387)
I am moving the strategies join to later part of query, because it is
not used for filtering, only need it for data.
2024-06-13 13:46:06 +03:00
Jaanus Sellin
b9f43f5ba0
feat: optimize search store by removing inline EXISTS (#7385)
Instead of running exists on every row, we are joining the exists, which
runs the query only once.
This decreased load time on my huge dataset from 2000ms to 200ms.

Also added tests that values still come through as expected.
2024-06-13 13:11:47 +03:00
Mateusz Kwasniewski
3cc0dfe35a
fix: playground parent deps check (#7384) 2024-06-13 10:36:44 +02:00
Mateusz Kwasniewski
702ee8cb12
test: describe default stickiness bahavior in a test (#7379) 2024-06-12 16:49:50 +02:00
Jaanus Sellin
7fc87e1647
feat: clean up command bar props (#7368)
A lot of things were passed in for search, but since we only have single
command bar, we do not need them and it was bloating our component.
2024-06-12 09:24:16 +03:00
Mateusz Kwasniewski
c1656d8630
feat: Read flag creator (#7357) 2024-06-11 15:22:52 +02:00
David Leek
576dd04dc5
feat: command bar poc (#7350)
Command bar PoC using clone of search

---------

Co-authored-by: sjaanus <sellinjaanus@gmail.com>
2024-06-11 15:27:59 +03:00
Mateusz Kwasniewski
2a616c28bc
feat: adding full creator information to view used by feature read (#7356) 2024-06-11 14:19:32 +02:00
Jaanus Sellin
3acb3ad2c2
feat: upgrade from react v17 to v18 (#7265)
**Upgrade to React v18 for Unleash v6. Here's why I think it's a good
time to do it:**
- Command Bar project: We've begun work on the command bar project, and
there's a fantastic library we want to use. However, it requires React
v18 support.
- Straightforward Upgrade: I took a look at the upgrade guide
https://react.dev/blog/2022/03/08/react-18-upgrade-guide and it seems
fairly straightforward. In fact, I was able to get React v18 running
with minimal changes in just 10 minutes!
- Dropping IE Support: React v18 no longer supports Internet Explorer
(IE), which is no longer supported by Microsoft as of June 15, 2022.
Upgrading to v18 in v6 would be a good way to align with this change.

TS updates:
* FC children has to be explicit:
https://stackoverflow.com/questions/71788254/react-18-typescript-children-fc
* forcing version 18 types in resolutions:
https://sentry.io/answers/type-is-not-assignable-to-type-reactnode/

Test updates:
* fixing SWR issue that we have always had but it manifests more in new
React (https://github.com/vercel/swr/issues/2373)

---------

Co-authored-by: kwasniew <kwasniewski.mateusz@gmail.com>
2024-06-11 13:59:52 +03:00
Mateusz Kwasniewski
44ca447fd2
chore: remove debug metrics flag (#7348) 2024-06-11 10:44:16 +02:00
Mateusz Kwasniewski
cedf19d2ec
fix: lifecycle metrics on metrics insert (#7322) 2024-06-07 15:55:15 +02:00
Mateusz Kwasniewski
8279da9f9b
feat: show creators from non archived features (#7309) 2024-06-06 14:50:38 +02:00
Thomas Heartman
eb39a212ce
chore: test that the tags API still returns tags that you can't create anymore (#7304)
This change adds a test to the tags API to ensure that even if you
can't create tags that are pure whitespace anymore, you'll still
receive pre-existing tags from the API that fit this description.

The test is here to ensure that we don't break this in future versions
of Unleash.
2024-06-06 14:16:45 +02:00
Mateusz Kwasniewski
6b4d9d0c1d
fix: remove null users in filter (#7308) 2024-06-06 13:38:54 +02:00
Mateusz Kwasniewski
a91b77a7ce
feat: filter by created by (#7306) 2024-06-06 12:59:11 +02:00
Mateusz Kwasniewski
2cc4b5faab
feat: display created by user in search (#7292) 2024-06-06 11:51:54 +02:00
Mateusz Kwasniewski
3c3e888ff0
feat: project flag creators api (#7302) 2024-06-06 11:10:28 +02:00
Mateusz Kwasniewski
1a6197660f
feat: add created by in search results (#7285) 2024-06-05 13:54:24 +02:00
Thomas Heartman
2bad98a121
fix: disallow invalid tag values (#7268)
This PR fixes how Unleash handles tag values. Specifically, it does
these things:
1. Trims leading and trailing whitespace from tag values before
inserting them into the database
2. Updates OpenAPI validation to not allow whitespace-only and to ignore
leading and trailing whitespace

Additionally, it moves the tag length constants into the constants file
from the Joi tag schema file. This is because importing the values
previously rendered them as undefined (probably due to a circular
dependency somewhere in the system). This means that the previous values
were also ignored by OpenAPI.

UI updates reflecting this wil follow.

## Background
When you tag a flag, there's nothing stopping you from using an entirely
empty tag or a tag with leading/trailing whitespace.

Empty tags make little sense and leading trailing whitespace differences
are incredibly subtle:

![image](https://github.com/Unleash/unleash/assets/17786332/ec8fe193-8837-4c6a-b7bf-8766eff34eed)


Additionally, leading and trailing whitespace is not shown in the
dropdown list, so you'd have to guess at which is the right one.

![image](https://github.com/Unleash/unleash/assets/17786332/a14698ab-2bfd-4ec3-8814-b8e876d0aadb)
2024-06-05 08:31:30 +02:00
Gastón Fournier
1fb6eb1593
fix: import export pointing to new docs (#7274)
I believe this link is pointing to old docs and should be updated
2024-06-04 23:00:53 +02:00
Mateusz Kwasniewski
2069af427a
feat: more powerful feature search by type (#7267) 2024-06-04 15:13:11 +02:00
Christopher Kolstad
0db5bc193f
task: upgraded semver dependency (and biome) (#7272)
Sorry for the extra noise here, but this seems to be the biome upgrade
altering formatting slightly.
2024-06-04 15:01:43 +02:00
David Leek
927f911c62
chore: add a flag+ui flag for commandBarUI (#7264) 2024-06-04 08:50:13 +00:00
David Leek
63e300da3b
chore: change to fs/promises and add an import from file e2e test (#7240) 2024-06-03 12:10:12 +02:00
Mateusz Kwasniewski
8c26c038b4
feat: new sidebar by default for OSS (#7239) 2024-06-03 11:05:10 +02:00
Gastón Fournier
54c6ac8163
fix: Created by on application-created adds the ip as created by (#7231)
To avoid leaking potential PII information in the event log, this replaces the IP for the system user as the "created by" field
2024-06-02 15:57:47 +02:00
Gastón Fournier
5845d0e552
chore: make ip mandatory (#7220)
IP should be mandatory for storing events. Automated events should use
127.0.0.1
2024-05-31 14:52:15 +02:00
David Leek
80ba3647a6
feat: file import (#7219) 2024-05-31 13:21:41 +02:00
Jaanus Sellin
d17ae37800
feat: now CLIENT_METRICS event will be emitted with new structure (#7210)
1. CLIENT_METRICS event will be emitted with new structure
2. CLIENT_METRICS event will be emitted from bulkMetrics endpoint
2024-05-31 12:40:46 +03:00
Jaanus Sellin
3c73ce9dd9
fix: increase performance of outdated SDK query (#7226)
Joining might not always be the best solution. If a table contains too
much data, and you later run sorting on top of it, it will be slow.

In this case, we will first reduce the instances table to a minimal
version because instances usually share the same SDK versions. Only
after that, we join.

Based on some customer data, we reduced query time from 3000ms to 60ms.
However, this will vary based on the number of instances the customer
has.
2024-05-31 12:39:52 +03:00
Thomas Heartman
de74faac46
chore: remove flag for new project cards (#7225)
This PR removes the flag for the new project card design, making it GA.

It also removes deprecated components and updates one reference (in the
groups card) to the new components instead.
2024-05-31 10:58:31 +02:00
Thomas Heartman
bea5929460
chore: remove project list split feature flags (#7224)
This PR removes all the feature flags related to the project list split
and updates the snapshot.

Now the project list will always contain "my projects" and "other
projects"
2024-05-31 10:38:23 +02:00
Simon Hornby
d6dc2b4ce2
chore: mark deprecations with version (#7218)
Makes some deprecation messages in open API clearer around which version
they were deprecated in so that they can be removed in v7
2024-05-30 13:49:39 +02:00
Gastón Fournier
07ef4a114f
chore: sync user groups is a system action (#7214)
## About the changes
After an internal conversation, we concluded that syncExternalGroups is
an action that Unleash performs as a system, not something triggered by
the user. We keep the method and just write the event log that the
action was performed by the system user.
2024-05-30 11:47:30 +02:00
Jaanus Sellin
6c8b1d8904
fix: when finding median time to production, ignore 0s (#7200)
We have an issue that if you open up Insights, the Time to Production
chart was showing nothing because it was taking the median across all
projects. You might have many new or empty projects where the median was
0 (no data).

For example, the median from [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.7, 50.3, 140] was 0.

Now, we will remove the 0 values to have a more reasonable median.
2024-05-29 14:17:31 +03:00
David Leek
998abaad67
chore: remove unused and deprecated methods in feature toggle legacy controller and in feature toggle service (#7199) 2024-05-29 11:01:33 +02:00
Jaanus Sellin
ef9f09b58c
feat: insights out of beta and expose 2 widgets to pro (#7177)
1. Remove beta badge
2. Remove exposure from oss
3. Expose 2 widgets to pro and rest to enterprise
2024-05-29 11:55:01 +03:00
David Leek
61a8908694
chore: remove state service (#7184)
## About the changes

Removes the deprecated state endpoint, state-service (despite the
service itself not having been marked as deprecated), and the file
import in server-impl. Leaves a TODO in place of where file import was
as traces for a replacement file import based on the new import/export
functionality
2024-05-28 14:47:31 +02:00
Simon Hornby
f16f8594f5
chore: deprecate custom strategies (#7186) 2024-05-28 12:33:53 +02:00
Christopher Kolstad
cea64dc21d
task: Removed edge bulk metrics endpoint (#7161)
Removes /edge/metrics. This has been superseded by
/api/client/metrics/bulk. Once this is merged, Unleash 6.0 will require
Edge > 17.0.0. (We recommend at least v19.1.3)
2024-05-28 11:30:41 +02:00
Jaanus Sellin
304d619597
chore: upgrade edge banner version (#7180)
Upgrading banner to 19.1.3, because we fixed critical issue there.
2024-05-28 12:16:42 +03:00
Jaanus Sellin
83912d872b
fix: fix empty events when no features need to be deleted (#7181) 2024-05-28 11:32:20 +03:00
Jaanus Sellin
73f0cb6180
chore: switch insights ui flag to kill switch (#7166)
The flag is already set up in our Unleash instance.
2024-05-28 09:44:52 +03:00
gitar-bot[bot]
6e8e807e44
[Gitar] Cleaning up stale feature flag: executiveDashboard with value true (#7158)
We are keeping the UI hidden for mdsol behind kill switch, but I feel
like we can remove the flag completely for backend, so everyone will
keep collecting data.

Co-authored-by: Gitar Bot <noreply@gitar.co>
2024-05-27 14:21:44 +03:00
Gastón Fournier
e5aa1a81cb
feat: add remote ip to all events (2) (#7149)
## About the changes
This aligns us with the requirement of having ip in all events. After
tackling the enterprise part we will be able to make the ip field
mandatory here:
2c66a4ace4/src/lib/types/events.ts (L362)
2024-05-27 11:58:32 +02:00
Thomas Heartman
f518b12b07
chore!: [v6] remove error.description in error messages (#7157)
In preparation for v6, this PR removes usage and references to
`error.description` instead favoring `error.message` (as mentioned
#4380)

I found no references in the front end, so this might be (I believe it
to be) all the required changes.
2024-05-27 11:26:19 +02:00
David Leek
9ea66e8850
chore: remove deprecated legacy features endpoint (#7129)
This PR is part of #4380 - Remove legacy `/api/feature` endpoint.

## About the changes

### Frontend
- Removes the useFeatures hook
- Removes the part of StrategyView that displays features using this
strategy (not been working since v4.4)
- Removes 2 unused features entries from routes 

### Backend
- Removes the /api/admin/features endpoint
- Moves a couple of non-feature related tests (auth etc) to use
/admin/projects endpoint instead
- Removes a test that was directly related to the removed endpoint
- Moves a couple of tests to the projects/features endpoint
- Reworks some tests to fetch features from projects features endpoint
and strategies from project strategies
2024-05-27 09:24:09 +02:00