Skip to content

Commit 443f63b

Browse files
committed
added back in null check in getKey
1 parent 5ddabad commit 443f63b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/webapp/app/services/runsReplicationService.server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ export class RunsReplicationService {
216216
callback: this.#flushBatch.bind(this),
217217
// Key-based deduplication to reduce duplicates sent to ClickHouse
218218
getKey: (item) => {
219+
if (!item?.run?.id) {
220+
this.logger.warn("Skipping replication event with null run", { event: item });
221+
return null;
222+
}
219223
return `${item.event}_${item.run.id}`;
220224
},
221225
// Keep the run with the higher version (latest)

0 commit comments

Comments
 (0)