File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,11 @@ type UpgradePlan struct {
126126 ToVersion driver.Version `json:"to_version"`
127127}
128128
129+ // IsEmpty returns true when the given plan has not been initialized.
130+ func (p UpgradePlan ) IsEmpty () bool {
131+ return p .CreatedAt .IsZero ()
132+ }
133+
129134// IsReady returns true when all entries have finished.
130135func (p UpgradePlan ) IsReady () bool {
131136 return len (p .Entries ) == 0
@@ -780,7 +785,7 @@ func (m *upgradeManager) RunWatchUpgradePlan(ctx context.Context) {
780785 }
781786 }
782787 plan , err := m .readUpgradePlan (ctx )
783- if agency .IsKeyNotFound (err ) {
788+ if agency .IsKeyNotFound (err ) || plan . IsEmpty () {
784789 // Just try later
785790 } else if err != nil {
786791 // Failed to read plan
You can’t perform that action at this time.
0 commit comments