Skip to content

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

fix: ensure database groups always fetch with FULL view (#17845)

boojackfdf3058d5eb8
diff --git a/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue b/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue
index 2cfcd41c1a..9d75c12cac 100644
--- a/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue
+++ b/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue
@@ -15,7 +15,7 @@
(id) =>
dbGroupStore.getOrFetchDBGroupByName(
`${props.project.name}/${databaseGroupNamePrefix}${id}`,
- { silent: true }
+ { silent: true, view: DatabaseGroupView.FULL }
)
"
/>
@@ -91,6 +91,7 @@ import type { Expr as CELExpr } from "@/types/proto-es/google/api/expr/v1alpha1/
import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";
import {
DatabaseGroupSchema,
+ DatabaseGroupView,
type DatabaseGroup,
} from "@/types/proto-es/v1/database_group_service_pb";
import type { Project } from "@/types/proto-es/v1/project_service_pb";
@@ -147,7 +148,7 @@ onMounted(async () => {
state.placeholder = databaseGroupEntity.title;
const fetchedDatabaseGroup = await dbGroupStore.getOrFetchDBGroupByName(
databaseGroup.name,
- { silent: true }
+ { silent: true, view: DatabaseGroupView.FULL }
);
if (fetchedDatabaseGroup?.databaseExpr?.expression) {
// Convert CEL expression to simple expression
diff --git a/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue b/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue
index 0dcea303b1..e5cad9e43e 100644
--- a/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue
+++ b/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue
@@ -14,7 +14,10 @@ import DatabaseGroupDataTable from "@/components/DatabaseGroup/DatabaseGroupData
import { PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL } from "@/router/dashboard/projectV1";
import { useDBGroupListByProject } from "@/store";
import { getProjectNameAndDatabaseGroupName } from "@/store/modules/v1/common";
-import type { DatabaseGroup } from "@/types/proto-es/v1/database_group_service_pb";
+import {
+ DatabaseGroupView,
+ type DatabaseGroup,
+} from "@/types/proto-es/v1/database_group_service_pb";
import type { Project } from "@/types/proto-es/v1/project_service_pb";
const props = defineProps<{
@@ -24,7 +27,8 @@ const props = defineProps<{
const router = useRouter();
const { dbGroupList, ready } = useDBGroupListByProject(
- computed(() => props.project.name)
+ computed(() => props.project.name),
+ DatabaseGroupView.FULL
);
const filteredDbGroupList = computed(() => {
diff --git a/frontend/src/components/Plan/logic/plan.ts b/frontend/src/components/Plan/logic/plan.ts
index bf22f70a5a..23cbe0fffe 100644
--- a/frontend/src/components/Plan/logic/plan.ts
+++ b/frontend/src/components/Plan/logic/plan.ts
@@ -7,6 +7,7 @@ import {
unknownDatabase,
} from "@/types";
import { Engine } from "@/types/proto-es/v1/common_pb";
+import { DatabaseGroupView } from "@/types/proto-es/v1/database_group_service_pb";
import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";
import type { Project } from "@/types/proto-es/v1/project_service_pb";
@@ -60,7 +61,9 @@ export const databaseEngineForSpec = async (
}
if (isValidDatabaseGroupName(target)) {
const dbGroupStore = useDBGroupStore();
- const dbGroup = await dbGroupStore.getOrFetchDBGroupByName(target);
+ const dbGroup = await dbGroupStore.getOrFetchDBGroupByName(target, {
+ view: DatabaseGroupView.FULL,
+ });
// Might be flaky: use the first database in the db group
const dbName = head(dbGroup.matchedDatabases)?.name;
if (dbName) {