Skip to content

Commit c70376d

Browse files
pditommasoclaude
andauthored
Add provider option to Seqera executor config [ci fast] (#6908)
Add `seqera.executor.provider` setting to specify the compute backend provider type (e.g. aws, local), used together with region to select the matching compute environment. Bump nf-seqera to 0.15.0 and sched-client to 0.41.0-SNAPSHOT. Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a217a45 commit c70376d

6 files changed

Lines changed: 52 additions & 2 deletions

File tree

docs/reference/config.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,6 +1438,9 @@ The following settings are available:
14381438
`seqera.executor.endpoint`
14391439
: The Seqera scheduler service endpoint URL (required).
14401440

1441+
`seqera.executor.provider`
1442+
: The compute backend provider type (e.g. `'aws'`, `'local'`). When specified, used together with `region` to select the matching compute environment.
1443+
14411444
`seqera.executor.region`
14421445
: The AWS region for task execution (default: `'eu-central-1'`).
14431446

plugins/nf-seqera/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.14.0
1+
0.15.0

plugins/nf-seqera/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ dependencies {
5151
compileOnly project(':nextflow')
5252
compileOnly 'org.slf4j:slf4j-api:2.0.17'
5353
compileOnly 'org.pf4j:pf4j:3.12.0'
54-
api 'io.seqera:sched-client:0.39.0-SNAPSHOT'
54+
api 'io.seqera:sched-client:0.41.0-SNAPSHOT'
5555

5656
testImplementation(testFixtures(project(":nextflow")))
5757
testImplementation "org.apache.groovy:groovy:4.0.30"

plugins/nf-seqera/src/main/io/seqera/config/ExecutorOpts.groovy

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ class ExecutorOpts implements ConfigScope {
4141
""")
4242
final String endpoint
4343

44+
@ConfigOption
45+
@Description("""
46+
The compute backend provider type (e.g. `aws`, `local`).
47+
When specified, used together with region to select the matching compute environment.
48+
""")
49+
final String provider
50+
4451
@ConfigOption
4552
@Description("""
4653
The AWS region for task execution (default: `eu-central-1`).
@@ -103,6 +110,7 @@ class ExecutorOpts implements ConfigScope {
103110
if (!endpoint)
104111
throw new IllegalArgumentException("Missing Seqera endpoint - make sure to specify 'seqera.executor.endpoint' settings")
105112

113+
this.provider = opts.provider as String
106114
this.region = opts.region as String ?: "eu-central-1"
107115
this.keyPairName = opts.keyPairName as String
108116
this.batchFlushInterval = opts.batchFlushInterval
@@ -137,6 +145,10 @@ class ExecutorOpts implements ConfigScope {
137145
return endpoint
138146
}
139147

148+
String getProvider() {
149+
return provider
150+
}
151+
140152
String getRegion() {
141153
return region
142154
}

plugins/nf-seqera/src/main/io/seqera/executor/SeqeraExecutor.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ class SeqeraExecutor extends Executor implements ExtensionPoint {
111111
.workflowUrl(workflowUrl)
112112
.workDir(session.workDir?.toUriString())
113113
final request = new CreateRunRequest()
114+
.provider(seqeraConfig.provider)
114115
.region(seqeraConfig.region)
115116
.name(session.runName)
116117
.machineRequirement(SchemaMapperUtil.toMachineRequirement(seqeraConfig.machineRequirement))

plugins/nf-seqera/src/test/io/seqera/config/ExecutorOptsTest.groovy

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,40 @@ class ExecutorOptsTest extends Specification {
227227
config.taskEnvironment == [:]
228228
}
229229

230+
def 'should create config with provider' () {
231+
when:
232+
def config = new ExecutorOpts([
233+
endpoint: 'https://sched.example.com',
234+
provider: 'aws'
235+
])
236+
237+
then:
238+
config.provider == 'aws'
239+
}
240+
241+
def 'should default provider to null' () {
242+
when:
243+
def config = new ExecutorOpts([
244+
endpoint: 'https://sched.example.com'
245+
])
246+
247+
then:
248+
config.provider == null
249+
}
250+
251+
def 'should create config with provider and region' () {
252+
when:
253+
def config = new ExecutorOpts([
254+
endpoint: 'https://sched.example.com',
255+
provider: 'aws',
256+
region: 'us-west-2'
257+
])
258+
259+
then:
260+
config.provider == 'aws'
261+
config.region == 'us-west-2'
262+
}
263+
230264
def 'should reject invalid prediction model' () {
231265
when:
232266
new ExecutorOpts([

0 commit comments

Comments
 (0)