MCPcopy Create free account
hub / github.com/bytebase/bytebase / isDeferredRolloutPlan

Function isDeferredRolloutPlan

backend/runner/taskrun/scheduler.go:270–281  ·  view source on GitHub ↗

isDeferredRolloutPlan returns true if the plan contains only deferred rollout specs (exportDataConfig or createDatabaseConfig).

(plan *store.PlanMessage)

Source from the content-addressed store, hash-verified

268// isDeferredRolloutPlan returns true if the plan contains only deferred rollout specs
269// (exportDataConfig or createDatabaseConfig).
270func isDeferredRolloutPlan(plan *store.PlanMessage) bool {
271 specs := plan.Config.GetSpecs()
272 if len(specs) == 0 {
273 return false
274 }
275 for _, spec := range specs {
276 if spec.GetExportDataConfig() == nil && spec.GetCreateDatabaseConfig() == nil {
277 return false
278 }
279 }
280 return true
281}
282
283// autoResolveIssue automatically resolves the issue associated with a plan by setting its status to DONE.
284func (s *Scheduler) autoResolveIssue(ctx context.Context, projectID string, planID int64) {

Callers 1

checkPlanCompletionMethod · 0.85

Calls 3

GetSpecsMethod · 0.45
GetExportDataConfigMethod · 0.45

Tested by

no test coverage detected