Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions go/core/pkg/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ func Start(getExtensionConfig GetExtensionConfig, migrationRunner MigrationRunne
var tlsOpts []func(*tls.Config)
var cfg Config

// TODO setup signal handlers
ctx := context.Background()
// Reused below for mgr.Start; SetupSignalHandler must be called once per process.
ctx := ctrl.SetupSignalHandler()
Comment on lines +297 to +298
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. you're right, the default runner at app.go:462 takes _ context.Context and migrations.RunUp doesn't accept ctx at all, so migrations aren't cancellable by this PR.

I have updated the description, this PR only makes tracing init, db connect, and the manager signal-aware, plus removes the duplicate ctrl.SetupSignalHandler() call. threading ctx through migrations.RunUp is a separate change. happy to open a follow-up if maintainers want it.


cfg.SetFlags(flag.CommandLine)

Expand Down Expand Up @@ -667,7 +667,7 @@ func Start(getExtensionConfig GetExtensionConfig, migrationRunner MigrationRunne
}

setupLog.Info("starting manager")
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
if err := mgr.Start(ctx); err != nil {
setupLog.Error(err, "problem running manager")
os.Exit(1)
}
Expand Down
Loading