Skip to content

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

chore: check doUpdateSheet in related specs without pipeline (#12026)

boojackb08298db5d9c
diff --git a/backend/api/v1/rollout_service.go b/backend/api/v1/rollout_service.go
index df06094f29..ed28047d6b 100644
--- a/backend/api/v1/rollout_service.go
+++ b/backend/api/v1/rollout_service.go
@@ -1226,6 +1226,20 @@ func (s *RolloutService) UpdatePlan(ctx context.Context, request *v1pb.UpdatePla
}
}
+ // For the plan without pipeline, we need to check if the sheet is updated in related specs.
+ if oldPlan.PipelineUID == nil {
+ for _, specPatch := range updated {
+ oldSpec := oldSpecsByID[specPatch.Id]
+ if oldSpec.GetChangeDatabaseConfig() != nil && specPatch.GetChangeDatabaseConfig() != nil {
+ oldConfig, newConfig := oldSpec.GetChangeDatabaseConfig(), specPatch.GetChangeDatabaseConfig()
+ if oldConfig.Sheet != newConfig.Sheet {
+ doUpdateSheet = true
+ break
+ }
+ }
+ }
+ }
+
for _, taskPatch := range taskPatchList {
task := tasksMap[taskPatch.ID]
if _, err := s.store.UpdateTaskV2(ctx, taskPatch); err != nil {