1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00
Commit Graph

3046 Commits

Author SHA1 Message Date
Gastón Fournier
e0cdf6addd
feat: add users updated read model (#10693)
## About the changes
This adds a user read model using the updated_at new field in the users
table.
2025-09-24 17:39:03 +02:00
Mateusz Kwasniewski
413847374e
feat: using histogram metrics (#10695) 2025-09-24 17:02:29 +02:00
Mateusz Kwasniewski
3bb317ad6d
feat: node sdk with histogram (#10690) 2025-09-24 14:17:16 +02:00
Gastón Fournier
907727947a
Revert "feat: enforce email null when deleted is set" (#10682)
Reverts Unleash/unleash#10680

SCIM protocol requires us to keep the email stored, so this constraint
doesn't hold.
2025-09-23 17:25:39 +02:00
Gastón Fournier
d33e57a05f
feat: enforce email null when deleted is set (#10680)
## About the changes
When deleting a user we set the email to null and deleted_at to the
current date, there's no case where email is set and deleted_at is also
set.

We found some situations where this happens, specifically when SAML and
SCIM are used in conjunction
2025-09-23 14:43:53 +02:00
Gastón Fournier
a628755506
fix: SSO auto create with SCIM tend to override each other (#10675)
## About the changes
Having SCIM enabled with SAML and auto-create can generate issues with
each protocol stepping into the other protocol's toes.

This PR adds protection to avoid updating SCIM-managed users with SAML
data (cause SCIM will override this data later).

It also adds a new method in the store to check if we have cases where
deleted_at is set but the email is not cleared, and there's no delete
event in the audit log (we've found one case, and we believe it might be
related to interoperability issues between SAML and SCIM)
2025-09-22 17:55:22 +02:00
Mateusz Kwasniewski
8d03ce340d
feat: histogram impact metric ingestion (#10674) 2025-09-22 17:14:07 +02:00
Mateusz Kwasniewski
3296add50f
feat: batch histogram metric type (#10672) 2025-09-22 13:22:53 +02:00
David Leek
831b4541a9
fix: OSS export feature_env was always enabled for feature due to SQL join overwrite (#10667) 2025-09-18 10:01:25 +02:00
Nuno Góis
c2f6cfe45f
chore: remove AWS IAM DB auth prototype code (#10662)
https://linear.app/unleash/issue/2-3882/remove-aws-iam-db-auth-prototype-code

Removes the AWS IAM DB auth prototype code.

Related PRs:
- https://github.com/Unleash/unleash/pull/10609
- https://github.com/Unleash/unleash/pull/10617
- https://github.com/Unleash/unleash/pull/10622
- https://github.com/Unleash/unleash/pull/10635
- https://github.com/Unleash/unleash/pull/10639
- https://github.com/Unleash/unleash/pull/10643
2025-09-12 14:46:28 +01:00
Thomas Heartman
0ea006f72c
Add globalChangeRequestList flag to Unleash (#10645)
Add a flag for the new CR list feature.
2025-09-10 11:11:10 +00:00
Nuno Góis
86530bcfbd
chore: add proxy-aware regional STS authentication for AWS IAM DB auth (#10643)
https://linear.app/unleash/issue/2-3875/add-proxy-aware-regional-sts-authentication-for-aws-iam-db-auth

Adds proxy-aware regional STS authentication for AWS IAM DB auth.

We also added optional support for explicit IAM role assumption through
the `DATABASE_AWS_ROLE_ARN` environment variable.
2025-09-10 10:50:39 +01:00
Nuno Góis
7cec4d6923
chore: remove DB access checker (#10639)
Reverts our latest changes regarding debug logs.
2025-09-09 15:55:32 +01:00
Nuno Góis
71b0d424b8
chore: correctly import pg client (#10637)
Follow-up to: https://github.com/Unleash/unleash/pull/10635

Correctly imports pg client.
2025-09-09 13:38:14 +01:00
Nuno Góis
e3bc72483a
chore: add verbose logs to AWS IAM auth logic, add DB access checker (#10635)
https://linear.app/unleash/issue/2-3874/add-verbose-logs-to-aws-iam-auth-logic-including-a-db-access-checker

Adds verbose logs to our new AWS IAM DB auth logic. Also adds a DB
access checker that runs before our migrator and fails fast in case
something is wrong with DB access.

This should not affect the regular auth path.
2025-09-09 13:08:36 +01:00
Nuno Góis
b8cdd1d004
chore: add newStrategyModal flag (#10629)
https://linear.app/unleash/issue/2-3865/add-newstrategymodal-feature-flag

Adds `newStrategyModal` feature flag.

The approach here is to duplicate the existing
`FeatureStrategyMenuCards` into a `LegacyFeatureStrategyMenuCards`.
We'll continue working on the `FeatureStrategyMenuCards` component while
leaving `LegacyFeatureStrategyMenuCards` untouched. Once we're done with
the implementation and remove the flag we can drop the legacy file.

I think it's easier to reduce our add strategy buttons to a single one
right away (like we did with the `addConfiguration` flag in
https://github.com/Unleash/unleash/pull/10420). This allows us to focus
on the end result instead of having to implement things like "clicking
the 'add release template' button should show the modal filtered to only
release templates".

<img width="735" height="126" alt="image"
src="https://github.com/user-attachments/assets/6d10fab2-d091-40f3-9c36-05a6f28f7dda"
/>

<img width="995" height="742" alt="image"
src="https://github.com/user-attachments/assets/a0fb9366-89b5-44e1-a684-47ee30d6d36c"
/>
2025-09-08 12:16:27 +01:00
unleash-bot[bot]
9540ed6e3d
chore(AI): addConfiguration flag cleanup (#10628)
This PR cleans up the addConfiguration flag. These changes were
automatically generated by AI and should be reviewed carefully.

Fixes #10627

## 🧹 AI Flag Cleanup Summary
This change removes the `addConfiguration` feature flag. The feature was
discarded, so this cleanup reverts the UI to its state before the
`addConfiguration` flag was introduced. The primary change is in the
strategy
menu, where the single "Add configuration" button is removed and the
original
"Use template," "Add strategy," and "More" buttons are restored.
### 🚮 Removed
- **Flag Definitions**
- `addConfiguration` flag from `experimental.ts` on the backend.
- `addConfiguration` flag from `uiConfig.ts` on the frontend.
- `addConfiguration: true` from the `server-dev.ts` config.
- **UI Components & Logic**
- The conditional rendering in `FeatureStrategyMenu.tsx` that showed an
"Add
configuration" button.
- The `useUiFlag('addConfiguration')` hook call and its import from
`FeatureStrategyMenu.tsx`.
### 🛠 Kept
- **UI Components & Logic**
- The original set of buttons in `FeatureStrategyMenu.tsx`: "Use
template",
"Add strategy", and a "More strategies" icon button. This was the code
path for
when the flag was disabled.
### 📝 Why
The `addConfiguration` feature flag was marked as completed with the
outcome
"discarded". This cleanup removes the flag and all related code,
preserving only
the intended code path, which is the UI behavior from before the flag
was
introduced.

---------

Co-authored-by: unleash-bot <194219037+unleash-bot[bot]@users.noreply.github.com>
Co-authored-by: Nuno Góis <github@nunogois.com>
2025-09-08 07:38:10 -03:00
Nuno Góis
39ee5b97cb
chore: AWS IAM DB auth migrator (#10622)
https://linear.app/unleash/issue/2-3861/aws-iam-db-auth-migrator

Adapts the migrator logic to support AWS IAM DB auth.

Reverts a few changes from our earlier tests.
2025-09-04 16:14:02 +01:00
Mateusz Kwasniewski
ccaafb3716
feat: added new impact metrics events (#10621) 2025-09-04 15:32:41 +02:00
Nuno Góis
9388ef66d0
chore: IAM auth username env var takes precedence (#10618) 2025-09-04 15:01:27 +02:00
Nuno Góis
07f6970eed
chore: AWS IAM DB auth migrator, logs (#10617)
https://linear.app/unleash/issue/2-3860/aws-iam-db-auth-migrator-logs

AWS IAM DB auth migrator, logs.
2025-09-04 14:03:24 +02:00
Nuno Góis
6a8a6e2373
chore: add IAM db auth support (#10609)
https://linear.app/unleash/issue/2-3829/investigate-aws-iam-connection-support-for-unleash-docker

Adds AWS IAM DB connection support.
2025-09-04 10:29:43 +01:00
Mateusz Kwasniewski
9f90603bea
chore: bring back variant config (#10608) 2025-09-03 13:05:36 +02:00
Mateusz Kwasniewski
0c1fc54d62
fix: flag resolver isEnabled for variant configs (#10607) 2025-09-03 12:43:56 +02:00
Mateusz Kwasniewski
29133a9fc9
chore: revert original streaming config (#10606) 2025-09-03 12:25:18 +02:00
Mateusz Kwasniewski
5b74299420
chore: control streaming only with external resolver (#10605) 2025-09-03 11:41:33 +02:00
Mateusz Kwasniewski
277326c952
chore: allow streaming variant override (#10603) 2025-09-03 10:51:16 +02:00
Nuno Góis
d5f834e851
chore: add unknown flag metric for unique flag names (#10601)
https://linear.app/unleash/issue/2-3845/add-metric-for-unique-unknown-flag-names

Adds a new unknown flag metric for unique unknown flag names.

<img width="864" height="126" alt="image"
src="https://github.com/user-attachments/assets/c20ce53e-eff3-4cda-af4b-f2c2aae8575c"
/>
2025-09-03 08:44:28 +01:00
unleash-bot[bot]
dfa89d7d58
chore(AI): reportUnknownFlags flag cleanup (#10596)
This PR cleans up the reportUnknownFlags flag. These changes were
automatically generated by AI and should be reviewed carefully.

Fixes #10595

## 🧹 AI Flag Cleanup Summary
This change removes the `reportUnknownFlags` feature flag and makes its
functionality a permanent part of the application. The "Unknown flags"
feature
is now always enabled.
### 🚮 Removed
- **Flag Definitions**
- Removed `reportUnknownFlags` from `IFlagKey` and `UiFlags` types.
- Removed `reportUnknownFlags` from the experimental flags configuration
in `src/lib/types/experimental.ts`.
- Removed the flag from development and test configurations
(`src/server-dev.ts`, `unknown-flags.e2e.test.ts`).
- **Conditional Logic**
- Removed conditional checks for `reportUnknownFlags` in backend
services
(`UnknownFlagsService`, `ClientMetricsServiceV2`) and API controllers
(`UnknownFlagsController`).
- Removed `useUiFlag('reportUnknownFlags')` and related conditional
rendering from frontend components (`UnknownFlagsTable`,
`FeatureToggleListTable`). The UI elements are now always visible.
- Modified the `useUnknownFlags` hook to always fetch data.
### 🛠 Kept
- **Core Functionality**
- The feature to report and display unknown flags is now always active.
- The "Unknown flags" link is now permanently visible on the feature
flags
overview page.
- Backend logic for processing and storing unknown flags is now always
executed.
### 📝 Why
The `reportUnknownFlags` feature flag was marked as completed with the
feature
being kept. This cleanup removes the flag and its associated conditional
logic,
simplifying the code and making the unknown flags reporting a permanent
feature.

---------

Co-authored-by: unleash-bot <194219037+unleash-bot[bot]@users.noreply.github.com>
Co-authored-by: Nuno Góis <github@nunogois.com>
2025-09-02 14:18:35 +01:00
Mateusz Kwasniewski
e9f651e2f5
feat: impact metrics migration (#10551) 2025-09-02 13:40:34 +02:00
Jaanus
6c11b57c53
fix: remove lifecycle backfill on every startup 2025-09-02 13:55:18 +03:00
Nuno Góis
c70c864b81
chore: promote unknown flags to a stable OpenAPI tag (#10594)
https://linear.app/unleash/issue/2-3832/promote-api-to-a-stable-openapi-tag

Promotes the Unknown Flags API to a stable OpenAPI tag as we prepare for
GA.
2025-09-02 11:45:21 +01:00
Nuno Góis
ed28d9f2b4
chore: one unknown flag per row (#10590)
https://linear.app/unleash/issue/2-3833/show-one-flag-name-per-row

Groups unknown flags by flag name, showing a single flag name per row.
This greatly simplifies the way we show unknown flags.

Just to be safe, we're limiting the app names we're showing to 20, and
environments per app name to 10.

Required some plumbing.

### Basic example
<img width="1350" height="866" alt="image"
src="https://github.com/user-attachments/assets/ad8ee198-e5f8-45e4-8e3b-f2d8b7701cf9"
/>

### App name search example, with highlight

<img width="367" height="204" alt="image"
src="https://github.com/user-attachments/assets/a1cc27ee-9ca1-4980-a3af-c08302c1d617"
/>
2025-09-02 10:47:02 +01:00
Jaanus Sellin
2442e5c973
fix: lifecycle metrics will now be posted across all environments (#10586) 2025-09-02 10:37:34 +03:00
unleash-bot[bot]
547f7ac14e
chore(AI): changeRequestApproverEmails flag cleanup (#10572) 2025-09-02 08:51:00 +02:00
Jaanus Sellin
829c2c5bc3
feat: start trackign db calls for feature environments (#10585) 2025-09-01 13:38:15 +03:00
Nuno Góis
96c74578b5
chore: add Release Templates OpenAPI tag (#10584)
https://linear.app/unleash/issue/2-3813/make-sure-we-promote-api-to-ga

Adds a new "Release Templates" OpenAPI tag.
2025-09-01 11:20:35 +01:00
Jaanus Sellin
a1a43d1177
feat: start tracking database calls for lifecycle (#10582)
Start tracking db calls for lifecycle store.
2025-09-01 12:19:27 +03:00
Nuno Góis
e7b757d7e1
chore: unknown flags should not include flags that exist in Unleash (#10568)
https://linear.app/unleash/issue/2-3825/fetching-unknown-flags-should-not-include-flags-that-currently-exist

Fetching unknown flags should not include flags that currently exist in
Unleash.

This is especially noticeable if you create a flag with an unknown
flag's name, since it won't go away from the list right away.
2025-08-29 10:20:43 +01:00
David Leek
31a924dd4b
chore: rollback hashing of release-plans and templates (#10574)
Rolls back hashing of the newly added releasePlans and releaseTemplates
fields
2025-08-29 11:19:20 +02:00
unleash-bot[bot]
af28fb110d
chore(AI): filterFlagsToArchive flag cleanup (#10565)
---------

Co-authored-by: unleash-bot <194219037+unleash-bot[bot]@users.noreply.github.com>
Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2025-08-29 08:44:28 +02:00
unleash-bot[bot]
3e4edfbfa9
chore(AI): etagByEnv flag cleanup (#10560)
This PR cleans up the etagByEnv flag. These changes were automatically
generated by AI and should be reviewed carefully.

Fixes #10556

## 🧹 AI Flag Cleanup Summary
This change removes the `etagByEnv` feature flag and makes its
functionality
permanent. This modifies the ETag generation for client API requests to
be
environment-specific, improving caching efficiency. The cleanup involved
removing the flag definition, updating the controller logic to
permanently use
the environment-specific ETag calculation, and refactoring the
corresponding E2E
tests to only cover the enabled behavior.
### 🚮 Removed
- **Flag Definition**
- The `etagByEnv` flag from `IFlagKey` in
`src/lib/types/experimental.ts`.
- **Conditional Logic**
- The check for the `etagByEnv` flag in `calculateMeta` method in

`src/lib/features/client-feature-toggles/client-feature-toggle.controller.ts`.
- **Tests**
- Test cases in `src/test/e2e/api/client/feature.optimal304.e2e.test.ts`
that
covered the disabled state of the `etagByEnv` flag.
### 🛠 Kept
- **Environment-Specific ETags**
- The behavior of generating environment-specific ETags is now the
default and
only behavior.
- **Tests**
- E2E tests verifying the functionality of environment-specific ETags
have
been retained and simplified.
### 📝 Why
The `etagByEnv` feature has been successfully rolled out and validated.
By
removing the feature flag and associated conditional logic, we simplify
the
codebase, reduce complexity, and make it easier to maintain. This change
makes
the improved ETag generation strategy a permanent part of the system.

---------

Co-authored-by: unleash-bot <194219037+unleash-bot[bot]@users.noreply.github.com>
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2025-08-28 10:41:04 -03:00
David Leek
7fb523e348
chore: add release plans/templates count to instance stats (#10540) 2025-08-28 14:44:24 +02:00
Gastón Fournier
3b467238a5
fix: backend tokens mapped to client tokens (#10561)
Edge does not support backend token type, so until then, we need to keep
returning backend token type as if they're client token types.
2025-08-28 13:57:03 +02:00
unleash-bot[bot]
fa7857dff1
chore(AI): debugEtag flag cleanup (#10558)
This PR cleans up the debugEtag flag. These changes were automatically
generated by AI and should be reviewed carefully.

Fixes #10557

## 🧹 AI Flag Cleanup Summary
This removes the `debugEtag` feature flag from the codebase. This flag
was used
to enable additional logging for debugging ETag generation for the
client
features endpoint.
### 🚮 Removed
- **Flag Definition**
- The `debugEtag` flag from the `IFlagKey` type in
`src/lib/types/experimental.ts`.
- **Conditional Logging**
- Removed logging statements guarded by the `debugEtag` flag in
`client-feature-toggle.controller.ts` and
`configuration-revision-service.ts`.
### 🛠 Kept
- **Default Behavior**
- The existing code paths for when the flag was disabled, which is now
the
only behavior.
### 📝 Why
The `debugEtag` flag was marked as completed with the outcome
"discarded". The
debugging functionality it provided is no longer needed. This change
removes the
dead code associated with the flag, simplifying the codebase.

Co-authored-by: unleash-bot <194219037+unleash-bot[bot]@users.noreply.github.com>
2025-08-28 07:54:38 -03:00
Jaanus Sellin
b8521121a1
fix: feature link should return same id as it sends to db (#10553)
During feature link creation, we should return same id as it sends to
db.
2025-08-28 11:43:46 +03:00
Gastón Fournier
8ba36ee9a2
fix: consider both client and backend token types from the DB (#10552)
## About the changes
In the previous fix: https://github.com/Unleash/unleash/pull/10543, we
made sure client token types were displayed in the UI. Here, we're also
making sure that the Backend token types are displayed as well.

1. A test validates that if a backend token exists in the db it will be
returned in the API response.
2. The UI has been adapted to also consider backend token types
2025-08-28 04:02:56 -03:00
Gastón Fournier
8cb11f69df
fix: permissions should allow to access client token types (#10543)
Internally token types are still identified as CLIENT, therefore when we
filter the ones we're allowed to see, we should still consider them as
CLIENT tokens not BACKEND tokens. This is internal until we can fully
remove CLIENT with the next major.
2025-08-26 13:33:21 -03:00
Gastón Fournier
750a32f0e9
chore: Etag log and code improvements (#10542)
This is a follow-up on the comments in
https://github.com/Unleash/unleash/pull/10512

Mostly using get and set when accessing the Map
2025-08-26 13:21:37 -03:00
unleash-bot[bot]
0792125bb7
chore(AI): releasePlans flag cleanup (#10537)
This PR cleans up the releasePlans flag. These changes were
automatically generated by AI and should be reviewed carefully.

Fixes #10536

## 🧹 AI Flag Cleanup Summary
The `releasePlans` feature flag has been removed, making the feature
permanently
available for Enterprise customers. All conditional logic and checks
related to
this flag have been removed from the codebase.
This change ensures that Release Plans are an integral part of the
Unleash
Enterprise offering.
### 🚮 Removed
- **Flag Definitions**
- `releasePlans` flag from `experimental.ts` in the backend.
- `releasePlans` flag from `uiConfig.ts` in the frontend.
- `releasePlans` flag from `server-dev.ts` development config.
- **Conditional Logic**
- Removed checks for `releasePlansEnabled` in components and hooks,
including
`ReleaseManagement.tsx`, `FeatureStrategyMenu.tsx`, and
`NewInUnleash.tsx`.
- Removed `useUiFlag('releasePlans')` calls from all frontend files.
- Removed the `flag: 'releasePlans'` property from route definitions in
`routes.ts`.
### 🛠 Kept
- **Feature Functionality**
- All UI and logic related to Release Plans and Release Templates are
now
unconditionally enabled for Enterprise users.
### 📝 Why
The `releasePlans` feature has been successfully rolled out and is now a
stable
part of the product. This cleanup removes the artık feature flag to
simplify the
codebase and reduce complexity.

---------

Co-authored-by: unleash-bot <194219037+unleash-bot[bot]@users.noreply.github.com>
Co-authored-by: Nuno Góis <github@nunogois.com>
2025-08-26 14:48:19 +01:00