Skip to content

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

fix: plan checks must pass before auto rolling out (#7797)

p0ny2782505b169d
diff --git a/backend/runner/taskrun/schedulerv2.go b/backend/runner/taskrun/schedulerv2.go
index 13ea084192..61c7ecc670 100644
--- a/backend/runner/taskrun/schedulerv2.go
+++ b/backend/runner/taskrun/schedulerv2.go
@@ -177,12 +177,14 @@ func (s *SchedulerV2) scheduleAutoRolloutTask(ctx context.Context, taskUID int)
type key struct {
instanceUID int
databaseName string
+ checkType store.PlanCheckRunType
}
latestRun := map[key]*store.PlanCheckRunMessage{}
for _, run := range planCheckRuns {
k := key{
instanceUID: int(run.Config.InstanceUid),
databaseName: run.Config.DatabaseName,
+ checkType: run.Type,
}
if latest, ok := latestRun[k]; !ok || latest.UID < run.UID {
latestRun[k] = run