Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: not cache for validate only request (#18326)

ecmadao4a7b067d7844
diff --git a/frontend/src/store/modules/v1/instance.ts b/frontend/src/store/modules/v1/instance.ts
index bdca1fa0ae..e36f5c69ca 100644
--- a/frontend/src/store/modules/v1/instance.ts
+++ b/frontend/src/store/modules/v1/instance.ts
@@ -117,9 +117,10 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {
),
}
);
- const instances = upsertInstances([response]);
-
- return instances[0];
+ if (!validateOnly) {
+ upsertInstances([response]);
+ }
+ return response;
};
const updateInstance = async (instance: Instance, updateMask: string[]) => {
const request = create(UpdateInstanceRequestSchema, {
@@ -245,8 +246,10 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {
const response = await instanceServiceClientConnect.addDataSource(request, {
contextValues: createContextValues().set(silentContextKey, validateOnly),
});
- const [updatedInstance] = upsertInstances([response]);
- return updatedInstance;
+ if (!validateOnly) {
+ upsertInstances([response]);
+ }
+ return response;
};
const updateDataSource = async ({
instance,
@@ -274,8 +277,10 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {
),
}
);
- const [updatedInstance] = upsertInstances([response]);
- return updatedInstance;
+ if (!validateOnly) {
+ upsertInstances([response]);
+ }
+ return response;
};
const deleteDataSource = async (
instance: Instance,