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

2085 Commits

Author SHA1 Message Date
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
Jaanus Sellin
a204f2c615
feat: outdated sdks project level (#7080)
This adds project level endpoint to catch outdated SDKs only for that
project.
2024-05-20 12:58:30 +03:00
David Leek
dfc0c3c63f
feat: refactor data usage into hooks, estimate monthly added fees (#7048)
- Refactors data processing and overage calculations to separate hooks
- Adds support for estimating traffic costs based on monthly usage up to
current point
- Adds accrued traffic charges to the billing page


![image](https://github.com/Unleash/unleash/assets/707867/39a837c2-5092-49b8-8bbf-46d8757635c0)


![image](https://github.com/Unleash/unleash/assets/707867/55ecfa5e-afe1-4cb6-9aa4-7dd67db4248c)
2024-05-17 15:27:32 +02:00
Mateusz Kwasniewski
150a7b3ed4
feat: Deprecate feature toggle environment variants api (#7066) 2024-05-16 13:43:21 +02:00
Mateusz Kwasniewski
9281d6b694
fix: reached stage should emit feature name (#7068) 2024-05-16 12:11:13 +02:00
Gastón Fournier
7cf9cfa96e
fix: bearer tokens with base-path (#7065)
## About the changes
We've identified that Bearer token middleware is not working for
/enterprise instance.

Looking at a few lines below:
88e3b1b79e/src/lib/app.ts (L81-L84)
we can see that we were missing the basePath in the use definition.
2024-05-16 11:45:16 +02:00
Mateusz Kwasniewski
88e3b1b79e
feat: deprecate feature toggle variants at environment level (#7058) 2024-05-16 10:57:32 +02:00
Zachary Skalko
9903cf1090
fix: Add appropriate response headers to SPA entry point HTML response (#6992)
## About the changes

Current state, when returning the HTML entry point from the server,
there are no headers attached. We encountered an issue with a deployment
and this had an impact for us.

A brief description:

1. We deployed the most recent version. Noticed an unrelated issue.
2. Users tried to use the most recent version and due to their client
cache, requested assets that did not exist in the newest version.
3. Our cache layer cached the assets that were not there with the HTML
response. It had to infer the type based on the filename because there
was no attached `Content-Type` header. This cache was very sticky.
4. After rolling back we saw the HTML response (from the cache) instead
of the appropriate response from the upstream Unleash application.

This PR does a few things.

1. When responding with the HTML entry point, it adds header
(`Content-Type: text/html`).
2. When the client is requesting an asset (a path that ends with an
extension), it also instructs the resource not to be cached
(`Cache-Control: no-cache`) and returns a 404. This will prevent misses
from getting cached.


## Discussion points

To me, there doesn't seem to be a lot of test infra on serving the SPA
application. If that is an error, please indicate where that is and an
appropriate test can be added.
2024-05-15 15:07:07 +02:00
Mateusz Kwasniewski
6b59b30846
feat: backfill current stage on startup (#7057) 2024-05-15 12:47:01 +02:00
Christopher Kolstad
8aa0616698
feat: expose postgres version (#7041)
Adds a postgres_version gauge to allow us to see postgres_version in
prometheus and to post it upstream when version checking. Depends on
https://github.com/bricks-software/version-function/pull/20 to be merged
first to ensure our version-function doesn't crash when given the
postgres-version data.
2024-05-13 14:41:28 +02:00
Mateusz Kwasniewski
dfc065500d
feat: kept and discarded read model (#7045) 2024-05-13 14:24:31 +02:00
Jaanus Sellin
dac3f4a186
feat: webhook data for completed (#7043)
Now we post status and statusValue with webhook.
2024-05-13 12:18:02 +03:00
Jaanus Sellin
958ccabb54
feat: lifecycle prometheus metrics per project (#7032)
When we pushed metrics per feature, it had too many datapoints and
grafana could not handle it. Now I am taking median for a project.
2024-05-10 15:24:27 +03:00
Jaanus Sellin
8a2b977ac0
fix: fix prometheus metrics for lifecycle (#7030)
getAll was not properly tested, added test and fixed query. Now metrics
should come up.
2024-05-10 11:50:47 +03:00
Mateusz Kwasniewski
3fc7714e78
feat: Lifecycle in project overview (#7024) 2024-05-09 13:38:18 +02:00
Jaanus Sellin
79739a1d7f
feat: add completed status backend (#7022)
1. Implemented controller, service, store for status saving
2024-05-09 12:05:19 +03:00
Mateusz Kwasniewski
97d702afeb
feat: expose lifecycle stage in project overview search (#7017) 2024-05-09 10:50:51 +02:00
Jaanus Sellin
28a7797aea
feat: feature lifecycle completed schema (#7021)
1. Added new schema and tests
2. Controller also accepts the data
3. Also sending fake data from frontend currently

Next steps, implement service/store layer and frontend
2024-05-09 09:51:44 +03:00
Jaanus Sellin
8ea034cc2f
feat: add status fields for feature lifecycle table (#7014) 2024-05-09 09:39:01 +03:00
Ivar Conradi Østhus
64c10f9eff
poc: many strategies pagination (#7011)
This fixes the case when a customer have thousands of strategies causing
the react UI to crash. We still consider it incorrect to use that amount
of strategies and this is more a workaround to help the customer out of
a crashing state.

We put it behind a flag called `manyStrategiesPagination` and plan to
only enable it for the customer in trouble.
2024-05-08 14:20:51 +02:00
Jaanus Sellin
cd49ae2a26
feat: add project id to prometheus and feature flag (#7008)
Now we are also sending project id to prometheus, also querying from
database. This sets us up for grafana dashboard.
Also put the metrics behind flag, just incase it causes cpu/memory
issues.
2024-05-08 15:19:23 +03:00
Thomas Heartman
95ac2e6b8d
feat: generate project ids if they're missing (#7003)
This PR updates the project service to automatically create a project id
if it is not provided. The feature is behind a flag. If an ID is
provided, it will still attempt to use that ID instead.
2024-05-08 12:45:11 +02:00
Jaanus Sellin
02440dfed2
feat: duration in stage, add feature lifecycle prometheus metrics (#6973)
Introduce a new concept. Duration in stage.
Also add it into prometheus metric.
2024-05-08 11:33:51 +03:00
Thomas Heartman
861ae6aa93
chore: add automatic ID generation algorithm (#7001)
This PR adds a function to automatically generate a project ID on
creation. Using this when the id is missing will be handled in following
PRs.

The function uses the existing `slug` package to create a slug, and then
takes the 12 characters of a uuidv4 string to generate an ID.

The included tests check that the 12 character hash is added and that
the resulting string is url friendly (by checking that
`encodeURIComponent` doesn't change it).

We could also test a lot of edge cases (such as dealing with double
spaces, trimming the string, etc), but I think that's better handled by
the library itself (but you can check out what I removed in
2d9bcb6390
for an idea).

The function doesn't really need to be in the service; it could be moved to a util. But for proximity, I'll create it here first.
2024-05-08 07:26:35 +00:00
Egor Stronhin
8ae8cbbdb4
feat: Allow to use CA certificate file path for DB (#6985)
Regarding ticket #6892:

I would like to enable the use of a CA certificate without requiring
other certificates. This would be useful for AWS Helm, as AWS only
provides a single PEM file for DB connections.
2024-05-07 14:43:19 +02:00
Mateusz Kwasniewski
8ae78236d2
chore: remove project overview refactor flag (#6897) 2024-05-07 13:58:56 +02:00
Mateusz Kwasniewski
d1803b2e62
feat: increase possible number range for yes/no metrics (#6995) 2024-05-07 13:54:56 +02:00
Jaanus Sellin
206d0190ff
feat: create initial stages for features (#6983)
We are getting questions from engineers, why I do not see lifecycle. The
same will happen with our customers. Now customers will see lifecycle
component unified across features.
2024-05-07 11:38:51 +03:00
Jaanus Sellin
77d5156eba
feat: start exposing environment metrics from feature endpoint (#6986)
We want to start showing same donut that we do show in project page.
This is setting it up for UI.
2024-05-07 09:32:46 +03:00
Mateusz Kwasniewski
8d04772256
fix: duplicate column name in search query (#6989) 2024-05-06 19:26:23 +02:00
Jaanus Sellin
2c05f1a0ce
feat: search order by final (#6976)
Final rank has always been ordering correctly by default. But after 5.12
I see some issues that sometimes it is not ordered. Just to be extra
sure, I am for ordering it.
2024-05-03 13:30:12 +03:00
Jaanus Sellin
5c61667282
feat: add completed event as webhook event (#6968)
Now feature completed event can be used with webhook.
2024-05-02 14:48:33 +03:00
Christopher Kolstad
7754ac69df
task: added migration for scim_external_id (#6966) 2024-04-30 10:24:17 +02:00
andreas-unleash
979220d80d
chore: scheduled change request cache kill switch (#6957)
Removes the `inMemoryScheduledChangeRequests` flag and adds
`killScheduledChangeRequestCache`

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-04-30 09:33:42 +03:00
Jaanus Sellin
2ba250fa41
feat: do not insert into database stages that already exist (#6964)
Previously when we had thousands of metrics coming in, we were trying to
write them all to database and running into on conflict
2024-04-30 09:07:20 +03:00