-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: archiver cleanup #3726
chore: archiver cleanup #3726
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3726 +/- ##
==========================================
- Coverage 68.13% 68.07% -0.06%
==========================================
Files 333 333
Lines 51462 51454 -8
==========================================
- Hits 35063 35028 -35
- Misses 14118 14140 +22
- Partials 2281 2286 +5
☔ View full report in Codecov by Sentry. |
a5de74b
to
8683c2a
Compare
@@ -72,13 +72,16 @@ type Archiver struct { | |||
} | |||
|
|||
func (a *Archiver) backupRecords(ctx context.Context, args backupRecordsArgs) (backupLocation string, err error) { | |||
a.Logger.Infof(`Starting backupRecords for uploadId: %s, sourceId: %s, destinationId: %s, tableName: %s,`, args.uploadID, args.sourceID, args.destID, args.tableName) | |||
a.Logger.Infof("[Archiver]: Starting backupRecords for uploadId: %s, sourceId: %s, destinationId: %s, tableName: %s,", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use structured logging, I would avoid prefixing with archiver
@@ -96,7 +99,9 @@ func (a *Archiver) backupRecords(ctx context.Context, args backupRecordsArgs) (b | |||
Config: filemanagerutil.GetProviderConfigForBackupsFromEnv(ctx, config.Default), | |||
}) | |||
if err != nil { | |||
err = fmt.Errorf("error in creating a file manager for:%s. Error: %w", config.GetString("JOBS_BACKUP_STORAGE_PROVIDER", "S3"), err) | |||
err = fmt.Errorf("error in creating a file manager for:%s. Error: %w", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better error message
@lvrach I'll merge this one and address the structured logging in this file in another PR with low prio. |
Description
Prepared statements for archiver + more DRY and cleanup.
Linear Ticket
< Linear Link >
Security