From acea48b8ea506fb1645b69a62d811457c7f5d123 Mon Sep 17 00:00:00 2001 From: Weronika Sosnowska Date: Wed, 10 Jul 2024 10:55:15 +0200 Subject: [PATCH 1/5] bump tower-java-sdk to 1.9.6 --- build.gradle | 2 +- .../tower/cli/commands/computeenvs/ExportCmd.java | 8 ++++---- .../tower/cli/commands/computeenvs/ImportCmd.java | 4 ++-- .../cli/commands/computeenvs/add/AbstractAddCmd.java | 12 ++++++------ .../computeenvs/platforms/AbstractPlatform.java | 9 ++++----- .../computeenvs/platforms/AltairPlatform.java | 4 ++-- .../computeenvs/platforms/AwsBatchForgePlatform.java | 4 ++-- .../platforms/AwsBatchManualPlatform.java | 2 +- .../computeenvs/platforms/AzBatchForgePlatform.java | 5 ++--- .../computeenvs/platforms/AzBatchManualPlatform.java | 2 +- .../commands/computeenvs/platforms/EksPlatform.java | 2 +- .../commands/computeenvs/platforms/GkePlatform.java | 2 +- .../computeenvs/platforms/GoogleBatchPlatform.java | 2 +- .../platforms/GoogleLifeSciencesPlatform.java | 4 ++-- .../commands/computeenvs/platforms/K8sPlatform.java | 2 +- .../commands/computeenvs/platforms/LsfPlatform.java | 2 +- .../commands/computeenvs/platforms/MoabPlatform.java | 4 ++-- .../cli/commands/computeenvs/platforms/Platform.java | 4 ++-- .../computeenvs/platforms/SlurmPlatform.java | 4 ++-- .../computeenvs/platforms/UnivaPlatform.java | 6 +++--- .../commands/credentials/AbstractCredentialsCmd.java | 2 +- .../io/seqera/tower/cli/commands/runs/ViewCmd.java | 4 ++-- 22 files changed, 44 insertions(+), 46 deletions(-) diff --git a/build.gradle b/build.gradle index 22f3290f..28ab0d24 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,7 @@ dependencies { implementation 'org.slf4j:slf4j-api:1.7.36' implementation 'ch.qos.logback:logback-core:1.2.11' implementation 'ch.qos.logback:logback-classic:1.2.11' - implementation 'io.seqera.tower:tower-java-sdk:1.9.5' + implementation 'io.seqera.tower:tower-java-sdk:1.9.6' implementation 'info.picocli:picocli:4.6.3' implementation 'org.apache.commons:commons-compress:1.22' implementation 'org.tukaani:xz:1.9' diff --git a/src/main/java/io/seqera/tower/cli/commands/computeenvs/ExportCmd.java b/src/main/java/io/seqera/tower/cli/commands/computeenvs/ExportCmd.java index bdc1c6e6..0c24f24f 100644 --- a/src/main/java/io/seqera/tower/cli/commands/computeenvs/ExportCmd.java +++ b/src/main/java/io/seqera/tower/cli/commands/computeenvs/ExportCmd.java @@ -27,7 +27,7 @@ import io.seqera.tower.cli.shared.ComputeEnvExportFormat; import io.seqera.tower.cli.utils.FilesHelper; import io.seqera.tower.model.AwsBatchConfig; -import io.seqera.tower.model.ComputeEnv; +import io.seqera.tower.model.ComputeEnvComputeConfig; import io.seqera.tower.model.ComputeEnvResponseDto; import picocli.CommandLine; @@ -49,14 +49,14 @@ public class ExportCmd extends AbstractComputeEnvCmd { @Override protected Response exec() throws ApiException { Long wspId = workspaceId(workspace.workspace); - + ComputeEnvResponseDto ce = fetchComputeEnv(computeEnvRefOptions, wspId); - ComputeEnv computeEnv = new ComputeEnv(); + ComputeEnvComputeConfig computeEnv = new ComputeEnvComputeConfig(); computeEnv.setDescription(ce.getDescription()); computeEnv.setCredentialsId(ce.getCredentialsId()); computeEnv.setMessage(ce.getMessage()); - computeEnv.setPlatform(ce.getPlatform() != null ? ComputeEnv.PlatformEnum.fromValue(ce.getPlatform().getValue()) : null); + computeEnv.setPlatform(ce.getPlatform() != null ? ComputeEnvComputeConfig.PlatformEnum.fromValue(ce.getPlatform().getValue()) : null); computeEnv.setConfig(ce.getConfig()); // Remove forged resources diff --git a/src/main/java/io/seqera/tower/cli/commands/computeenvs/ImportCmd.java b/src/main/java/io/seqera/tower/cli/commands/computeenvs/ImportCmd.java index a198a307..bdf18855 100644 --- a/src/main/java/io/seqera/tower/cli/commands/computeenvs/ImportCmd.java +++ b/src/main/java/io/seqera/tower/cli/commands/computeenvs/ImportCmd.java @@ -25,7 +25,7 @@ import io.seqera.tower.cli.responses.Response; import io.seqera.tower.cli.shared.ComputeEnvExportFormat; import io.seqera.tower.cli.utils.FilesHelper; -import io.seqera.tower.model.ComputeEnv; +import io.seqera.tower.model.ComputeEnvComputeConfig; import io.seqera.tower.model.ComputeEnvResponseDto; import picocli.CommandLine; @@ -50,7 +50,7 @@ protected Response exec() throws ApiException, IOException { ComputeEnvExportFormat ceData = ComputeEnvExportFormat.deserialize(FilesHelper.readString(fileName)); - ComputeEnv.PlatformEnum platform = ComputeEnv.PlatformEnum.fromValue(ceData.getConfig().getDiscriminator()); + ComputeEnvComputeConfig.PlatformEnum platform = ComputeEnvComputeConfig.PlatformEnum.fromValue(ceData.getConfig().getDiscriminator()); Long wspId = workspaceId(workspace.workspace); diff --git a/src/main/java/io/seqera/tower/cli/commands/computeenvs/add/AbstractAddCmd.java b/src/main/java/io/seqera/tower/cli/commands/computeenvs/add/AbstractAddCmd.java index 75a1ccd5..eb5e73a2 100644 --- a/src/main/java/io/seqera/tower/cli/commands/computeenvs/add/AbstractAddCmd.java +++ b/src/main/java/io/seqera/tower/cli/commands/computeenvs/add/AbstractAddCmd.java @@ -28,7 +28,7 @@ import io.seqera.tower.cli.responses.Response; import io.seqera.tower.cli.responses.computeenvs.ComputeEnvAdded; import io.seqera.tower.model.ComputeConfig; -import io.seqera.tower.model.ComputeEnv; +import io.seqera.tower.model.ComputeEnvComputeConfig; import io.seqera.tower.model.ComputeEnvStatus; import io.seqera.tower.model.CreateComputeEnvRequest; import io.seqera.tower.model.CreateComputeEnvResponse; @@ -100,11 +100,11 @@ private ComputeEnvStatus checkComputeEnvStatus(String computeEnvId, Long workspa } } - protected ComputeEnvAdded addComputeEnv(ComputeEnv.PlatformEnum platform, ComputeConfig config) throws ApiException { + protected ComputeEnvAdded addComputeEnv(ComputeEnvComputeConfig.PlatformEnum platform, ComputeConfig config) throws ApiException { return addComputeEnvWithLabels(platform, config, labels); } - protected ComputeEnvAdded addComputeEnvWithLabels(ComputeEnv.PlatformEnum platform, ComputeConfig config, List