Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
d80tb7 committed Nov 29, 2024
1 parent 85b2993 commit 688d7ae
Show file tree
Hide file tree
Showing 10 changed files with 573 additions and 616 deletions.
15 changes: 0 additions & 15 deletions .run/Scheduler Ingester.run.xml

This file was deleted.

242 changes: 106 additions & 136 deletions internal/scheduler/schedulerobjects/schedulerobjects.pb.go

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion internal/scheduler/schedulerobjects/schedulerobjects.proto
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ message JobSchedulingInfo {
// Kubernetes objects that make up this job and their respective scheduling requirements.
repeated ObjectRequirements object_requirements = 5;
uint32 version = 9;
double price = 11;
}

// Message capturing the scheduling requirements of a particular Kubernetes object.
Expand Down
8 changes: 6 additions & 2 deletions internal/scheduleringester/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ func (c *JobSetEventsInstructionConverter) handleSubmitJob(job *armadaevents.Sub
return nil, err
}

bidPrice := 0.0
if job.PriceInfo != nil {
bidPrice = job.PriceInfo.BidPrice
}

return []DbOperation{InsertJobs{jobId: &schedulerdb.Job{
JobID: jobId,
JobSet: meta.jobset,
Expand All @@ -174,7 +179,7 @@ func (c *JobSetEventsInstructionConverter) handleSubmitJob(job *armadaevents.Sub
QueuedVersion: 0,
Submitted: submitTime.UnixNano(),
Priority: int64(job.Priority),
Price: job.Price,
BidPrice: bidPrice,
SubmitMessage: compressedSubmitJobBytes,
SchedulingInfo: schedulingInfoBytes,
SchedulingInfoVersion: int32(schedulingInfo.Version),
Expand Down Expand Up @@ -516,7 +521,6 @@ func SchedulingInfoFromSubmitJob(submitJob *armadaevents.SubmitJob, submitTime t
ConcurrencySafe: submitJob.ConcurrencySafe,
SubmitTime: submitTime,
Priority: submitJob.Priority,
Price: submitJob.Price,
Version: 0,
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/api/api.swagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,9 @@ func SwaggerJsonTemplate() string {
" \"type\": \"string\",\n" +
" \"format\": \"date-time\"\n" +
" },\n" +
" \"experimentalPriceInfo\": {\n" +
" \"$ref\": \"#/definitions/apiExperimentalPriceInfo\"\n" +
" },\n" +
" \"id\": {\n" +
" \"type\": \"string\"\n" +
" },\n" +
Expand Down Expand Up @@ -901,9 +904,6 @@ func SwaggerJsonTemplate() string {
" \"$ref\": \"#/definitions/v1PodSpec\"\n" +
" }\n" +
" },\n" +
" \"priceInfo\": {\n" +
" \"$ref\": \"#/definitions/apiExperimentalPriceInfo\"\n" +
" },\n" +
" \"priority\": {\n" +
" \"type\": \"number\",\n" +
" \"format\": \"double\"\n" +
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,9 @@
"type": "string",
"format": "date-time"
},
"experimentalPriceInfo": {
"$ref": "#/definitions/apiExperimentalPriceInfo"
},
"id": {
"type": "string"
},
Expand Down Expand Up @@ -890,9 +893,6 @@
"$ref": "#/definitions/v1PodSpec"
}
},
"priceInfo": {
"$ref": "#/definitions/apiExperimentalPriceInfo"
},
"priority": {
"type": "number",
"format": "double"
Expand Down
422 changes: 211 additions & 211 deletions pkg/api/submit.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/api/submit.proto
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ message Job {
// Indicates which scheduler should manage this job.
// If empty, the default scheduler is used.
string scheduler = 20;
ExperimentalPriceInfo priceInfo = 30;
ExperimentalPriceInfo experimentalPriceInfo = 30;
}

message ExperimentalPriceInfo {
Expand Down
484 changes: 242 additions & 242 deletions pkg/armadaevents/events.pb.go

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pkg/armadaevents/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,8 @@ message SubmitJob {
bool isDuplicate = 12;
// The job id
string job_id = 14;

// Pricing Information for the job. Currently experimental
ExperimentalPriceInfo priceInfo = 15;
ExperimentalPriceInfo experimentalPriceInfo = 15;
}

message ExperimentalPriceInfo {
Expand Down

0 comments on commit 688d7ae

Please sign in to comment.