Invalidate flags cache after benchmark creation to refresh dashboard registry#2181
Invalidate flags cache after benchmark creation to refresh dashboard registry#2181
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses OPS-4034 by ensuring feature flags are refreshed after creating a benchmark, so downstream UI (e.g., dashboard registry/side menu behavior derived from flags) doesn’t remain stuck with an indefinitely-stale cache.
Changes:
- Invalidate the
flagsReact Query cache after successful benchmark creation. - Keep existing invalidation of
foldersFlowsto refresh folder/flow listings post-creation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| queryClient.invalidateQueries({ | ||
| queryKey: [QueryKeys.foldersFlows], | ||
| }); | ||
| queryClient.invalidateQueries({ | ||
| queryKey: [QueryKeys.flags], | ||
| }); |
There was a problem hiding this comment.
New behavior: after successful benchmark creation, the hook now invalidates the flags query. There are existing Jest tests for this hook, but none currently assert the cache invalidation side-effects; adding an assertion in the “creating benchmark (last step)” success test would prevent regressions (expect invalidateQueries to be called for both foldersFlows and flags).
|



Fixes OPS-4034.