From dea754e1969aab28ee5491bd1e4840dd472a8ace Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 30 Jan 2026 15:42:43 -0800 Subject: [PATCH 1/3] fix: output debug log if manifest file changes but manifest source is remote --- internal/pkg/platform/localserver.go | 36 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/pkg/platform/localserver.go b/internal/pkg/platform/localserver.go index 693d5843..188d4ed1 100644 --- a/internal/pkg/platform/localserver.go +++ b/internal/pkg/platform/localserver.go @@ -365,12 +365,10 @@ func (r *LocalServer) WatchManifest(ctx context.Context, auth types.SlackAuth, a return err } - // Skip manifest watching if manifest source is remote - if manifestSource.Equals(config.ManifestSourceRemote) { - r.clients.IO.PrintDebug(ctx, "Manifest watching disabled: manifest.source is set to remote") - // Block until context is cancelled to keep the goroutine alive - <-ctx.Done() - return nil + // Check if manifest source is remote - we'll still watch but only log changes + isRemoteManifest := manifestSource.Equals(config.ManifestSourceRemote) + if isRemoteManifest { + r.clients.IO.PrintDebug(ctx, "Manifest source is remote - file changes will be logged only") } // Get manifest watch configuration @@ -396,8 +394,7 @@ func (r *LocalServer) WatchManifest(ctx context.Context, auth types.SlackAuth, a // Add provided paths to watcher for _, path := range paths { if err := w.AddRecursive(path); err != nil { - r.log.Data["cloud_run_watch_error"] = fmt.Sprintf("manifest_watcher.paths: %s", err) - r.log.Warn("on_cloud_run_watch_error") + r.clients.IO.PrintDebug(ctx, "Skipping watch path %s: %s", path, err) } } @@ -409,15 +406,19 @@ func (r *LocalServer) WatchManifest(ctx context.Context, auth types.SlackAuth, a r.clients.IO.PrintDebug(ctx, "Manifest file watcher context canceled, returning.") return case event := <-w.Event: - r.log.Data["cloud_run_watch_manifest_change"] = event.Path - r.log.Info("on_cloud_run_watch_manifest_change") - - // Reinstall the app when manifest changes - if _, _, _, err := apps.InstallLocalApp(ctx, r.clients, "", r.log, auth, app); err != nil { - r.log.Data["cloud_run_watch_error"] = err.Error() - r.log.Warn("on_cloud_run_watch_error") + if isRemoteManifest { + r.clients.IO.PrintDebug(ctx, "Manifest file changed but not updating app because manifest.source=remote: %s", event.Path) } else { - r.log.Info("on_cloud_run_watch_manifest_change_reinstalled") + r.log.Data["cloud_run_watch_manifest_change"] = event.Path + r.log.Info("on_cloud_run_watch_manifest_change") + + // Reinstall the app when manifest changes + if _, _, _, err := apps.InstallLocalApp(ctx, r.clients, "", r.log, auth, app); err != nil { + r.log.Data["cloud_run_watch_error"] = err.Error() + r.log.Warn("on_cloud_run_watch_error") + } else { + r.log.Info("on_cloud_run_watch_manifest_change_reinstalled") + } } case err := <-w.Error: r.log.Data["cloud_run_watch_error"] = err.Error() @@ -474,8 +475,7 @@ func (r *LocalServer) WatchApp(ctx context.Context) error { // Add provided paths to watcher for _, path := range paths { if err := w.AddRecursive(path); err != nil { - r.log.Data["cloud_run_watch_error"] = fmt.Sprintf("app_watcher.paths: %s", err) - r.log.Warn("on_cloud_run_watch_error") + r.clients.IO.PrintDebug(ctx, "Skipping watch path %s: %s", path, err) } } From 3c09502eba5a48b26562bbaa4a1a04e8340f32c5 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 30 Jan 2026 16:01:11 -0800 Subject: [PATCH 2/3] feat: promote the debug log to info for clear communication please --- cmd/platform/run.go | 3 +++ internal/pkg/platform/localserver.go | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/platform/run.go b/cmd/platform/run.go index feeb06d1..54d67b57 100644 --- a/cmd/platform/run.go +++ b/cmd/platform/run.go @@ -183,6 +183,9 @@ func newRunLogger(clients *shared.ClientFactory, cmd *cobra.Command) *logger.Log cmd.Println(style.Secondary(fmt.Sprintf("Manifest change detected: %s, reinstalling app...", path))) case "on_cloud_run_watch_manifest_change_reinstalled": cmd.Println(style.Secondary("App successfully reinstalled")) + case "on_cloud_run_watch_manifest_change_skipped_remote": + path := event.DataToString("cloud_run_watch_manifest_change_skipped") + cmd.Println(style.Secondary(fmt.Sprintf("Manifest change detected: %s, but not updating app because manifest.source=remote", path))) case "on_cloud_run_watch_app_change": path := event.DataToString("cloud_run_watch_app_change") cmd.Println(style.Secondary(fmt.Sprintf("App change detected: %s, restarting server...", path))) diff --git a/internal/pkg/platform/localserver.go b/internal/pkg/platform/localserver.go index 188d4ed1..71e02a93 100644 --- a/internal/pkg/platform/localserver.go +++ b/internal/pkg/platform/localserver.go @@ -407,7 +407,8 @@ func (r *LocalServer) WatchManifest(ctx context.Context, auth types.SlackAuth, a return case event := <-w.Event: if isRemoteManifest { - r.clients.IO.PrintDebug(ctx, "Manifest file changed but not updating app because manifest.source=remote: %s", event.Path) + r.log.Data["cloud_run_watch_manifest_change_skipped"] = event.Path + r.log.Info("on_cloud_run_watch_manifest_change_skipped_remote") } else { r.log.Data["cloud_run_watch_manifest_change"] = event.Path r.log.Info("on_cloud_run_watch_manifest_change") From c841561fed73f94e754820ae64ec44c1bab92ab2 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Fri, 30 Jan 2026 16:07:54 -0800 Subject: [PATCH 3/3] docs: reword for consistent formatting Co-authored-by: Michael Brooks --- cmd/platform/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/platform/run.go b/cmd/platform/run.go index 54d67b57..3392764b 100644 --- a/cmd/platform/run.go +++ b/cmd/platform/run.go @@ -185,7 +185,7 @@ func newRunLogger(clients *shared.ClientFactory, cmd *cobra.Command) *logger.Log cmd.Println(style.Secondary("App successfully reinstalled")) case "on_cloud_run_watch_manifest_change_skipped_remote": path := event.DataToString("cloud_run_watch_manifest_change_skipped") - cmd.Println(style.Secondary(fmt.Sprintf("Manifest change detected: %s, but not updating app because manifest.source=remote", path))) + cmd.Println(style.Secondary(fmt.Sprintf("Manifest change detected: %s, skipped reinstalling app because manifest.source=remote", path))) case "on_cloud_run_watch_app_change": path := event.DataToString("cloud_run_watch_app_change") cmd.Println(style.Secondary(fmt.Sprintf("App change detected: %s, restarting server...", path)))