From 74952df36256d9e3249afa3dbad82ca7b3484ca7 Mon Sep 17 00:00:00 2001 From: Dr Marco Claudio De La Pierre Date: Thu, 1 Feb 2024 10:41:23 +0800 Subject: [PATCH] Revert "Architecture: dockerArch renamed to dockerPlat" This reverts commit 8e1a4c4f9a91f0c7536de9f55fed179182d50eea. --- .../main/groovy/nextflow/processor/Architecture.groovy | 8 ++++---- .../groovy/nextflow/processor/ArchitectureTest.groovy | 4 ++-- .../src/main/io/seqera/wave/plugin/WaveClient.groovy | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/nextflow/src/main/groovy/nextflow/processor/Architecture.groovy b/modules/nextflow/src/main/groovy/nextflow/processor/Architecture.groovy index 7e39fe0d5ed..dc4000d8b35 100644 --- a/modules/nextflow/src/main/groovy/nextflow/processor/Architecture.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/processor/Architecture.groovy @@ -35,7 +35,7 @@ class Architecture { * example of notation in process: arch 'linux/x86_64', target: 'haswell' * example of notation in config: arch = [name: 'linux/x86_64', target: 'haswell'] * - * where dockerPlat = 'linux/x86_64' + * where dockerArch = 'linux/x86_64' * spackArch = target ?: arch // plus some validation for Spack syntax * * platform = 'linux' @@ -45,7 +45,7 @@ class Architecture { * [alternate example: 'arch linux/arm/v8', where platform = 'linux' and arch = 'arm/v8'] */ // used in Nextflow - final String dockerPlat + final String dockerArch final String spackArch // defined, but currently not used @@ -73,7 +73,7 @@ class Architecture { return value } - static private String validateArchToDockerPlat( Map res ) { + static private String validateArchToDockerArch( Map res ) { def value = getArch(res.name as String) def name = res.name as String if( value == 'x86_64' || value == 'amd64' ) @@ -112,7 +112,7 @@ class Architecture { this.platform = getPlatform(res.name as String) this.arch = getArch(res.name as String) - this.dockerPlat = validateArchToDockerPlat(res) + this.dockerArch = validateArchToDockerArch(res) this.spackArch = getSpackArch(res) if( res.target != null ) this.target = res.target as String diff --git a/modules/nextflow/src/test/groovy/nextflow/processor/ArchitectureTest.groovy b/modules/nextflow/src/test/groovy/nextflow/processor/ArchitectureTest.groovy index 411744d6ef3..d296fadd216 100644 --- a/modules/nextflow/src/test/groovy/nextflow/processor/ArchitectureTest.groovy +++ b/modules/nextflow/src/test/groovy/nextflow/processor/ArchitectureTest.groovy @@ -34,7 +34,7 @@ class ArchitectureTest extends Specification { arch.platform == PLAT arch.arch == ARCH arch.target == TAR - arch.dockerPlat == DOCK + arch.dockerArch == DOCK arch.spackArch == SPACK where: @@ -56,7 +56,7 @@ class ArchitectureTest extends Specification { arch.platform == PLAT arch.arch == ARCH arch.target == TAR - arch.dockerPlat == DOCK + arch.dockerArch == DOCK arch.spackArch == SPACK where: diff --git a/plugins/nf-wave/src/main/io/seqera/wave/plugin/WaveClient.groovy b/plugins/nf-wave/src/main/io/seqera/wave/plugin/WaveClient.groovy index 37efa28c3ea..d7829b59a35 100644 --- a/plugins/nf-wave/src/main/io/seqera/wave/plugin/WaveClient.groovy +++ b/plugins/nf-wave/src/main/io/seqera/wave/plugin/WaveClient.groovy @@ -404,7 +404,7 @@ class WaveClient { // get the Spack architecture final arch = task.config.getArchitecture() final spackArch = arch ? arch.spackArch : DEFAULT_SPACK_ARCH - final dockerPlat = arch? arch.dockerPlat : DEFAULT_DOCKER_PLATFORM + final dockerArch = arch? arch.dockerArch : DEFAULT_DOCKER_PLATFORM // compose the request attributes def attrs = new HashMap() attrs.container = containerImage @@ -425,10 +425,10 @@ class WaveClient { checkConflicts(attrs, task.lazyName()) // resolve the wave assets - return resolveAssets0(attrs, bundle, singularity, dockerPlat, spackArch) + return resolveAssets0(attrs, bundle, singularity, dockerArch, spackArch) } - protected WaveAssets resolveAssets0(Map attrs, ResourcesBundle bundle, boolean singularity, String dockerPlat, String spackArch) { + protected WaveAssets resolveAssets0(Map attrs, ResourcesBundle bundle, boolean singularity, String dockerArch, String spackArch) { final scriptType = singularity ? 'singularityfile' : 'dockerfile' String containerScript = attrs.get(scriptType) @@ -508,7 +508,7 @@ class WaveClient { /* * the container platform to be used */ - final platform = dockerPlat + final platform = dockerArch // check is a valid container image WaveAssets.validateContainerName(containerImage)