engine, lib: Misc log and comment changes

Just misc polishing.
This commit is contained in:
James Shubin
2023-11-21 00:04:14 -05:00
parent 66edc39ccb
commit 029cfaf1f8
3 changed files with 6 additions and 3 deletions

View File

@@ -144,7 +144,7 @@ func (obj *Engine) Validate() error {
} }
if err := engine.Validate(res); err != nil { if err := engine.Validate(res); err != nil {
return errwrap.Wrapf(err, "the Res did not Validate") return fmt.Errorf("%s did not Validate: %v", res, err)
} }
} }
return nil return nil

View File

@@ -275,7 +275,7 @@ func (obj *State) ReversalWrite(str string, overwrite bool) error {
if str != oldStr { if str != oldStr {
obj.Logf("existing, pending, reversible resource exists") obj.Logf("existing, pending, reversible resource exists")
//obj.Logf("diff:") //obj.Logf("diff:")
//obj.Logf("") // TODO: print the diff w/o and secret values //obj.Logf("") // TODO: print the diff w/o secret values
return fmt.Errorf("existing, pending, reversible resource exists") return fmt.Errorf("existing, pending, reversible resource exists")
} }
} }

View File

@@ -661,7 +661,7 @@ func (obj *Main) Run() error {
if err := obj.ge.Validate(); err != nil { // validate the new graph if err := obj.ge.Validate(); err != nil { // validate the new graph
obj.ge.Abort() // delete graph obj.ge.Abort() // delete graph
Logf("error validating the new graph: %+v", err) Logf("graph validate failed: %+v", err)
continue continue
} }
@@ -967,6 +967,9 @@ func (obj *Main) Run() error {
reterr := obj.exit.Error() // wait for exit signal (block until arrival) reterr := obj.exit.Error() // wait for exit signal (block until arrival)
// XXX: The reversals don't get a chance to run if we ^C things.
// XXX: Add a singular deploy of those before we shut down completely.
Logf("destroy...") Logf("destroy...")
// tell inner main loop to exit // tell inner main loop to exit