Skip to content

Commit b8a5a42

Browse files
committed
rebase, review fixes
1 parent d89e41b commit b8a5a42

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

cmd/integration/make_backup/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ func main() {
410410
{
411411
event: RawEvent{
412412
Action: "ActionUpdate",
413-
Component: "backup_service",
413+
Component: "backup_schedule_service",
414414
Status: "NEW",
415415
ContainerID: containerID,
416416
Database: databaseName,
@@ -427,8 +427,8 @@ func main() {
427427
},
428428
{
429429
event: RawEvent{
430-
Action: "ActionUpdate",
431-
Component: "backup_service",
430+
Action: "ActionGet",
431+
Component: "backup_schedule_service",
432432
Status: "ERROR",
433433
Reason: "Recovery point objective failed for schedule",
434434
ContainerID: containerID,

cmd/ydbcp/main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ func main() {
201201
os.Exit(1)
202202
}
203203

204-
processor.NewOperationProcessor(ctx, &wg, configInstance.GetProcessorIntervalSeconds(), dbConnector, handlersRegistry)
204+
processor.NewOperationProcessor(
205+
ctx, &wg, configInstance.GetProcessorIntervalSeconds(), dbConnector, handlersRegistry,
206+
)
205207
xlog.Info(ctx, "Initialized OperationProcessor")
206208

207209
if configInstance.GetDisableTTLDeletion() {
@@ -214,7 +216,7 @@ func main() {
214216
backupScheduleHandler := handlers.NewBackupScheduleHandler(queries.NewWriteTableQuery, clockwork.NewRealClock())
215217

216218
schedule_watcher.NewScheduleWatcher(
217-
ctx, &wg, configInstance.ProcessorIntervalSeconds, dbConnector,
219+
ctx, &wg, configInstance.GetProcessorIntervalSeconds(), dbConnector,
218220
backupScheduleHandler, clockwork.NewRealClock(),
219221
)
220222
xlog.Info(ctx, "Created ScheduleWatcher")

internal/audit/audit_event.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,15 @@ func ReportBackupStateAuditEvent(
160160
) {
161161
status := operation.GetState().String()
162162
reason := ""
163+
component := "backup_service"
163164
switch operation.GetState() {
164165
case types.OperationStateRunning:
165166
{
166167
if retry {
167168
status = "RETRYING"
168169
reason = "New backup attempt scheduled"
169170
} else if new {
171+
component = "backup_schedule_service"
170172
status = "NEW"
171173
reason = "New retryable backup attempt scheduled"
172174
}
@@ -195,7 +197,7 @@ func ReportBackupStateAuditEvent(
195197
SpecVersion: "1.0",
196198
Action: ActionUpdate,
197199
Resource: Backup,
198-
Component: "backup_service",
200+
Component: component,
199201
FolderID: operation.GetContainerID(),
200202
Subject: types.OperationCreatorName,
201203
//no token
@@ -234,7 +236,7 @@ func ReportFailedRPOAuditEvent(ctx context.Context, schedule *types.BackupSchedu
234236
SpecVersion: "1.0",
235237
Action: ActionGet,
236238
Resource: BackupSchedule,
237-
Component: "backup_service",
239+
Component: "backup_schedule_service",
238240
FolderID: schedule.ContainerID,
239241
Subject: types.OperationCreatorName,
240242
//no token

0 commit comments

Comments
 (0)