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

2119 Commits

Author SHA1 Message Date
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
Christopher Kolstad
6f2a10922d
feat: error log on unsupported pg (#7139)
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2024-05-27 09:21:45 +02:00
Gastón Fournier
8ac8d873b4
chore: edge active tokens cache flag removal (#7094)
## About the changes
EdgeService is the only place where we use active tokens validation in
bulk. By switching to validating from the cache, we no longer need a
method to return all active tokens from the DB.
2024-05-24 14:42:30 +02:00
Jaanus Sellin
bd90d1304e
chore: rename toggle to flag #final (#7146) 2024-05-24 15:07:01 +03:00
Mateusz Kwasniewski
8b5e39c997
feat: hide top nav (#7140) 2024-05-24 12:08:08 +02:00
Gastón Fournier
345c34a945
feat: add ip to state-service and group-service (#7120)
The add ip to two services. Despite state is being deprecated, I think
we better get it out of the way.
2024-05-24 09:53:46 +02:00
Christopher Kolstad
4b68a0b3fd
chore: make it build again 2024-05-23 15:32:46 +02:00
Christopher Kolstad
7e38d6bae1
Node20 (#7095)
Upgrades workflows, nvmrc and package.json to use Node 20.
2024-05-23 14:14:09 +02:00
Jaanus Sellin
b3dd460d2f
chore: rename toggle to flag #7 (#7125) 2024-05-23 13:19:49 +03:00
Jaanus Sellin
d9e631c326
chore: remove e2e that is not needed anymore (#7124)
We talked with @nunogois that this test is testing migration from 2023,
but time has passed and the migration is working properly, so we think
to cut down on test run time, we can remove it.
2024-05-23 12:49:12 +03:00
Jaanus Sellin
c4566baeac
chore: rename roles toggles to flag (#7123)
Running migration to update roles descriptions.
2024-05-23 12:01:04 +03:00
Mateusz Kwasniewski
be6837b53a
feat: navigation sidebar stub (#7121) 2024-05-23 10:49:11 +02:00
Jaanus Sellin
7937301424
chore: rename toggle to flag #6 (#7122) 2024-05-23 11:32:11 +03:00
Jaanus Sellin
4824a02f2b
feat: rename toggle to flag with db migration (#7118)
Renaming also permissions with migration
2024-05-23 10:17:02 +03:00
Jaanus Sellin
2d519469d4
chore: rename feature toggle to feature flag #5 (#7115) 2024-05-23 08:36:58 +03:00
Jaanus Sellin
29e7c4035d
chore: rename toggle to flag #4 (#7114) 2024-05-22 16:26:22 +03:00
Mateusz Kwasniewski
ad4f269d23
feat: debug metrics flag (#7108) 2024-05-22 11:53:10 +02:00
Mateusz Kwasniewski
99403e481b
feat: add prometheus metrics error logging (#7105) 2024-05-22 10:08:31 +02:00
Jaanus Sellin
2fb95339ef
chore: change toggle to flag #3 (#7101) 2024-05-22 09:58:53 +03:00
Mateusz Kwasniewski
45eff83a8a
test: fix flaky lifecycle test (#7093) 2024-05-21 13:40:14 +02:00
Jaanus Sellin
4f46f03843
fix: small improvements (#7090)
Fixing isAdmin method. It is not that critical, because that is mostly
for system users not real usage.
Also fixing wording for outdated sdks.
2024-05-21 12:40:52 +03:00
Jaanus Sellin
45c75a65ce
feat: add global isAdmin method for access service (#7088)
This is preparation, so we do not need to define an `isAdmin` method in
the change request context.
2024-05-21 11:56:22 +03:00