Skip to content

Commit

Permalink
Default GangNodeUniformityLabelAnnotation at the correct level. (#120) (
Browse files Browse the repository at this point in the history
#3529)

Co-authored-by: Christopher Martin <Chris.Martin@gresearch.co.uk>
  • Loading branch information
d80tb7 and svc-oeg-aws2github committed Apr 23, 2024
1 parent d22fc41 commit 4f6df3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/armada/submit/conversion/post_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func defaultTerminationGracePeriod(spec *v1.PodSpec, config configuration.Submis

// Default's the job's GangNodeUniformityLabelAnnotation for gang jobs that do not define one.
func defaultGangNodeUniformityLabel(msg *armadaevents.SubmitJob, config configuration.SubmissionConfig) {
annotations := msg.MainObject.GetObjectMeta().GetAnnotations()
annotations := msg.GetObjectMeta().GetAnnotations()
if annotations == nil {
return
}
Expand Down
6 changes: 2 additions & 4 deletions internal/armada/submit/conversion/post_process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,8 @@ func TestDefaultTerminationGracePeriod(t *testing.T) {

func submitMsgFromAnnotations(annotations map[string]string) *armadaevents.SubmitJob {
return &armadaevents.SubmitJob{
MainObject: &armadaevents.KubernetesMainObject{
ObjectMeta: &armadaevents.ObjectMeta{
Annotations: annotations,
},
ObjectMeta: &armadaevents.ObjectMeta{
Annotations: annotations,
},
}
}

0 comments on commit 4f6df3d

Please sign in to comment.