Skip to content

Commit

Permalink
Use logger with formatter for fatal
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Dye <[email protected]>
  • Loading branch information
andrewwdye committed Jan 19, 2024
1 parent d596a2e commit 3526294
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions flyteadmin/tests/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func truncateAllTablesForTestingOnly() {
ctx := context.Background()
db, err := repositories.GetDB(ctx, getDbConfig(), getLoggerConfig())
if err != nil {
logger.Fatal(ctx, "Failed to open DB connection due to %v", err)
logger.Fatalf(ctx, "Failed to open DB connection due to %v", err)
}
sqlDB, err := db.DB()
if err != nil {
Expand Down Expand Up @@ -110,7 +110,7 @@ func populateWorkflowExecutionForTestingOnly(project, domain, name string) {
db, err := repositories.GetDB(context.Background(), getDbConfig(), getLoggerConfig())
ctx := context.Background()
if err != nil {
logger.Fatal(ctx, "Failed to open DB connection due to %v", err)
logger.Fatalf(ctx, "Failed to open DB connection due to %v", err)
}
sqlDB, err := db.DB()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion flyteadmin/tests/execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func populateWorkflowExecutionsForTestingOnly() {
db, err := repositories.GetDB(context.Background(), getDbConfig(), getLoggerConfig())
ctx := context.Background()
if err != nil {
logger.Fatal(ctx, "Failed to open DB connection due to %v", err)
logger.Fatalf(ctx, "Failed to open DB connection due to %v", err)
}
sqlDB, err := db.DB()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion flyteidl/clients/go/admin/pkce/auth_flow_orchestrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (f TokenOrchestrator) FetchTokenFromAuthFlow(ctx context.Context) (*oauth2.

go func() {
if err = server.ListenAndServe(); err != nil && err != http.ErrServerClosed {
logger.Fatal(ctx, "Couldn't start the callback http server on host %v due to %v", redirectURL.Host,
logger.Fatalf(ctx, "Couldn't start the callback http server on host %v due to %v", redirectURL.Host,
err)
}
}()
Expand Down

0 comments on commit 3526294

Please sign in to comment.