Skip to content

Commit

Permalink
Google Java Format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 14, 2023
1 parent b74123a commit 71a596a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,15 @@ public static String getCronJobName(String jobName) {
return jobName;
}

private boolean isVdkVersionPassedDifferentFromOneSetByPythonVersion(JobDeployment jobDeployment) {
private boolean isVdkVersionPassedDifferentFromOneSetByPythonVersion(
JobDeployment jobDeployment) {
var passedVdkVersion = jobDeployment.getVdkVersion();
var vdkVersionSetByPythonVersion =
DockerImageName.getTag(supportedPythonVersions.getVdkImage(jobDeployment.getPythonVersion()));
DockerImageName.getTag(
supportedPythonVersions.getVdkImage(jobDeployment.getPythonVersion()));

return passedVdkVersion != null && !passedVdkVersion.isEmpty() && !passedVdkVersion.equals(vdkVersionSetByPythonVersion);
return passedVdkVersion != null
&& !passedVdkVersion.isEmpty()
&& !passedVdkVersion.equals(vdkVersionSetByPythonVersion);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,9 @@ private KubernetesService.CronJob getCronJob(
"cp -r $(python -c \"from distutils.sysconfig import get_python_lib;"
+ " print(get_python_lib())\") /vdk/. && cp /usr/local/bin/vdk /vdk/.");
var jobVdkImage =
isVdkVersionPassedDifferentFromOneSetByPythonVersion(jobDeployment)
? supportedPythonVersions.replaceVdkVersionInImage(jobDeployment.getVdkVersion())
: supportedPythonVersions.getVdkImage(jobDeployment.getPythonVersion());
isVdkVersionPassedDifferentFromOneSetByPythonVersion(jobDeployment)
? supportedPythonVersions.replaceVdkVersionInImage(jobDeployment.getVdkVersion())
: supportedPythonVersions.getVdkImage(jobDeployment.getPythonVersion());
var jobInitContainer =
KubernetesService.container(
"vdk",
Expand Down Expand Up @@ -485,11 +485,15 @@ private void handleResourcesException(ParseException e) {
log.error(errorMessage.toString(), e);
}

private boolean isVdkVersionPassedDifferentFromOneSetByPythonVersion(DesiredDataJobDeployment jobDeployment) {
private boolean isVdkVersionPassedDifferentFromOneSetByPythonVersion(
DesiredDataJobDeployment jobDeployment) {
var passedVdkVersion = jobDeployment.getVdkVersion();
var vdkVersionSetByPythonVersion =
DockerImageName.getTag(supportedPythonVersions.getVdkImage(jobDeployment.getPythonVersion()));
DockerImageName.getTag(
supportedPythonVersions.getVdkImage(jobDeployment.getPythonVersion()));

return passedVdkVersion != null && !passedVdkVersion.isEmpty() && !passedVdkVersion.equals(vdkVersionSetByPythonVersion);
return passedVdkVersion != null
&& !passedVdkVersion.isEmpty()
&& !passedVdkVersion.equals(vdkVersionSetByPythonVersion);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import java.util.*;

import com.vmware.taurus.service.model.JobDeployment;
import org.springframework.beans.factory.annotation.Value;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package com.vmware.taurus.service.deploy;

import com.vmware.taurus.service.model.JobDeployment;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand Down

0 comments on commit 71a596a

Please sign in to comment.