Unleash / unleash

Open-source feature management solution built for developers.
https://getunleash.io
Apache License 2.0
11.46k stars 721 forks source link

feat: add potentiallyStale filter #8784

Closed thomasheartman closed 1 week ago

thomasheartman commented 1 week ago

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.

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **unleash-docs** | ⬜️ Ignored ([Inspect](https://vercel.com/unleash-team/unleash-docs/F3qPyqCSKd1b6177Wt8LuEe5RmWQ)) | [Visit Preview](https://unleash-docs-git-1-3128-flag-search-by-pote-af8e65-unleash-team.vercel.app) | | Nov 19, 2024 0:49am | | **unleash-monorepo-frontend** | ⬜️ Ignored ([Inspect](https://vercel.com/unleash-team/unleash-monorepo-frontend/BsLHXgGRtGGa3dE4LjxUNX7A6cnC)) | [Visit Preview](https://unleash-monorepo-frontend-git-1-3128-flag-s-8fde4a-unleash-team.vercel.app) | | Nov 19, 2024 0:49am |
github-actions[bot] commented 1 week ago

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files