Skip to content

Commit

Permalink
Rename jobIdStr -> jobId , runIdStr -> runId (#3974)
Browse files Browse the repository at this point in the history
* Rename jobIdStr -> jobId , runIdStr -> runId

* Lint

Signed-off-by: Chris Martin <[email protected]>

* chnage over field names in executor api

Signed-off-by: Chris Martin <[email protected]>

* fix JobIding!

Signed-off-by: Chris Martin <[email protected]>

---------

Signed-off-by: Chris Martin <[email protected]>
  • Loading branch information
d80tb7 authored Sep 30, 2024
1 parent d6554a7 commit aa98b44
Show file tree
Hide file tree
Showing 43 changed files with 1,408 additions and 1,407 deletions.
2 changes: 1 addition & 1 deletion internal/common/eventutil/eventutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func ApiJobFromLogSubmitJob(ownerId string, groups []string, queueName string, j
}

return &api.Job{
Id: e.JobIdStr,
Id: e.JobId,
ClientId: e.DeduplicationId,
Queue: queueName,
JobSetId: jobSetName,
Expand Down
22 changes: 11 additions & 11 deletions internal/common/eventutil/eventutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func TestSequenceEventListSizeBytes(t *testing.T) {
{
Event: &armadaevents.EventSequence_Event_CancelledJob{
CancelledJob: &armadaevents.CancelledJob{
JobIdStr: jobId,
JobId: jobId,
},
},
},
Expand All @@ -291,9 +291,9 @@ func TestLimitSequencesEventMessageCount(t *testing.T) {
JobSetName: "jobSetName1",
Groups: []string{"group1", "group2"},
Events: []*armadaevents.EventSequence_Event{
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobIdStr: "a"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobIdStr: "b"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobIdStr: "c"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobId: "a"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobId: "b"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobId: "c"}}},
},
},
{
Expand All @@ -302,8 +302,8 @@ func TestLimitSequencesEventMessageCount(t *testing.T) {
JobSetName: "jobSetName1",
Groups: []string{"group1", "group2"},
Events: []*armadaevents.EventSequence_Event{
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobIdStr: "d"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobIdStr: "e"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobId: "d"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobId: "e"}}},
},
},
}
Expand All @@ -315,8 +315,8 @@ func TestLimitSequencesEventMessageCount(t *testing.T) {
JobSetName: "jobSetName1",
Groups: []string{"group1", "group2"},
Events: []*armadaevents.EventSequence_Event{
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobIdStr: "a"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobIdStr: "b"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobId: "a"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobId: "b"}}},
},
},
{
Expand All @@ -325,7 +325,7 @@ func TestLimitSequencesEventMessageCount(t *testing.T) {
JobSetName: "jobSetName1",
Groups: []string{"group1", "group2"},
Events: []*armadaevents.EventSequence_Event{
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobIdStr: "c"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobId: "c"}}},
},
},
{
Expand All @@ -334,8 +334,8 @@ func TestLimitSequencesEventMessageCount(t *testing.T) {
JobSetName: "jobSetName1",
Groups: []string{"group1", "group2"},
Events: []*armadaevents.EventSequence_Event{
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobIdStr: "d"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobIdStr: "e"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobId: "d"}}},
{Event: &armadaevents.EventSequence_Event_SubmitJob{SubmitJob: &armadaevents.SubmitJob{JobId: "e"}}},
},
},
}
Expand Down
22 changes: 11 additions & 11 deletions internal/common/ingest/ingestion_pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ var succeeded = &armadaevents.EventSequence{
Created: baseTimeProto,
Event: &armadaevents.EventSequence_Event_JobRunSucceeded{
JobRunSucceeded: &armadaevents.JobRunSucceeded{
RunIdStr: runId,
JobIdStr: jobId,
RunId: runId,
JobId: jobId,
},
},
},
Expand All @@ -55,8 +55,8 @@ var pendingAndRunning = &armadaevents.EventSequence{
Created: baseTimeProto,
Event: &armadaevents.EventSequence_Event_JobRunLeased{
JobRunLeased: &armadaevents.JobRunLeased{
RunIdStr: runId,
JobIdStr: jobId,
RunId: runId,
JobId: jobId,
ExecutorId: "k8sId1",
},
},
Expand All @@ -65,8 +65,8 @@ var pendingAndRunning = &armadaevents.EventSequence{
Created: baseTimeProto,
Event: &armadaevents.EventSequence_Event_JobRunRunning{
JobRunRunning: &armadaevents.JobRunRunning{
RunIdStr: runId,
JobIdStr: jobId,
RunId: runId,
JobId: jobId,
},
},
},
Expand All @@ -82,8 +82,8 @@ var failed = &armadaevents.EventSequence{
Created: baseTimeProto,
Event: &armadaevents.EventSequence_Event_JobRunErrors{
JobRunErrors: &armadaevents.JobRunErrors{
RunIdStr: runId,
JobIdStr: jobId,
RunId: runId,
JobId: jobId,
Errors: []*armadaevents.Error{
{
Terminal: true,
Expand All @@ -97,7 +97,7 @@ var failed = &armadaevents.EventSequence{
Created: baseTimeProto,
Event: &armadaevents.EventSequence_Event_JobErrors{
JobErrors: &armadaevents.JobErrors{
JobIdStr: jobId,
JobId: jobId,
Errors: []*armadaevents.Error{
{
Terminal: true,
Expand Down Expand Up @@ -369,8 +369,8 @@ func generateEventSequence(numberOfEvents int) *armadaevents.EventSequence {
Created: baseTimeProto,
Event: &armadaevents.EventSequence_Event_JobRunSucceeded{
JobRunSucceeded: &armadaevents.JobRunSucceeded{
RunIdStr: runId,
JobIdStr: jobId,
RunId: runId,
JobId: jobId,
},
},
})
Expand Down
Loading

0 comments on commit aa98b44

Please sign in to comment.