Skip to content

Commit

Permalink
chore: improve dev deployment messaging (#1091)
Browse files Browse the repository at this point in the history
Fixes #1077
  • Loading branch information
wesbillman authored Mar 14, 2024
1 parent ca072a6 commit 34b5a3f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions buildengine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"path/filepath"
"runtime"
"strings"
"time"

"connectrpc.com/connect"
Expand Down Expand Up @@ -270,10 +271,12 @@ func (e *Engine) watchForModuleChanges(ctx context.Context, period time.Duration

moduleHashes[change.Name] = hash
modulesToDeploy := e.getDependentModules(change.Name)
logger.Infof("%s's schema changed; redeploying: %+v", change.Name, modulesToDeploy)
err = e.buildAndDeploy(ctx, 1, true, modulesToDeploy...)
if err != nil {
logger.Errorf(err, "deploy %s failed", change.Name)
if len(modulesToDeploy) > 0 {
logger.Infof("%s's schema changed; redeploying %s", change.Name, strings.Join(modulesToDeploy, ", "))
err = e.buildAndDeploy(ctx, 1, true, modulesToDeploy...)
if err != nil {
logger.Errorf(err, "deploy %s failed", change.Name)
}
}
}

Expand Down

0 comments on commit 34b5a3f

Please sign in to comment.