Skip to content

Invalidate flags cache after benchmark creation to refresh dashboard registry#2181

Merged
cezudas merged 2 commits intomainfrom
cezudas/OPS-4034
Mar 31, 2026
Merged

Invalidate flags cache after benchmark creation to refresh dashboard registry#2181
cezudas merged 2 commits intomainfrom
cezudas/OPS-4034

Conversation

@cezudas
Copy link
Copy Markdown
Contributor

@cezudas cezudas commented Mar 31, 2026

Fixes OPS-4034.

@cezudas cezudas requested review from Copilot and ravikiranvm March 31, 2026 07:47
@linear
Copy link
Copy Markdown

linear Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 flags React Query cache after successful benchmark creation.
  • Keep existing invalidation of foldersFlows to refresh folder/flow listings post-creation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 85 to +90
queryClient.invalidateQueries({
queryKey: [QueryKeys.foldersFlows],
});
queryClient.invalidateQueries({
queryKey: [QueryKeys.flags],
});
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link
Copy Markdown

@cezudas cezudas enabled auto-merge (squash) March 31, 2026 11:27
@cezudas cezudas merged commit 13e5784 into main Mar 31, 2026
21 checks passed
@cezudas cezudas deleted the cezudas/OPS-4034 branch March 31, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants