Skip to content

Commit

Permalink
Addressed more feedback.
Browse files Browse the repository at this point in the history
Signed-off-by: Andon Andonov <[email protected]>
  • Loading branch information
doks5 committed Mar 27, 2023
1 parent 3d871cd commit 0036586
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@Slf4j
public class SupportedPythonVersions {

public record DeploymentDetails(String baseImage, String vdkImage) {}
record DeploymentDetails(String baseImage, String vdkImage) {}

@Value("#{${datajobs.deployment.supportedPythonVersions:{}}}")
private Map<String, DeploymentDetails> supportedPythonVersions;
Expand All @@ -50,9 +50,7 @@ public boolean isPythonVersionSupported(String pythonVersion) {
* @return A set of all python versions supported by the Control Service.
*/
public Set<String> getSupportedPythonVersions() {
return Optional.ofNullable(supportedPythonVersions)
.map(Map::keySet)
.orElse(Collections.emptySet());
return supportedPythonVersions.keySet();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ datajobs.deployment.dataJobBaseImage=python:3.9-slim

# The map of python version and respective data job base and vdk images that would be
# used for data job deployments
datajobs.deployment.supportedPythonVersions=${DATAJOBS_DEPLOYMENT_SUPPORTED_PYTHON_VERSIONS:{}}
datajobs.deployment.supportedPythonVersions=${DATAJOBS_DEPLOYMENT_SUPPORTED_PYTHON_VERSIONS:{3.9: {vdkImage: 'registry.hub.docker.com/versatiledatakit/quickstart-vdk:release', baseImage: 'python:3.9-slim'}}}
# The default python version, which is to be used when selecting the vdk and job base images from
# the supportedPythonVersions for data job deployments
datajobs.deployment.defaultPythonVersion=${DATAJOBS_DEPLOYMENT_DEFAULT_PYTHON_VERSION:3.7}
datajobs.deployment.defaultPythonVersion=${DATAJOBS_DEPLOYMENT_DEFAULT_PYTHON_VERSION:3.9}

#Configuration variables used for data job execution cleanup
#This is a spring cron expression, used to schedule the clean up job / default is every 3 hours
Expand Down

0 comments on commit 0036586

Please sign in to comment.