Skip to content

Commit

Permalink
Revert "Architecture: dockerArch renamed to dockerPlat"
Browse files Browse the repository at this point in the history
This reverts commit 8e1a4c4.
  • Loading branch information
marcodelapierre committed Feb 1, 2024
1 parent 7ca3eb2 commit 74952df
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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' )
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String,String>()
attrs.container = containerImage
Expand All @@ -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<String,String> attrs, ResourcesBundle bundle, boolean singularity, String dockerPlat, String spackArch) {
protected WaveAssets resolveAssets0(Map<String,String> attrs, ResourcesBundle bundle, boolean singularity, String dockerArch, String spackArch) {

final scriptType = singularity ? 'singularityfile' : 'dockerfile'
String containerScript = attrs.get(scriptType)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 74952df

Please sign in to comment.