Simplfy how requestor is set in scheduler - #5128
Conversation
JamesMurkin
commented
Aug 21, 2026
- Don't set UserId on sequence generated by the scheduler, as this can have the wrong user in the case multiple events happen at once that could set the user
- Probably we should make all sequences generated by scheduler have user id "armada-scheduler" or just left blank as now
- Use Deref as it is neater
- Don't set UserId on sequence generated by the scheduler, as this can have the wrong user in the case multiple events happen at once that could set the user - Probably we should make all sequences generated by scheduler have user id "armada-scheduler" or just left blank as now - Use Deref as it is neater Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
Greptile SummaryThe PR moves requester attribution from scheduler-generated sequence metadata to individual reprioritisation, cancellation, and preemption events, and replaces manual pointer handling with
Confidence Score: 4/5The requester loss for cancel-by-job-set events should be fixed before merging. CancelJob lacks an event-level requester, so removing EventSequence.UserId causes downstream persisted and public cancellation attribution to become blank and breaks existing scheduler expectations. Files Needing Attention: internal/scheduler/scheduler.go
|
| Filename | Overview |
|---|---|
| internal/scheduler/scheduler.go | Simplifies optional requester dereferences and removes sequence-level attribution, but loses requester data for the cancel-by-job-set CancelJob path. |
Reviews (1): Last reviewed commit: "Simplfy how requestor is set in schedule..." | Re-trigger Greptile
| return &armadaevents.EventSequence{ | ||
| Queue: job.Queue(), | ||
| JobSetName: job.Jobset(), | ||
| UserId: sequenceUserId, | ||
| Events: events, |
There was a problem hiding this comment.
CancelJob requester attribution is lost
When a job has a cancel-by-job-set request, the scheduler emits a CancelJob without an event-level requester and now leaves EventSequence.UserId empty, causing downstream ingestion and public event conversion to record a blank cancellation requester.
Knowledge Base Used: Event processing and projections
|