Skip to content

Commit

Permalink
fix(titus): Set cmd when not empty for titus jobs (#4637)
Browse files Browse the repository at this point in the history
  • Loading branch information
aravindmd committed May 30, 2020
1 parent 0110556 commit 478c6ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ public JobDescriptor getGrpcJobDescriptor() {
containerBuilder.addEntryPoint(entryPoint);
}

if (cmd != null || !cmd.isEmpty()) {
if (cmd != null && !cmd.isEmpty()) {
containerBuilder.addCommand(cmd);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ public SubmitJobRequest toSubmitJobRequest(
.stack(stack)
.detail(freeFormDetails)
.entryPoint(entryPoint)
.cmd(cmd)
.iamProfile(iamProfile)
.capacityGroup(capacityGroup)
.labels(labels)
Expand All @@ -138,6 +137,10 @@ public SubmitJobRequest toSubmitJobRequest(
.signedAddressAllocations(resources.getSignedAddressAllocations())
.serviceJobProcesses(serviceJobProcesses);

if (cmd != null && !cmd.isEmpty()) {
submitJobRequest.cmd(cmd);
}

if (!securityGroups.isEmpty()) {
submitJobRequest.securityGroups(securityGroups);
}
Expand Down

0 comments on commit 478c6ed

Please sign in to comment.