Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
453c02e
fix: add preemptive_job_id field to internal JobRunPreempted proto
williamvega May 12, 2026
4075d40
fix: add scheduler_termination_reason JSONB column to job_run
williamvega May 12, 2026
8178115
fix: add SchedulerTerminationReason field to UpdateJobRunInstruction
williamvega May 12, 2026
f1af88d
fix: wire SchedulerTerminationReason through insertion.go DB write path
williamvega May 12, 2026
fdd2c2e
fix: populate SchedulerTerminationReason in handleJobRunPreempted
williamvega May 12, 2026
1c3da33
fix: thread PreemptiveJobId through scheduler preemption events
williamvega May 12, 2026
b042f30
fix: wire PreemptiveJobId through FromInternalJobRunPreempted
williamvega May 12, 2026
35f767e
fix: add fixtures and update instructions tests for fair-share preemp…
williamvega May 12, 2026
66682cd
fix: update insertion_test.go for SchedulerTerminationReason column
williamvega May 12, 2026
268041c
fix: add getJobRunSchedulerTerminationReason API endpoint
williamvega May 12, 2026
9412096
feat: lookoutui display scheduler termination reason in job run details
williamvega May 12, 2026
e5447ce
fix: refactoring
williamvega May 13, 2026
c0a1c15
Merge branch 'master' into fix/job-run-scheduler-termination-col
williamvega May 14, 2026
4e6bc0c
fix: add test
williamvega May 14, 2026
06af2b1
fix: col nil if all args empty
williamvega May 14, 2026
34b62ed
Merge branch 'fix/job-run-scheduler-termination-col' of github.com-wi…
williamvega May 14, 2026
6609131
Merge branch 'master' into fix/job-run-scheduler-termination-col
williamvega May 14, 2026
9f4feaa
Merge branch 'master' into fix/job-run-scheduler-termination-col
williamvega May 15, 2026
a783a79
Merge branch 'master' into fix/job-run-scheduler-termination-col
williamvega May 19, 2026
7a2dbdf
fix: preemptive_job_id was not used but we will use preempting_job_id
williamvega May 19, 2026
3746956
fix: rust client
williamvega May 19, 2026
ca26b20
Merge branch 'master' into fix/job-run-scheduler-termination-col
williamvega May 20, 2026
e7b9f4b
Merge branch 'master' into fix/job-run-scheduler-termination-col
williamvega May 20, 2026
376bd73
Merge branch 'master' into fix/job-run-scheduler-termination-col
williamvega Jun 1, 2026
81f9045
Merge branch 'master' into fix/job-run-scheduler-termination-col
williamvega Jun 1, 2026
01ffdba
Merge branch 'master' into fix/job-run-scheduler-termination-col
williamvega Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/rust/src/gen/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1498,12 +1498,12 @@ pub struct JobPreemptedEvent {
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub run_id: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub preemptive_job_id: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub preemptive_run_id: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub reason: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
Comment thread
williamvega marked this conversation as resolved.
pub preempting_job_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct JobSucceededEvent {
Expand Down
15 changes: 15 additions & 0 deletions internal/common/ingest/testfixtures/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
const (
JobId = "01f3j0g1md4qx7z5qb148qnh4r"
RunId = "123e4567-e89b-12d3-a456-426614174000"
PreemptingJobId = "456e7890-e89b-12d3-a456-426614174001"
PartitionMarkerGroupId = "223e4567-e89b-12d3-a456-426614174000"
JobsetName = "testJobset"
ExecutorId = "testCluster"
Expand All @@ -43,6 +44,7 @@ const (
LeaseReturnedMsg = "lease returned error message"
UnschedulableMsg = "test pod is unschedulable"
PreemptionReason = "job preempted"
CancelReason = "sample cancel reason"
PartitionMarkerPartitionId = 456

ExecutorCordonReason = "bad executor"
Expand Down Expand Up @@ -467,6 +469,19 @@ var JobRunPreempted = &armadaevents.EventSequence_Event{
},
}

// JobRunPreemptedFairShare represents a fair-share preemption where the preempting job is known.
var JobRunPreemptedFairShare = &armadaevents.EventSequence_Event{
Created: testfixtures.BasetimeProto,
Event: &armadaevents.EventSequence_Event_JobRunPreempted{
JobRunPreempted: &armadaevents.JobRunPreempted{
PreemptedJobId: JobId,
PreemptedRunId: RunId,
PreemptingJobId: PreemptingJobId,
Reason: PreemptionReason,
},
},
}

var JobRunFailed = &armadaevents.EventSequence_Event{
Created: testfixtures.BasetimeProto,
Event: &armadaevents.EventSequence_Event_JobRunErrors{
Expand Down
14 changes: 14 additions & 0 deletions internal/lookout/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func Serve(configuration configuration.LookoutConfig) error {
getJobRunErrorRepo := repository.NewSqlGetJobRunErrorRepository(db, decompressor)
getJobRunDebugMessageRepo := repository.NewSqlGetJobRunDebugMessageRepository(db, decompressor)
getJobSpecRepo := repository.NewSqlGetJobSpecRepository(db, decompressor)
getJobRunSchedulerTerminationReasonRepo := repository.NewSqlGetJobRunSchedulerTerminationReasonRepository(db)

// create new service API
api := operations.NewLookoutAPI(swaggerSpec)
Expand Down Expand Up @@ -134,6 +135,19 @@ func Serve(configuration configuration.LookoutConfig) error {
},
)

api.GetJobRunSchedulerTerminationReasonHandler = operations.GetJobRunSchedulerTerminationReasonHandlerFunc(
func(params operations.GetJobRunSchedulerTerminationReasonParams) middleware.Responder {
ctx := armadacontext.New(params.HTTPRequest.Context(), logger)
result, err := getJobRunSchedulerTerminationReasonRepo.GetJobRunSchedulerTerminationReason(ctx, params.GetJobRunSchedulerTerminationReasonRequest.RunID)
if err != nil {
return operations.NewGetJobRunSchedulerTerminationReasonBadRequest().WithPayload(conversions.ToSwaggerError(err.Error()))
}
return operations.NewGetJobRunSchedulerTerminationReasonOK().WithPayload(&operations.GetJobRunSchedulerTerminationReasonOKBody{
SchedulerTerminationReason: result,
})
},
)

api.GetJobErrorHandler = operations.GetJobErrorHandlerFunc(
func(params operations.GetJobErrorParams) middleware.Responder {
ctx := armadacontext.New(params.HTTPRequest.Context(), logger)
Expand Down
114 changes: 114 additions & 0 deletions internal/lookout/gen/restapi/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading