1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-12 13:48:35 +02:00
Commit Graph

2900 Commits

Author SHA1 Message Date
Mateusz Kwasniewski
e414c4446d
feat: remove instances older than 1 day not 2 days (#9944) 2025-05-09 13:58:52 +02:00
Tymoteusz Czech
f02c883da5
feat: external link templates (#9927)
Adds support for link templates in projects, allowing reusable URL
patterns with placeholders. Includes validation, database changes,
updated API schemas, and tests.
2025-05-09 12:40:14 +02:00
Nuno Góis
bfc583b5b7
chore: prevent duplicate key errors in unknown flags (#9940)
https://linear.app/unleash/issue/2-3561/fix-duplicate-key-errors-in-unknown-flags

This should prevent `duplicate_key` errors in unknown flags.

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-09 10:02:38 +01:00
Mateusz Kwasniewski
43efaf7c47
feat: report feature links by domain (#9936) 2025-05-09 09:39:15 +02:00
Mateusz Kwasniewski
857ee7da5c
feat: prevent more than 10 links in the UI and backend (#9937) 2025-05-08 21:21:28 +02:00
Mateusz Kwasniewski
a3ac624deb
feat: report top used domains (#9934) 2025-05-08 14:06:10 +02:00
Tymoteusz Czech
499ee1e099
migration: project settings - external link templates (#9933) 2025-05-08 13:51:21 +02:00
Mateusz Kwasniewski
28e5f39548
feat: store domain for links (#9931) 2025-05-08 13:33:41 +02:00
Mateusz Kwasniewski
9ca44e6188
feat: add domain to links (#9930) 2025-05-08 13:20:47 +02:00
Mateusz Kwasniewski
3865fb41ae
fix: project environments have info about required approvals (#9929) 2025-05-08 11:37:15 +02:00
Mateusz Kwasniewski
c8ebaa49fc
feat: order links by insertion order (#9928) 2025-05-08 10:46:26 +02:00
Nuno Góis
eb238f502a
chore: unknown flags (#9837)
https://linear.app/unleash/issue/2-3406/hold-unknown-flags-in-memory-and-show-them-in-the-ui-somehow

This PR introduces a suggestion for a “unknown flags” feature.

When clients report metrics for flags that don’t exist in Unleash (e.g.
due to typos), we now track a limited set of these unknown flag names
along with the appnames that reported them. The goal is to help users
identify and clean up incorrect flag usage across their apps.

We store up to 10 unknown flag + appName combinations, keeping only the
most recent reports. Data is collected in-memory and flushed
periodically to the DB, with deduplication and merging to ensure we
don’t exceed the cap even across pods.

We were especially careful to make this implementation defensive, as
unknown flags could be reported in very high volumes. Writes are
batched, deduplicated, and hard-capped to avoid DB pressure.

No UI has been added yet — this is backend-only for now and intended as
a step toward better visibility into client misconfigurations.

I would suggest starting with a simple banner that opens a dialog
showing the list of unknown flags and which apps reported them.

<img width="497" alt="image"
src="https://github.com/user-attachments/assets/b7348e0d-0163-4be4-a7f8-c072e8464331"
/>
2025-05-07 11:48:36 +01:00
Mateusz Kwasniewski
2b73b17579
feat: feature links section (#9915) 2025-05-07 11:35:41 +02:00
Mateusz Kwasniewski
20a80142d3
feat: normalize urls in feature links (#9911) 2025-05-06 19:08:04 +02:00
David Leek
681079bd08
chore: clean up adminNavUI flag (#9907) 2025-05-06 14:59:07 +02:00
Mateusz Kwasniewski
b9f1d8414c
feat: add links to feature read model (#9905) 2025-05-06 14:57:52 +02:00
Mateusz Kwasniewski
c6ab2a1cf7
feat: sql feature link persistence (#9901) 2025-05-06 11:46:15 +02:00
Mateusz Kwasniewski
bb82b6920b
feat: feature link migration (#9900) 2025-05-06 11:21:20 +02:00
Tymoteusz Czech
af93f93836
refactor: remove flagOverviewRedesign flag (#9888)
Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2025-05-06 10:25:57 +02:00
Mateusz Kwasniewski
4860d73bf7
chore: feature links flag (#9896) 2025-05-06 09:46:18 +02:00
Mateusz Kwasniewski
002233e7f6
feat: feature link backend stub (#9893) 2025-05-06 09:31:45 +02:00
David Leek
1166d00e6d
chore: flag cleanup simplifyDisableFeature (#9892) 2025-05-06 08:41:03 +02:00
Melinda Fekete
7ca79c1b84
docs: update self-hosting guide (#9855) 2025-05-05 15:57:17 +02:00
Mateusz Kwasniewski
1b9c0e5000
feat: bulk apps should respect multi projects and multi envs (#9879) 2025-05-02 10:12:41 +02:00
Mateusz Kwasniewski
b0223e38ef
refactor: stabilize frontend apps reporting (#9880) 2025-05-01 15:43:03 +02:00
Mateusz Kwasniewski
3ef32dca93
feat: handle nullable sdk type (#9872) 2025-04-30 12:36:18 +02:00
Mateusz Kwasniewski
9e4c3a388f
feat: allow nullable client ip for frontend apps (#9867) 2025-04-30 10:03:16 +02:00
Mateusz Kwasniewski
58a01d0c47
feat: separate frontend and backend applications from edge (#9863) 2025-04-29 15:42:47 +02:00
Mateusz Kwasniewski
3980cfa2a8
feat: show backend and frontend sdks separately (#9857) 2025-04-29 10:36:02 +02:00
Mateusz Kwasniewski
1ccc6cae19
feat: Spike frontend applications registration (#9846) 2025-04-28 09:01:07 +02:00
Mateusz Kwasniewski
bd78a75177
chore: remove flag for global change request config (#9840) 2025-04-25 12:47:18 +02:00
Mateusz Kwasniewski
085c62c99a
feat: client instances sdk type (#9844) 2025-04-25 12:20:48 +02:00
David Leek
776594a1b0
chore: remove an old test for old migration that we now know works (#9841) 2025-04-25 08:31:15 +00:00
Mateusz Kwasniewski
d9765269b2
feat: remove old instances based on last seen not created at (#9833) 2025-04-24 16:33:12 +02:00
Mateusz Kwasniewski
d24bcff404
feat: remove inactive applications (#9835) 2025-04-24 15:17:47 +02:00
Mateusz Kwasniewski
9911fe89be
feat: lifecycle count query (#9824) 2025-04-24 09:36:06 +02:00
Gastón Fournier
0a752fbf47
feat: local dev should honor our schemas (#9799)
Spotted this in local dev mode:
```
[2025-04-17T15:10:21.036] [DEBUG] openapi-service.ts - Invalid response: {
    "schema": "#/components/schemas/environmentsProjectSchema",
    "errors": [
        {
            "instancePath": "/environments/0",
            "schemaPath": "#/additionalProperties",
            "keyword": "additionalProperties",
            "params": {
                "additionalProperty": "requiredApprovals"
            },
            "message": "must NOT have additional properties"
        }
    ]
}
```
Enabling strictSchemaValidation in dev mode should help prevent these
issues from going out to prod as developers would identify them while
testing locally
2025-04-23 09:58:39 +02:00
Mateusz Kwasniewski
da05c7be5c
chore: remove disable notifications UI (#9814) 2025-04-22 15:03:15 +02:00
Gastón Fournier
a88e781391
feat: run cypress against current branch (#9793)
## About the changes
Currently, we're running against the older version of our UI. When
making changes to it we want to make sure we're testing the current code

**Details in comments**

---------

Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2025-04-22 11:58:22 +02:00
Gastón Fournier
331de07e39
fix: double token initialization (#9783)
## About the changes
Initially at Unleash we started using `process.nextTick` inside
constructors to delay initialization of services.
Later we stared using a pattern where we instantiate services multiple
times.
The problem is the first pattern implies we have singleton services,
while the second pattern breaks the singleton.

There are reasons for both patterns, but we've decided that
`process.nextTick` inside constructors is not something we want to keep
as it creates side effects from creating objects. Instead this PR
proposes a more explicit approach.

Fixes #9775
2025-04-17 09:22:35 +02:00
Mateusz Kwasniewski
695c50b7d6
chore: cleanup reminder flag (#9769) 2025-04-16 11:25:50 +02:00
Mateusz Kwasniewski
67d59d6141
chore: aggregate daily metrics query time instrumentation (#9764) 2025-04-15 14:52:03 +02:00
Mateusz Kwasniewski
6396da3e77
fix: improve health rating job performance (#9761) 2025-04-15 14:20:26 +02:00
Ivar Conradi Østhus
a6c2cef71a
Revert "fix: use unleash to enable frontend SDK with token via varian… (#9759) 2025-04-15 09:01:51 +00:00
Mateusz Kwasniewski
0efa2585fe
fix: improve status job performance (#9755) 2025-04-15 09:33:13 +02:00
Ivar Conradi Østhus
fc40a4b4d8
fix: use unleash to enable frontend SDK with token via variant (#9757) 2025-04-15 09:27:54 +02:00
Mateusz Kwasniewski
9a25664a83
refactor: move batch execute to oss (#9754) 2025-04-14 15:33:02 +02:00
Mateusz Kwasniewski
ff3c17ffa7
refactor: extract flags overview sql builders (#9751) 2025-04-14 10:56:28 +02:00
Mateusz Kwasniewski
b2471633b4
refactor: move release plan stores to OSS (#9747) 2025-04-11 11:37:06 +02:00
Ivar Conradi Østhus
3f5f43933a
fix: flag-resolver context type 2025-04-10 10:44:18 +02:00
Mateusz Kwasniewski
8f117ac18e
feat: add milestones to search results (#9739) 2025-04-10 10:25:39 +02:00
Ivar Conradi Østhus
33e852cccd
fix: flag-resolver should resolve external static context 2025-04-10 10:16:14 +02:00
Ivar Conradi Østhus
311d75be28
add hosted edge to allowed connect-src 2025-04-10 09:25:23 +02:00
Ivar Conradi Østhus
e63b28c1b8
feat: use Unleash React SDK in Admin UI (#9723)
In this PR I integrate the Unleash React SDK with the Admin UI. 

We also take advantage of Unleash Hosted Edge behind the scenes with
multiple regions to get the evaluations close to the end user.
2025-04-10 08:26:30 +02:00
Mateusz Kwasniewski
e876e6438d
feat: total count respect lifecycle filter (#9724) 2025-04-09 08:54:19 +02:00
Nuno Góis
1078dd1c41
fix: return bad data error when failing to patch env variants (#9708)
https://linear.app/unleash/issue/2-3483/variants-endpoint-should-return-400-or-other-more-appropriate-status

Throws BadDataError (returns 400) instead of 500 by wrapping the patch
logic with a try catch.

Added a test that validates the new behavior.
2025-04-08 09:32:40 +01:00
Tymoteusz Czech
1a85b46acc
feat: rename search page and change icon (#9706)
Behind flagsReleaseManagementUI flag
2025-04-07 15:49:44 +02:00
Mateusz Kwasniewski
588e35e759
feat: search by lifecycle stage (#9705) 2025-04-07 14:00:01 +02:00
Melinda Fekete
5ed3041b11
docs: updates to Unleash Frontend API docs and Unleash architecture overview (#9513) 2025-04-07 12:38:00 +02:00
Mateusz Kwasniewski
4130e06d17
feat: flag overview change requests (#9702) 2025-04-04 14:20:42 +02:00
Thomas Heartman
6b5c29a6e6
chore: Add flag for add/edit strategies (#9699)
Adds a flag for the edd/edit strategies updates.
2025-04-04 10:18:05 +02:00
Jaanus Sellin
b44ac069ae
feat: new feature strategy menu (#9678) 2025-04-02 09:00:34 +00:00
Thomas Heartman
f6e786a6c0
Remove caseInsensitiveInOperators flag (#9670)
The flag has never made it out of dev, and has not been turned on
consistently since 2023. There was a project for it, but we have since
abandoned it.
2025-04-01 14:57:32 +02:00
Gastón Fournier
d11f39e401
chore: expose custom strategy metrics in prometheus (#9657)
## About the changes
These metrics are sent to version info but not exposed in prometheus and
they can provide valuable data about their usage
2025-03-31 16:02:50 +02:00
Gastón Fournier
ef1b6ec227
chore: decrease ui observability to warn (#9658)
These errors are not acted upon and is not something we can act on.
Reducing it's level to WARN following
https://github.com/Unleash/unleash/blob/main/website/docs/contributing/ADRs/overarching/logging-levels.md
2025-03-31 16:02:28 +02:00
Gastón Fournier
eae7535bfc
feat: remove access overview flag making it GA ready (#9654)
This is exposing information we already have about permissions in a UI
that should help users have an overview of the permissions of a user
with regards to projects and environments
2025-03-31 14:33:38 +02:00
Mateusz Kwasniewski
3ced6a3780
refactor: environments in feature directory (#9650) 2025-03-31 13:58:37 +02:00
Mateusz Kwasniewski
1f1b00c38f
chore: fixing typo pre-defined (#9651) 2025-03-31 13:58:22 +02:00
Mateusz Kwasniewski
9de0e7435b
feat: enforce env change request on project create (#9646) 2025-03-31 09:29:20 +02:00
Christopher Kolstad
14c8b97441
task: added a hook for cleanly deciding new or old admin menu (#9645) 2025-03-28 14:45:09 +01:00
Mateusz Kwasniewski
1bd328f4e1
feat: create and edit environment required approvals (#9621) 2025-03-26 15:54:46 +01:00
Fredrik Strand Oseberg
832b651f5b
fix: flaky test once an hour (#9615)
This test was flaky once an hour because subminutes 3 made it fall into
the wrong bucket when tests were run exactly or minutes after the our
had passed.

Also, the databases created were created with the system clock. I
altered it to be explicitly UTC.
2025-03-25 22:25:32 +01:00
Mateusz Kwasniewski
4677b28aee
feat: persist env required approvals (#9616) 2025-03-25 16:04:14 +01:00
Mateusz Kwasniewski
497cbcdef2
feat: environment required approvals migration (#9612) 2025-03-25 15:33:58 +01:00
Fredrik Strand Oseberg
7d7a949093
feat: backend for retrieving tag colors (#9610)
Add backend for retrieving tag colors
2025-03-25 14:45:44 +01:00
Simon Hornby
dbc953b222
chore: consolidate release plan flags (#9606)
Removes the `releasePlanChangeRequests` flag and swaps existing references to it to the `releasePlans` flag instead
2025-03-25 13:36:23 +02:00
Mateusz Kwasniewski
eeb531dd45
feat: expose required approvals for envs (#9608) 2025-03-25 12:20:42 +01:00
Mateusz Kwasniewski
c161291d09
chore: globalChangeRequestConfig flag (#9607) 2025-03-25 10:51:18 +01:00
Jaanus Sellin
34abb2669e
fix: now hydration event will have segments inside (#9597) 2025-03-24 13:26:48 +02:00
Gastón Fournier
92a13c4c55
fix: all users have a root role and warning if not (#9584)
## About the changes
SCIM provisioned users ended up without a root role. Unleash was
assigning them the Viewer role by code but some queries using the db to
resolve the role did not have the same logic leading to weird behaviors.

This amends the situation by assigning the Viewer role to those users
following the least privilege principle.

Also adds a warning when assuming the Viewer role. That should never
happen but we want to be confident before removing it.

Depends on
https://github.com/bricks-software/unleash-enterprise/pull/164
2025-03-20 13:59:37 +01:00
Fredrik Strand Oseberg
d437fc7bdd
fix: s is possibly null (#9578)
Fixes an issue where s was possibly null and Unleash would not build
after turning on strictNullChecks.
2025-03-19 09:50:54 +00:00
Fredrik Strand Oseberg
aad5a6a1a9
Feat/tag type colors frontend (#9566)
Add frontend support for tag type colors
2025-03-19 10:03:33 +01:00
Christopher Kolstad
efcf04487d
chore: make it build with strict null checks set to true (#9554)
As part of preparation for ESM and node/TSC updates, this PR will make
Unleash build with strictNullChecks set to true, since that's what's in
our tsconfig file. Hence, this PR also removes the `--strictNullChecks
false` flag in our compile tasks in package.json.

TL;DR - Clean up your code rather than turning off compiler security
features :)
2025-03-19 10:01:49 +01:00
Fredrik Strand Oseberg
a65c8baf56
Feat/tag type colors backend (#9565)
Adds backend color support for tag types
2025-03-18 15:27:41 +01:00
Fredrik Strand Oseberg
9bdad5ee44
Feat/tag colors migration (#9560)
Adds a color field to the tag types table
2025-03-18 15:01:59 +01:00
David Leek
35ed2dabf3
feat: rework navigation sidebar admin section (#9556) 2025-03-18 10:35:06 +01:00
Nuno Góis
bf34ac18fc
chore: add user access overview schema (#9552)
https://linear.app/unleash/issue/2-3403/add-response-schema-for-access-overview

Adds a response schema for the user access overview.
2025-03-17 15:32:12 +00:00
Gastón Fournier
9f0155e0cf
chore: cleanup old test dbs (#9539)
This cleans up old dbs before running a new test
2025-03-14 11:44:58 +02:00
David Leek
f9c152995c
chore: new flag adminNavUI for admin UI 2.0 (#9537) 2025-03-14 09:30:30 +01:00
Nuno Góis
0d0530b61c
chore: rename access matrix to access overview (#9531)
https://linear.app/unleash/issue/2-3344/new-name-access-overview-instead-of-access-matrix

Renames Access Matrix to Access Overview, both internally (code) and
externally (UI).
2025-03-13 15:23:58 +00:00
Jaanus Sellin
482443f373
feat: frontend consumption table (#9523)
Similar to backend traffic, we have table for frontend traffic. We might
want to rename the backend on to align with this one.
2025-03-12 16:44:01 +02:00
Gastón Fournier
4ffd3e7116
chore: stop using feature service v2 (#9500)
Just replacing references as both are interchangeable


143c8a3074/src/lib/types/services.ts (L81-L82)

Depends on
https://github.com/bricks-software/unleash-enterprise/pull/138
2025-03-12 11:44:47 +01:00
Nuno Góis
6b888abe10
chore: remove project at least one owner constraint (#9517)
https://linear.app/unleash/issue/2-3393/remove-project-at-least-one-owner-constraint

Removes our constraint that the project must have at least one owner.
2025-03-12 10:37:20 +00:00
Nuno Góis
242b0de592
chore: show events IP (#9512)
https://linear.app/unleash/issue/2-3392/visualize-event-log-ip-address-on-unleash-enterprise-ui

Shows events IP for Unleash Enterprise.


![image](https://github.com/user-attachments/assets/3ffbc69b-6dce-4c16-9d3d-77a404623d96)
2025-03-12 10:06:29 +00:00
Gastón Fournier
d1d1a740f3
chore: remove deprecated method from project-service (#9498)
Depends on
https://github.com/bricks-software/unleash-enterprise/pull/137

This method has been deprecated and has an alternative. Migrating to
that alternative
2025-03-12 11:03:31 +01:00
Vignesh S
ffb17d43ba
fix: features table migrations in 20220603081324-add-archive-at-to-fea… (#9518)
Changes to migration file -
20220603081324-add-archive-at-to-feature-toggle.js

1. Fixes the migration script where features table is updated with
archived_at column with the latest date instead of taking the date from
the events table.
2. Also it fails for the latest toggle which was archived and then
revived but after migration it updates the toggle as archived toggle.
3. Also because of the buggy reference to the outer join's events table
`e` its taking a huge time to run the migration.

This PR fixes all the above issues.

## About the changes

We have faced an issue during migration of unleash-server from 4.8.2 to
6.6.0 where one of our toggle which was archived and unarchived once
before migration and that was the latest toggle in terms of the archived
date, but after the migration was ran it was in archived status.

Upon further debugging and running the SQL command in the features table
migration file we noticed that we should not be referencing the outer
join's events table `e` for the feature_name check and additionally we
should add the features table's archived toggle check instead.

### Important files

The change in only in this file.


[20220603081324-add-archive-at-to-feature-toggle.js](https://github.com/Unleash/unleash/pull/9518/files#diff-b91c299b96edc46ca3a1963bf54966aa777c9fa107f3bd8b45f5fb54dc57460e)

## Discussion points

Let me know if any further details is required.
2025-03-12 10:28:04 +01:00
sjaanus
c09afa3e99
git status 2025-03-12 11:03:54 +02:00
Gastón Fournier
a9bc9244ab
chore: remove legacy feature type (#9499)
This has been deprecated 4 years ago and is not used
2025-03-11 12:06:54 +01:00
Gastón Fournier
111a676093
chore: remove deprecated getAdmin from client features store (#9497)
This method has been deprecated 2 years ago and is not used
2025-03-11 12:04:25 +01:00
Melinda Fekete
7534b66c18
Fix broken anchors in docs (#9406) 2025-03-11 11:45:40 +01:00
Tymoteusz Czech
312adc0c1a
chore: remove granularAdminPermissions flag (#9467)
- removed a flag
- deprecated `POST /admin/ui-config` endpoint in favor of `POST
/admin/ui-config/cors`
2025-03-10 16:36:59 +01:00
Mateusz Kwasniewski
dfed9c0773
feat: create connection count consumption table (#9444) 2025-03-10 12:51:11 +01:00
Thomas Heartman
8629cda4d7
chore: remove dataUsageMultiMonthView flag (#9429)
Remove data usage multi month view flag and deprecated components and
functions.
2025-03-05 12:08:33 +01:00
Thomas Heartman
a50fb7db35
chore: remove frontendHeaderRedesign flag (#9428)
Removes all references to the flag and deletes unused components.
2025-03-05 09:40:53 +01:00
Simon Hornby
e7ac42080d
feat: project environments include visible property (#9427) 2025-03-05 10:09:25 +02:00
David Leek
065fd4b469
chore: archive release plan template event (#9414) 2025-03-05 08:08:28 +01:00
David Leek
2ae447cd40
chore: migration for new archive columns on release defintion (#9412) 2025-03-04 14:36:30 +01:00
Simon Hornby
f3ede7681f
chore: flip UI and backend validation for project env disabling (#9395) 2025-03-03 17:13:41 +02:00
David Leek
836c920154
fix: get all strategies and check if env to be disabled (#9357) 2025-02-28 11:03:28 +01:00
Mateusz Kwasniewski
e29eb51f3c
chore: consumption model flag (#9379) 2025-02-27 09:45:07 +01:00
Jaanus Sellin
9ae9221960
feat: now instances are only shown for last 24 hours (#9372) 2025-02-27 09:19:48 +02:00
Jaanus Sellin
e0f0108c19
feat: SQL performance optimization to count instances (#9369) 2025-02-27 09:11:00 +02:00
Tymoteusz Czech
4e7ce65567
chore: remove uiGlobalFontSize flag (#9331)
1-3383
2025-02-26 12:39:53 +01:00
Gastón Fournier
3f373665ed
feat: ignore events in log when nothing has changed (#9364)
## About the changes
Some automation may keep some data up-to-date (e.g. segments). These
updates sometimes don't generate changes but we're still storing these
events in the event log and triggering reactions to those events.


Arguably, this could be done in each service domain logic, but it seems
to be a pretty straightforward solution: if preData and data are
provided, it means some change happened. Other events that don't have
preData or don't have data are treated as before.

Tests were added to validate we don't break other events.
2025-02-26 09:15:01 +01:00
Jaanus Sellin
c14cc3346e
chore: remove deltaApiStreaming flag (#9362) 2025-02-25 16:46:34 +02:00
Nuno Góis
a91876790e
chore: deprecate and undeprecate protected environments (#9360)
https://linear.app/unleash/issue/2-3320/allow-users-to-deprecate-and-undeprecate-protected-environments

Allows users to deprecate and undeprecate protected environments.


![image](https://github.com/user-attachments/assets/621684d3-21e3-4f58-b6b5-2d2731c9fd9e)
2025-02-25 13:41:41 +00:00
Nuno Góis
add4191381
chore: months old version banner (#9352)
https://linear.app/unleash/issue/2-3309/warn-users-of-lagging-versions-3-months-old

Adds a banner warning users in case they are running an outdated Unleash
version (>=3 months old) in case the build date data is present.

When clicking "Changelog" the users are redirected to
https://github.com/Unleash/unleash/releases.


![image](https://github.com/user-attachments/assets/f6b9b361-e780-4558-8b6c-5987b12efe68)
2025-02-25 12:48:55 +00:00
Jaanus Sellin
55eb73cf08
feat: now project moving is split into two events (#9358)
When project is moved, then Unleash creates only one event, which is for
target project.
We also need one for source project, to know that project was moved out
of it.

Test will be in enterprise repo.
2025-02-25 12:45:24 +02:00
Jaanus Sellin
4630068b0a
feat: add tests for filterEventsByQuery (#9338) 2025-02-20 14:52:01 +02:00
Nuno Góis
7340c74b1b
refactor: rename networkViewEnabled to prometheusAPIAvailable (#9330)
https://linear.app/unleash/issue/2-3290/rename-networkviewenabled-to-prometheusapiavailable

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

See: https://github.com/Unleash/unleash/pull/9325#discussion_r1960085303

Renames `networkViewEnabled` to `prometheusAPIAvailable`. This new name
better reflects what it stands for.
2025-02-19 14:38:59 +00:00
Nuno Góis
b4bfadd95e
chore: visualize connected edges (#9325)
https://linear.app/unleash/issue/2-3233/visualize-connected-edge-instances

Adds a new tab in the Network page to visualize connected Edges.

This is behind a `edgeObservability` flag.

Also opens up the Network page even if you don't have a Prometheus API
configured. When accessing the tabs that require it to set, and it
isn't, we show some extra information about this and redirect you to the
respective section in our docs.


![image](https://github.com/user-attachments/assets/1689f785-7544-450b-8c33-159609fc0f7d)


![image](https://github.com/user-attachments/assets/a7a14805-0488-41d2-885f-5e11a8495127)


![image](https://github.com/user-attachments/assets/918cba87-5538-4600-a71f-1143b2e33e2a)
2025-02-19 12:23:52 +00:00
Ivar Conradi Østhus
7811e4e264
fix: use bucket stop as timestamp for metrics bucket (#9327)
This fixes a problem where the yggdrasil-engine does not send the
correct value for bucket.start. In practice clients sends metrics every
60s and it does not matter if we use start or the stop timestamp to
resolve the nearest full hour.
2025-02-19 10:38:11 +02:00
Jaanus Sellin
ca562c548d
feat: project field to feature removed event (#9322)
Start sending out project for feature deleted, as we need it for edge to
keep exact copy.
2025-02-19 09:37:10 +02:00
Ivar Conradi Østhus
3f730bb7f3
fix: add a metric to track client registrations (#9314)
Adding a counter to track every time a client registers with Unleash.
2025-02-17 09:01:19 +01:00
Christopher Kolstad
edd03d02dd
task: add status_code to edge traffic table to store 304s as well (#9312) 2025-02-14 14:52:45 +01:00
Thomas Heartman
aafacc68cf
feat: new flag header (#9302)
Initial spike to add the new design for the flag page header
2025-02-14 14:33:35 +01:00
Jaanus Sellin
4a72580b24
fix: return undefined from delta if no events (#9311)
Nameprefix can remove events from result, so we should send 304 in that
case.
2025-02-14 12:28:43 +02:00
Nuno Góis
0e208fd8eb
chore: add change request events to teams integration (#9309)
https://linear.app/unleash/issue/2-3265/investigate-teams-integration-for-change-request-notifications

Adds change request events to the Teams integration.
2025-02-14 09:43:56 +00:00
Christopher Kolstad
1dad28fdb5
task: add edge observability tables (#9307)
Adds two stat tables to store edge observability data.
2025-02-14 08:48:13 +00:00
Fredrik Strand Oseberg
fa43420ab9
fix: mutating delta events (#9303)
Fix a bug where delta events would be mutated due to Object.assign.
2025-02-14 10:30:14 +02:00
Jaanus Sellin
aa15fbee9a
fix: hydration event should update with every event (#9310)
We were not updating hydration event id. This fixes it.
2025-02-14 09:35:08 +02:00
Christopher Kolstad
8de801025f
task: make setting service handle conflict on insert (#9160)
Currently, in enterprise we're struggling with setting service and
transactionality; all our verfications says that the setting key is not
present, so setting-store happily tries to insert a new row with a new
PK. However, somehow at the same time, the key already exists. This
commit adds conflict handling to the insertNewRow.
2025-02-13 15:54:43 +01:00
Thomas Heartman
243088fdca
fix: Add strategy and more strategies button are different heights (#9300)
Fixes the height discrepancy between add strategy and more strategies
buttons, both with and without the flag enabled.

The essence of the fix is to make the "more strategies" button's height
dynamic and grow to match the height of the other button.



Before (flag enabled):

![image](https://github.com/user-attachments/assets/4dda44b3-3add-40cd-93ed-48150e73ac35)

After (flag enabled):

![image](https://github.com/user-attachments/assets/2788f141-fe64-4733-9202-f9f115396001)


Before (flag disabled):

![image](https://github.com/user-attachments/assets/c3a9d396-cb30-4a61-9400-45458189d3f2)

After (flag disabled):

![image](https://github.com/user-attachments/assets/0570ff85-401a-4e6f-93e7-d1619a4cd848)

As a bonus: also enables the ui font redesign flag for server-dev.

If you're very sharp-eyed, you might notice a few things:

1. There's more padding on the new button. This was done in concert with
UX when we noticed there was more padding on other buttons. So as a
result, we set the button type to the default instead of "small".

1. The kebab button isn't perfectly square with the flag on. There's a
few issues here, but essentially: to use `aspect-ratio: 1`, you need
either a height or a width set. Because we want everything here to be
auto-generated (use the button's intrinsic height), I couldn't make it
work. In the end, I think this is close enough. If you have other ideas,
you're very welcome to try and fix it.
2025-02-12 13:54:06 +01:00
Nuno Góis
151db95c2d
feat: frontend API POST endpoint (#9291)
https://linear.app/unleash/issue/2-3260/implement-post-request-support-in-unleashs-frontend-api

Implements the POST endpoint in Unleash's frontend API.
2025-02-12 11:56:51 +00:00
David Leek
5921f0ea09
chore: add migration that backfills scim user email hashes (#9295) 2025-02-12 09:05:36 +01:00
Mateusz Kwasniewski
54766fd4a0
feat: connection count usage (#9294) 2025-02-11 16:15:45 +01:00
Tymoteusz Czech
cac38b0cee
fix: font size flag change to boolean (#9290)
## About the changes
Fix for `uiGlobalFontSize` flag being returned as an object, which is truthy.
2025-02-11 13:24:18 +01:00
Gastón Fournier
5e9698fe63
chore: Create test db from template (#9265)
## About the changes
Based on the first hypothesis from
https://github.com/Unleash/unleash/pull/9264, I decided to find an
alternative way of initializing the DB, mainly trying to run migrations
only once and removing that from the actual test run.

I found in [Postgres template
databases](https://www.postgresql.org/docs/current/manage-ag-templatedbs.html)
an interesting option in combination with jest global initializer.

### Changes on how we use DBs for testing

Previously, we were relying on a single DB with multiple schemas to
isolate tests, but each schema was empty and required migrations or
custom DB initialization scripts.

With this method, we don't need to use different schema names
(apparently there's no templating for schemas), and we can use new
databases. We can also eliminate custom initialization code.

### Legacy tests

This method also highlighted some wrong assumptions in existing tests.
One example is the existence of `default` environment, that because of
being deprecated is no longer available, but because tests are creating
the expected db state manually, they were not updated to match the
existing db state.

To keep tests running green, I've added a configuration to use the
`legacy` test setup (24 tests). By migrating these, we'll speed up
tests, but the code of these tests has to be modified, so I leave this
for another PR.

## Downsides
1. The template db initialization happens at the beginning of any test,
so local development may suffer from slower unit tests. As a workaround
we could define an environment variable to disable the db migration
2. Proliferation of test dbs. In ephemeral environments, this is not a
problem, but for local development we should clean up from time to time.
There's the possibility of cleaning up test dbs using the db name as a
pattern:
2ed2e1c274/scripts/jest-setup.ts (L13-L18)
but I didn't want to add this code yet. Opinions?

## Benefits
1. It allows us migrate only once and still get the benefits of having a
well known state for tests.
3. It removes some of the custom setup for tests (which in some cases
ends up testing something not realistic)
4. It removes the need of testing migrations:
https://github.com/Unleash/unleash/blob/main/src/test/e2e/migrator.e2e.test.ts
as migrations are run at the start
5. Forces us to keep old tests up to date when we modify our database
2025-02-11 13:01:43 +01:00
Simon Hornby
bf9fdd4f8d
feat: allow SCIM user deletion (#9190)
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2025-02-10 14:17:46 +02:00
Jaanus Sellin
fb68692247
feat: add delta api streaming flag (#9269)
Lets add separate flag for delta streaming.
2025-02-10 11:22:16 +02:00
Ivar Conradi Østhus
ac1d8b9b70
fix: change log-level to info for filterExistingFlagNames 2025-02-09 22:50:04 +01:00
Ivar Conradi Østhus
d1b9ca00a0
fix: Killwitch to block usage-metrics from non-exiting flag-names (#9266)
Adds a killswitch called "filterExistingFlagNames". When enabled it will
filter out reported SDK metrics and remove all reported metrics for
names that does not match an exiting feature flag in Unleash.

This have proven critical in the rare case of an SDK that start sending
random flag-names back to unleash, and thus filling up the database. At
some point the database will start slowing down due to the noisy data.

In order to not resolve the flagNames all the time we have added a small
cache (10s) for feature flag names. This gives a small delay (10s) from
flag is created until we start allow metrics for the flag when
kill-switch is enabled. We should probably listen to the event-stream
and use that invalidate the cache when a flag is created.
2025-02-09 22:45:44 +01:00
Fredrik Strand Oseberg
af516537bd
fix: return if empty array (#9254)
Fixes an issue where segment-updated event would be added to cache even
though there were no correlated events. Tests needs to be added in
Enterprise.
2025-02-07 14:39:43 +01:00
Tymoteusz Czech
aa5c70f70e
fix: project roles - include change request config in project update (#9256)
Change request settings as a subset of "update project" role.
2025-02-07 13:42:48 +01:00
Jaanus Sellin
43e418e40a
feat: emit delta updated event (#9250)
Start emitting delta updated event and make delta cache service
singleton.
2025-02-07 10:52:11 +02:00
Tymoteusz Czech
4e36d2285e
chore: remove sortProjectRoles flag (#9226) 2025-02-06 19:40:10 +01:00
Tymoteusz Czech
54e4fd2190
chore: remove lifecycle v2 flag (#9224) 2025-02-06 14:54:45 +01:00
David Leek
9a8607b07e
chore: clear scim fields when deleting user + migration for existing cases (#9217) 2025-02-05 15:45:51 +01:00
Jaanus Sellin
a15d63672f
feat: client spec to support deltaApi (#9222)
Add client spec version for delta API.
2025-02-05 15:02:44 +02:00
Mateusz Kwasniewski
a11c965bec
feat: productivity report unsubscribed users (#9220) 2025-02-05 11:28:01 +01:00