Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1438,6 +1438,9 @@ The following settings are available:
`seqera.executor.endpoint`
: The Seqera scheduler service endpoint URL (required).

`seqera.executor.provider`
: The compute backend provider type (e.g. `'aws'`, `'local'`). When specified, used together with `region` to select the matching compute environment.

`seqera.executor.region`
: The AWS region for task execution (default: `'eu-central-1'`).

Expand Down
2 changes: 1 addition & 1 deletion plugins/nf-seqera/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.14.0
0.15.0
2 changes: 1 addition & 1 deletion plugins/nf-seqera/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies {
compileOnly project(':nextflow')
compileOnly 'org.slf4j:slf4j-api:2.0.17'
compileOnly 'org.pf4j:pf4j:3.12.0'
api 'io.seqera:sched-client:0.39.0-SNAPSHOT'
api 'io.seqera:sched-client:0.41.0-SNAPSHOT'

testImplementation(testFixtures(project(":nextflow")))
testImplementation "org.apache.groovy:groovy:4.0.30"
Expand Down
12 changes: 12 additions & 0 deletions plugins/nf-seqera/src/main/io/seqera/config/ExecutorOpts.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ class ExecutorOpts implements ConfigScope {
""")
final String endpoint

@ConfigOption
@Description("""
The compute backend provider type (e.g. `aws`, `local`).
When specified, used together with region to select the matching compute environment.
""")
final String provider

@ConfigOption
@Description("""
The AWS region for task execution (default: `eu-central-1`).
Expand Down Expand Up @@ -103,6 +110,7 @@ class ExecutorOpts implements ConfigScope {
if (!endpoint)
throw new IllegalArgumentException("Missing Seqera endpoint - make sure to specify 'seqera.executor.endpoint' settings")

this.provider = opts.provider as String
this.region = opts.region as String ?: "eu-central-1"
this.keyPairName = opts.keyPairName as String
this.batchFlushInterval = opts.batchFlushInterval
Expand Down Expand Up @@ -137,6 +145,10 @@ class ExecutorOpts implements ConfigScope {
return endpoint
}

String getProvider() {
return provider
}

String getRegion() {
return region
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class SeqeraExecutor extends Executor implements ExtensionPoint {
.workflowUrl(workflowUrl)
.workDir(session.workDir?.toUriString())
final request = new CreateRunRequest()
.provider(seqeraConfig.provider)
.region(seqeraConfig.region)
.name(session.runName)
.machineRequirement(SchemaMapperUtil.toMachineRequirement(seqeraConfig.machineRequirement))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,40 @@ class ExecutorOptsTest extends Specification {
config.taskEnvironment == [:]
}

def 'should create config with provider' () {
when:
def config = new ExecutorOpts([
endpoint: 'https://sched.example.com',
provider: 'aws'
])

then:
config.provider == 'aws'
}

def 'should default provider to null' () {
when:
def config = new ExecutorOpts([
endpoint: 'https://sched.example.com'
])

then:
config.provider == null
}

def 'should create config with provider and region' () {
when:
def config = new ExecutorOpts([
endpoint: 'https://sched.example.com',
provider: 'aws',
region: 'us-west-2'
])

then:
config.provider == 'aws'
config.region == 'us-west-2'
}

def 'should reject invalid prediction model' () {
when:
new ExecutorOpts([
Expand Down
Loading