Skip to content

Commit 900bef3

Browse files
committed
try to fix ci failures
Signed-off-by: Davanum Srinivas <[email protected]>
1 parent 58510c0 commit 900bef3

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

node-drainer/main.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,18 @@ func handleColdStart(ctx context.Context, components *initializer.Components) er
274274

275275
slog.Info("Found events to re-process", "count", len(healthEvents))
276276

277-
// Convert to Event format for compatibility with existing code
277+
// Convert HealthEventWithStatus to Event format
278+
// Note: RawEvent is only populated during change stream events, not query results
279+
// So we reconstruct the Event map from struct fields
278280
events := make([]datastore.Event, len(healthEvents))
279281
for i, he := range healthEvents {
280-
events[i] = he.RawEvent
282+
// Reconstruct Event map from struct fields
283+
event := datastore.Event{
284+
"createdAt": he.CreatedAt,
285+
"healthevent": he.HealthEvent,
286+
"healtheventstatus": he.HealthEventStatus,
287+
}
288+
events[i] = event
281289
}
282290

283291
// Re-process each event

store-client/pkg/datastore/providers/postgresql/datastore.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ func (p *PostgreSQLDataStore) NewChangeStreamWatcher(
195195
watcher := NewPostgreSQLChangeStreamWatcher(p.db, clientName, tableName)
196196
watcher.pipelineFilter = pipelineFilter
197197

198-
return watcher, nil
198+
// Wrap the watcher to provide Unwrap() support for backward compatibility
199+
return NewPostgreSQLChangeStreamWatcherWithUnwrap(watcher), nil
199200
}
200201

201202
// --- Backward Compatibility Methods for MongoDB-style Type Assertions ---

0 commit comments

Comments
 (0)