1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-06-27 01:19:00 +02:00
Commit Graph

13816 Commits

Author SHA1 Message Date
Jaanus Sellin
2879ce9dd6
fix: make revision id not be so reactive (#10032)
Unleash is being too reactive to events inside Unleash. We should not
update etag if feature is created or tag is added to feature.

This PR adds this condition and adds test for it.
2025-05-27 16:16:26 +03:00
Thomas Heartman
3e57c4803c
Chore(1-3755)/split insights in three (#10035)
Creates sections for the insights dashboard and moves charts around into
the same order as the sketches and into the right sections. There's no
charts for the top section (lifecycle currently) yet, and the sections
also don't have their own filters.

To make this re-ordering easier, I've also moved the previous insights
chart into a legacy file and set up a proxy component that handles
switching based on the flag.


![image](https://github.com/user-attachments/assets/f0929998-def3-4643-babd-ab53f4ea8e98)


Next step is separating the filters.
2025-05-27 15:06:48 +02:00
Thomas Heartman
5df074bd14
Remove entire row for median time to production (#10034)
Removes the "median time to production" snapshot + graph when the
lifecycleMetrics flag is active.

In other words: this entire box is gone 💨 
<img width="1326" alt="image"
src="https://github.com/user-attachments/assets/929a9097-82a6-493d-b0dd-614000ffcfe7"
/>
2025-05-27 14:00:08 +02:00
Thomas Heartman
092c525531
chore: add lifecycleMetrics flag definition (#10033)
Adds the new lifecycleMetrics flag.
2025-05-27 11:53:22 +00:00
Nuno Góis
290ef6ca40
chore!: remove deprecated POST events search endpoint (#10030)
https://linear.app/unleash/issue/2-3368/remove-post-apiadmineventssearch-deprecated-in-610

Removes POST `/api/admin/events/search` which was deprecated in v6.1.
Also cleans up related code.
2025-05-27 09:12:36 +01:00
Nuno Góis
45434109a9
chore: don't include passwordLink if it's unleashUrl (#10029)
https://linear.app/unleash/issue/2-3572/fix-dont-include-passwordlink-if-its-the-same-as-unleashurl

In case we don't have password auth enabled (`passwordLink ===
unleashUrl`), we should see the alternative branch in our getting
started email:


e52fcd11e0/src/mailtemplates/getting-started-new/getting-started-new.html.mustache (L40-L45)

This change helps us validate this behavior within the
`newGettingStartedEmail`. If it works correctly for both cases (password
auth enabled/disabled) we can probably clean this up as part of our flag
removal.
2025-05-26 14:57:06 +01:00
Nuno Góis
e52fcd11e0
chore!: remove deprecated POST ui-config endpoint (#10027)
https://linear.app/unleash/issue/2-3472/remove-post-apiadminui-config-deprecated-in-690

Removes POST `/api/admin/ui-config` which was deprecated in v6.9.
Also cleans up related code.
2025-05-26 10:22:16 +01:00
Gastón Fournier
27781fea47
chore: remove console.log and reuse package scripts (#10025)
Make `start:dev` re-use `dev:backend`, the only difference is start:dev
runs a clean before running
2025-05-23 12:24:03 +02:00
David Leek
9fca29f254
feat: custom metrics (#10022) 2025-05-22 09:58:54 +02:00
Gastón Fournier
76b201e40e
feat: add migration for cdn_tokens (#10021) 2025-05-21 14:20:04 +00:00
Jaanus Sellin
5fb718efcd
feat: custom metrics poc (#10018)
Now we can receive custom metrics, return those for UI and have extra
prometheus endpoint for it.

---------

Co-authored-by: Christopher Kolstad <chriswk@getunleash.io>
2025-05-21 16:55:30 +03:00
Thomas Heartman
e118321bfb
chore: fix typo (#10016)
Fixes a typo error that snuck in
2025-05-19 11:10:16 +00:00
Thomas Heartman
9955267d39
Chore(1-3753)!: block deletion of context fields in use (#10005)
Blocks deletion of context fields that are in use and updates the
"active usage" count to exclude use in archived flags.

- Before allowing you to delete a context field, checks if it is in use
by any strategies. If so, returns a 409 error.
- Updates what we count as "in use" to exclude flags that have been
archived.

BREAKING CHANGE: Context fields can no longer be deleted if they are in
use by active (non-archived) flags.
2025-05-19 13:02:01 +02:00
Nuno Góis
8fae8fb8b3
chore: remove teams integration CR events flag (#10015)
https://linear.app/unleash/issue/2-3265/investigate-teams-integration-for-change-request-notifications

Removes the `teamsIntegrationChangeRequests` feature flag.

Follow-up to: https://github.com/Unleash/unleash/pull/9309
2025-05-16 15:06:53 +01:00
Christopher Kolstad
1a0cfd6821
task(ci): Bump base image for OSS docker (#10014)
We're building with node 22 locally, so our docker image should also use
node 22. This PR bumps our docker workflow to use 22.15.1 image.
2025-05-16 15:50:58 +02:00
Christopher Kolstad
f9f2a55602
task(ci): Removed unnecessary NODE_ENV setting (#10013)
vitest automatically sets NODE_ENV to test, so this PR makes our
package.json scripts easier to read.
2025-05-16 15:27:54 +02:00
Tymoteusz Czech
b0954f213c
chore: remove flagsReleaseManagementUI and flagsOverviewSearch flags (#10011)
Removing the `flagsReleaseManagementUI` and `flagsOverviewSearch`
feature flags - we're keeping these enabled.
2025-05-16 15:13:32 +02:00
Christopher Kolstad
8afaf7e88b
fix(ci): update config to make GHA reporting be better 2025-05-16 15:04:40 +02:00
Jaanus Sellin
a08db953b8
fix: now feature component is not loaded before we have feature infor… (#10012)
We were seeing strange errors when the feature component was rendered
before the feature data was returned from the backend. Now, we ensure
the component is not rendered until the feature is available.
2025-05-16 16:03:26 +03:00
Gastón Fournier
e754212a39
docs: explain health API properly (#10009)
## About the changes
Our health implementation always returns GOOD if the server is up:
beb29f5b5b/src/lib/routes/health-check.ts (L46-L51)

Currently our documentation of the endpoint is misleading saying that it
will return BAD if unable to connect to PostgreSQL

Closes #9965
2025-05-16 12:38:27 +02:00
Christopher Kolstad
b133bb842b
fix(ci): fix incorrect parameter usage to coverallsapp github action 2025-05-16 11:56:50 +02:00
Christopher Kolstad
2e7d9ac109
fix(ci): Setup cobertura coverage 2025-05-16 11:46:14 +02:00
Gastón Fournier
beb29f5b5b
chore: stop using deprecated properties and lean on resourceLimits cfg (#9994)
This removes segmentValuesLimit and strategySegmentsLimit from
ui-config-schema, deprecated in 5.11.0
2025-05-16 09:41:04 +00:00
Christopher Kolstad
b681702b77
task: migrate tests to vitest
Vitest Pros:
* Automated failing test comments on github PRs
* A nice local UI with incremental testing when changing files (`yarn
test:ui`)
* Also nicely supported in all major IDEs, click to run test works (so
we won't miss what we had with jest).
* Works well with ESM

Vitest Cons:
* The ESBuild transformer vitest uses takes a little longer to transform
than our current SWC/jest setup, however, it is possible to setup SWC as
the transformer for vitest as well (though it only does one transform,
so we're paying ~7-10 seconds instead of ~ 2-3 seconds in transform
phase).
* Exposes how slow our tests are (tongue in cheek here)
2025-05-16 11:19:10 +02:00
Nuno Góis
4d1b44818f
chore: remove filterExistingFlagNames feature flag (#9957)
https://linear.app/unleash/issue/2-3564/remove-filterexistingflagnames-feature-flag

We're removing the `filterExistingFlagNames` feature flag since we've
decided we want this to be the default behavior.

We don't need to rush to merge it, just in case we need to disable this
for any reason. However it should also be pretty easy to just revert if
needed.

Changes in tests are a bit tricky since they assumed the previous
behavior where we always registered metrics, even for non existing flag
names. `cachedFeatureNames` is also memoized with a TTL of 10s, so the
easiest way to overcome this was to override `cachedFeatureNames` to
return what we expected. As long as they return the same flag names that
we expect, we're able to register their metrics.

Let me know if you can think of a better approach.
2025-05-16 08:52:27 +01:00
Nuno Góis
995d69a352
fix: hide project archive in OSS (#10004)
https://linear.app/unleash/issue/2-3569/fix-hide-project-archive-in-oss

Hides "project archive" in OSS.

I believe this is a bug. OSS only has one project and the project
archive was acting unexpectedly anyways since it was showing the same
default project as being archived. This is because in OSS we use the OSS
project-controller, not the Enterprise version (override) of it.
2025-05-15 14:45:29 +01:00
Thomas Heartman
ffdf85c8b8
Fix: deleted legal values not being cleared when you select new ones (#9986)
Updates how we handle deleted legal values for the constraint reducer.
The previous iteration used useState and took the deleted legal values
as a third argument. This isn't possible anymore because a reducer can
take only two args. The simplest way forward for this was to move the
deleted legal values into the state itself, so that it's available in
the reducer. Because deleted legal values can be updated whenever (when
we get a response for that specific context field), we'll update it via
`useEffect`.

I'm not crazy about this approach, so if you have better suggestions,
I'm listening.

I've changed the signature of the reducer, so I've also updated the
tests. In doing so, I thought it now makes more sense to have the base
objects be objects instead of functions, so the changes there are
primarily updating that.
2025-05-15 13:06:08 +00:00
Thomas Heartman
e09b839ac0
chore: disable delete button if a context field has usage (#10002)
Blocks deletion of context fields from the UI if the context field has
any usage.

<img width="1399" alt="image"
src="https://github.com/user-attachments/assets/e6c26671-761b-4e54-9850-c505ba7b42f3"
/>
2025-05-15 13:55:56 +02:00
Thomas Heartman
082a03afd7
Fix(1-3485)/handle deleted constraints (#9999)
Improves handling of constraints in use that have been deleted.

This change implments a few small changes on both the front and the back
end on how we deal with constraints that have been deleted.

The most important change is on the back end, in the
`/constraints/validate` endpoint. We used to throw here if the
constraint couldn't be found, but the only reason we wanted to look for
the constraint in the db was to check for legal values. Now, instead,
we'll allow you to pass a constraint field that doesn't exist in the
database. We'll still check the values against the operator for
validity, we just don't control legal values anymore (because there
aren't any).

On the front end, we improve the handling by showing the deleted context
filed in the dropdown, both when the selector dropdown is closed and
when it is open. However, if you change the context field, we remove the
deleted field from the list. This seems like a sensible tradeoff. Means
you can't select it if you've deselected it.
2025-05-15 13:08:54 +02:00
Tymoteusz Czech
4d92d54f9a
feat: track last seen clients using bulk update (#9981)
Let's not update `lastSeen` in the db on each client call
2025-05-15 13:06:54 +02:00
Nuno Góis
480689e828
chore: revive archive page (#10001)
Related to:

-
https://linear.app/unleash/issue/2-3366/remove-get-apiadminarchivefeatures-deprecated-in-4100
-
https://linear.app/unleash/issue/2-3367/remove-get-apiadminarchivefeaturesprojectid-deprecated-in-4110

Brings back the overall flag archive page and table using the feature
flag search endpoint.
2025-05-15 11:54:52 +01:00
Jaanus Sellin
0255cf137a
fix: now feature is not pulled from server if not defined (#10000) 2025-05-15 11:54:40 +03:00
Nuno Góis
45c2a0b939
chore: small visual improvements to the new invite mail template (#9998)
https://linear.app/unleash/issue/2-3567/improve-the-look-of-the-unleash-instance-getting-started-email

Some small visual improvements to the email template after the latest
changes.

Follow-up to: https://github.com/Unleash/unleash/pull/9997
2025-05-15 08:52:01 +01:00
Jaanus Sellin
9aa0c4c738
feat: constraints that are in recents will have generated key (#9996)
Previously it was trying to get constraint id for key, but id did not
exist. Now for unique keys, I am using the hashed constraint payload.
2025-05-15 10:50:59 +03:00
Thomas Heartman
a2723ec0c0
chore remove and clean some stuff (#9993)
- Deletes an unused file
- Fixes a console.error due to a prop being passed on to the HTML
component
- Puts all editable constraint files within a separate directory.
2025-05-15 07:23:33 +00:00
Nuno Góis
e9768f7363
chore: new invite email template improvements (#9997)
https://linear.app/unleash/issue/2-3567/improve-the-look-of-the-unleash-instance-getting-started-email

Follow-up to: https://github.com/Unleash/unleash/pull/9980

Refactored the new email template to use a table-based layout with
inline styles for maximum compatibility across email clients, while
preserving the original design.
2025-05-14 17:26:56 +01:00
Nuno Góis
0e8f187948
chore: new getting started email template (#9980)
https://linear.app/unleash/issue/2-3567/improve-the-look-of-the-unleash-instance-getting-started-email

Adds a new getting started email template, hidden behind a
`newGettingStartedEmail` flag.

If it works nicely, we may follow up with PRs to update and align the
remaining email templates.

### Old


![image](https://github.com/user-attachments/assets/a1bf1ccd-7adb-4a41-b101-653c648c24f3)

### New


![image](https://github.com/user-attachments/assets/ebe600df-254f-4ebb-8976-69aa6b200d8a)
2025-05-14 15:55:38 +01:00
Thomas Heartman
a80b667cf5
chore(1-3747): minor strategy edit header updates (#9992)
Makes a few small changes to the strategy header:
- Removes the rollout percentage and environment indicator
- Changes the env disabled alert from warning to info
- Maybe moves the alert to the end of the form, only on the general tab
panel

I've placed the removal of the rollout percentage and env header behind
a flag, but not the alert changes.

Before:

![image](https://github.com/user-attachments/assets/29382afe-9a75-4138-be1c-2bab45a75787)


After:
<img width="1239" alt="image"
src="https://github.com/user-attachments/assets/db73c9c8-3244-40db-9991-c412c9aadc18"
/>
2025-05-14 12:48:46 +00:00
Jaanus Sellin
ba80c925e7
feat: now pressing enter will submit the new rollout percentage (#9995) 2025-05-14 15:01:55 +03:00
Jaanus Sellin
a0e4f08507
feat: now updating strategy also saves recents (#9990)
The issue was that processing constraints after the API call in
updateStrategyOnFeature caused React's state updates to be interrupted
before they could be persisted to localStorage, but by moving that
processing before the API call, we ensure constraints are saved
immediately, regardless of API timing.
2025-05-14 15:01:11 +03:00
Thomas Heartman
26a1156959
1-3744: Set a min-width for context field selector + underline when not focused (#9991)
When you have very short names (1--2 characters) the field itself can be
hard to see, so we'll set a min width.

Before (with hover): 
<img width="455" alt="image"
src="https://github.com/user-attachments/assets/a9590d3d-88a2-4814-9581-33b8378f4524"
/>

After (without hover):
<img width="523" alt="image"
src="https://github.com/user-attachments/assets/1e7b6028-e142-442a-9b53-55425d2d6c59"
/>
2025-05-14 11:56:05 +00:00
Gastón Fournier
23d55340f2
chore: now we need to build before running tests (#9989)
This should fix the coverage report
2025-05-14 11:33:32 +00:00
renovate[bot]
d17d68d6aa
chore(deps): update node.js to v22 (#9487) 2025-05-14 10:31:18 +00:00
dependabot[bot]
4f7fb8f1ae
chore(deps): bump formidable from 3.5.1 to 3.5.4 (#9865) 2025-05-14 09:55:11 +00:00
Mateusz Kwasniewski
1523e2d056
feat: plausible tracking for links (#9988) 2025-05-14 11:19:37 +02:00
Gastón Fournier
abe160eb7d
feat: Unleash v7 ESM migration (#9877)
We're migrating to ESM, which will allow us to import the latest
versions of our dependencies.

Co-Authored-By: Christopher Kolstad <chriswk@getunleash.io>
2025-05-14 09:47:12 +02:00
Thomas Heartman
c358a8ffd3
Make hover underline purple (#9985)
Uses a purple color for the hover underline. Also, sets it to be
transparent when not-hovered, so that you get a nice fade in effect.

Focus (top) and hover (bottom) now have the same visual style, but
different ways to get to that state (expansion vs fade-in):
<img width="979" alt="image"
src="https://github.com/user-attachments/assets/e342ea4e-4821-4e4c-bb5d-6b9d3a672e26"
/>
2025-05-14 06:57:20 +00:00
Jaanus Sellin
aa885b9afd
feat: now recently used constraints are not shown if already in use (#9984) 2025-05-14 09:53:50 +03:00
Jaanus Sellin
9bd69a852e
feat: now only recents show segments that are not being used currently (#9983)
Now only recents show segments that are not being used currently
2025-05-14 09:40:33 +03:00
Thomas Heartman
96a388298f
fix(1-3740): Don't autofocus the editable constraint field. (#9982)
There can be any number of these on a page, so setting autofocus here is
a Bad Idea (TM). It's probably a holdover from when the input was an
accordion and we wanted to give you focus when you opened it (we do a
similar thing for the popover, for instance).

This property will cause you to focus (and potentially scroll) to the
last constraint on the page.
2025-05-14 08:04:47 +02:00