Skip to content

Commit

Permalink
Address feedback.
Browse files Browse the repository at this point in the history
Signed-off-by: Andon Andonov <[email protected]>
  • Loading branch information
doks5 committed May 22, 2023
1 parent 77022f7 commit 6ec28eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ deploymentDockerRegistryPasswordReadOnly: ""

## The registry and associated credentials needed to pull the vdk sdk image.
## These are stored in a kubernetes secret.
## IMPORTANT: The registry should be the same as the one specified in the deploymentSupportedPythonVersions
deploymentVdkDistributionImage:
registry: registry.hub.docker.com/versatiledatakit

Expand All @@ -269,6 +270,7 @@ deploymentVdkDistributionImage:

## The registry URL and associated credentials needed to pull the data job base image.
## These are stored in a kubernetes secret.
## IMPORTANT: The registry should be the same as the one specified in the deploymentSupportedPythonVersions
deploymentDataJobBaseImage:
registry: registry.hub.docker.com/versatiledatakit
username:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
@TestPropertySource(
properties = {
"datajobs.control.k8s.k8sSupportsV1CronJob=true",
"datajobs.vdk.image=",
"datajobs.deployment.dataJobBaseImage="
})
@SpringBootTest(
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ private void updateCronJob(DataJob dataJob, JobDeployment jobDeployment, String
"-c",
"cp -r $(python -c \"from distutils.sysconfig import get_python_lib;"
+ " print(get_python_lib())\") /vdk/. && cp /usr/local/bin/vdk /vdk/.");
var jobVdkImage = getJobVdkImage(jobDeployment);
var jobVdkImage = supportedPythonVersions.getVdkImage(jobDeployment.getPythonVersion());
var jobInitContainer =
KubernetesService.container(
"vdk",
Expand Down Expand Up @@ -306,18 +306,6 @@ private void updateCronJob(DataJob dataJob, JobDeployment jobDeployment, String
}
}

private String getJobVdkImage(JobDeployment jobDeployment) {
if (!supportedPythonVersions.getSupportedPythonVersions().isEmpty()
&& supportedPythonVersions.isPythonVersionSupported(jobDeployment.getPythonVersion())) {
return supportedPythonVersions.getVdkImage(jobDeployment.getPythonVersion());
} else {
log.warn(
"An issue with the job deployment's pythonVersion or supportedPythonVersions"
+ " configuration has occurred. Returning default vdk image");
return supportedPythonVersions.getDefaultVdkImage();
}
}

/**
* Returns the environment variables set to vdk that are based on job configuration. Those are
* automatically injected during cloud runs
Expand Down

0 comments on commit 6ec28eb

Please sign in to comment.