fix: drain legacy process log batches
This commit is contained in:
@@ -29,7 +29,10 @@ func ValidateLogBatchIngest(batch domain.LogBatchIngest) error {
|
||||
}
|
||||
hasSessionID := strings.TrimSpace(batch.LogSessionID) != ""
|
||||
hasSessionStart := !batch.SessionStartedAt.IsZero()
|
||||
if hasSessionID != hasSessionStart {
|
||||
// Older process streams persisted their start time before Run assigned a
|
||||
// generation id. Keep those batches ingestible so a durable Run spool can
|
||||
// drain without blocking newer generation-scoped console output.
|
||||
if hasSessionID && !hasSessionStart {
|
||||
violations = append(violations, "logSessionId and sessionStartedAt must be provided together")
|
||||
}
|
||||
if (hasSessionID || hasSessionStart) && batch.Source != domain.LogStreamSourceProcess {
|
||||
|
||||
Reference in New Issue
Block a user