1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/src/lib/features
Thomas Heartman 8da201aed8
feat: add potentiallyStale filter (#8784)
This PR adds support for the `potentiallyStale` value in the feature
search API. The value is added as a third option for `state` (in
addition to `stale` and `active`). Potentially stale is a subset of
active flags, so stale flags are never considered potentially stale,
even if they have the flag set in the db.

Because potentially stale is a separate column in the db, this
complicates the query a bit. As such, I've created a specialized
handling function in the feature search store: if the query doesn't
include `potentiallyStale`, handle it as we did before (the mapping has
just been moved). If the query *does* contain potentially stale, though,
the handling is quite a bit more involved because we need to check
multiple different columns against each other.

In essence, it's based on this logic:

when you’re searching for potentially stale flags, you should only get flags that are active and marked as potentially stale. You should not get stale flags.

This can cause some confusion, because in the db, we don’t clear the potentially stale status when we mark a flag as stale, so we can get flags that are both stale and potentially stale.

However, as a user, if you’re looking for potentially stale flags, I’d be surprised to also get (only some) stale flags, because if a flag is stale, it’s definitely stale, not potentially stale.

This leads us to these six different outcomes we need to handle when your search includes potentially stale and stale or active:

1. You filter for “potentially stale” flags only. The API will give you only flags that are active and marked as potentially stale. You will not get stale flags.
2. You filter only for flags that are not potentially stale. You will get all flags that are active and not potentially stale and all stale flags.
3. You search for “is any of stale, potentially stale”. This is our “unhealthy flags” metric. You get all stale flags and all flags that are active and potentially stale
4. You search for “is none of stale, potentially stale”: This gives you all flags that are active and not potentially stale. Healthy flags, if you will.
5. “is any of active, potentially stale”: you get all active flags. Because we treat potentially stale as a subset of active, this is the same as “is active”
6. “is none of active, potentially stale”: you get all stale flags. As in the previous point, this is the same as “is not active”
2024-11-19 14:53:01 +01:00
..
access feat: filter projectless events for normal users (#7914) 2024-08-21 13:59:24 +03:00
api-tokens
change-request-access-service fix: change request enabled check should ignore disabled envs (#7869) 2024-08-14 13:13:31 +02:00
change-request-segment-usage-service fix: change request enabled check should ignore disabled envs (#7869) 2024-08-14 13:13:31 +02:00
client-feature-toggles
dependent-features
events feat: activity chart polish (#8665) 2024-11-06 12:00:42 +02:00
export-import-toggles feat: start using event service composition root (#7871) 2024-08-15 08:33:46 +03:00
feature-lifecycle chore: debug lifecycle only when have new stages (#8418) 2024-10-10 14:28:11 +03:00
feature-naming-pattern
feature-search feat: add potentiallyStale filter (#8784) 2024-11-19 14:53:01 +01:00
feature-toggle feat: archived features can be searched now (#8568) 2024-10-29 13:19:13 +02:00
frontend-api chore: wrapTimer function types (#8428) 2024-10-15 11:18:22 +02:00
group
instance-stats chore: use memoized stats for version (#8776) 2024-11-18 10:47:29 +01:00
integration-events [Gitar] Cleaning up stale flag: integrationEvents with value true (#7940) 2024-08-21 14:25:24 +02:00
maintenance feat: remove excessing debug logging (#8701) 2024-11-08 14:57:26 +02:00
metrics task: make count column bigint. (#8183) 2024-09-19 10:59:40 +02:00
onboarding [Gitar] Cleaning up stale flag: onboardingMetrics with value true (#8550) 2024-10-28 11:47:58 +01:00
personal-dashboard feat: increase latest events in personal dashboard (#8491) 2024-10-21 12:30:50 +02:00
playground fix: use ip-address for remote-strategy (#8380) 2024-10-07 13:51:03 +02:00
private-project
project 1-3120: remove project connected environments (#8775) 2024-11-18 12:01:25 +01:00
project-environments fix: give project_default_strategy_write the ability to update the default strategy (#8112) 2024-09-06 11:49:11 +02:00
project-insights feat: start using event service composition root (#7871) 2024-08-15 08:33:46 +03:00
project-status 1-3120: remove project connected environments (#8775) 2024-11-18 12:01:25 +01:00
scheduler chore: use memoized stats for version (#8776) 2024-11-18 10:47:29 +01:00
segment fix: Remove idNumberMiddleware and change to use parameters in validPath method instead (#8734) 2024-11-18 15:08:07 +01:00
tag-type
traffic-data-usage feat: send traffic info to prometheus (#8541) 2024-10-25 15:43:14 +03:00
ui-observability-controller
user-subscriptions feat: add user preference change to event log (#8652) 2024-11-05 14:52:11 +00:00
index.ts feat: export transactional user subscriptions service (#8651) 2024-11-05 11:52:15 +01:00