Skip to content

Commit

Permalink
Bug 2059879: Invalidate cached secrets when patching a provider CR (k…
Browse files Browse the repository at this point in the history
  • Loading branch information
mturley committed Mar 2, 2022
1 parent 0851df9 commit 95f0052
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/web/src/app/queries/providers.ts
Expand Up @@ -241,6 +241,7 @@ export const usePatchProviderMutation = (
onSuccess: () => {
queryClient.invalidateQueries('cluster-providers');
queryClient.invalidateQueries('inventory-providers');
queryClient.invalidateQueries('secrets');
onSuccess && onSuccess();
},
});
Expand Down
2 changes: 1 addition & 1 deletion pkg/web/src/app/queries/secrets.ts
Expand Up @@ -10,7 +10,7 @@ export const useSecretQuery = (secretName: string | null): UseQueryResult<ISecre
const client = useAuthorizedK8sClient();
return useMockableQuery<ISecret>(
{
queryKey: ['secret', secretName],
queryKey: ['secrets', secretName],
queryFn: async () => (await client.get<ISecret>(secretResource, secretName || '')).data,
refetchInterval: usePollingContext().refetchInterval,
enabled: !!secretName,
Expand Down

0 comments on commit 95f0052

Please sign in to comment.