Skip to content

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

fix: skip cache in export center (#9102)

zll600dc02f21d8dc8
diff --git a/frontend/src/store/modules/v1/projectIamPolicy.ts b/frontend/src/store/modules/v1/projectIamPolicy.ts
index e4d5e5c878..f31cfd7921 100644
--- a/frontend/src/store/modules/v1/projectIamPolicy.ts
+++ b/frontend/src/store/modules/v1/projectIamPolicy.ts
@@ -86,13 +86,20 @@ export const useProjectIamPolicyStore = defineStore(
return getProjectIamPolicy(project);
};
- const batchGetOrFetchProjectIamPolicy = async (projectList: string[]) => {
- // BatchFetch policies that missing in the local map.
- const missingProjectList = projectList.filter(
- (project) => !policyMap.value.has(project)
- );
- if (missingProjectList.length > 0) {
- await batchFetchIamPolicy(missingProjectList);
+ const batchGetOrFetchProjectIamPolicy = async (
+ projectList: string[],
+ skipCache = false
+ ) => {
+ if (skipCache) {
+ await batchFetchIamPolicy(projectList);
+ } else {
+ // BatchFetch policies that missing in the local map.
+ const missingProjectList = projectList.filter(
+ (project) => !policyMap.value.has(project)
+ );
+ if (missingProjectList.length > 0) {
+ await batchFetchIamPolicy(missingProjectList);
+ }
}
return projectList.map(getProjectIamPolicy);
};
diff --git a/frontend/src/views/ExportCenter/index.vue b/frontend/src/views/ExportCenter/index.vue
index 59f334208f..8afc160e4f 100644
--- a/frontend/src/views/ExportCenter/index.vue
+++ b/frontend/src/views/ExportCenter/index.vue
@@ -149,7 +149,8 @@ watchEffect(async () => {
const projectNameList = projectList.value.map((project) => project.name);
const iamPolicyList =
await projectIamPolicyStore.batchGetOrFetchProjectIamPolicy(
- projectNameList
+ projectNameList,
+ true /* skipCache */
);
const tempExportRecords: ExportRecord[] = [];