Repository navigation
Add seqera.executor.machineRequirement.onDemandCostRatio option - #7710
Merged
Merged
Conversation
sched-client 0.96.0 is built against lib-httpx 2.7.1, and nf-seqera keeps the single lib-httpx declaration in step with it. Assisted-by: Claude Code (Claude Opus 5.5) Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Set the run's cost limit on the spot to on-demand fallback (spotFirst only). Unset keeps the scheduler's per-cloud default, 0 removes the limit, and a positive value replaces the default. The scheduler reads the ratio at run level only, so it is sent on run creation and rejected as a process hint. Requires a sched-client that includes seqeralabs/sched#1400. Assisted-by: Claude Code (Claude Opus 5.5) Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Temporary until sched publishes the release that includes seqeralabs/sched#1400. Assisted-by: Claude Code (Claude Opus 5.5) Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
✅ Deploy Preview for nextflow-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
2 tasks
The scheduler now resolves the ratio per task, like provisioning: the config value is the run default and the seqera/machineRequirement.onDemandCostRatio hint overrides it for a process. Send it on each task's machine requirement and stop rejecting the hint. Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Assisted-by: Claude Code (Claude Opus 5.5)
pditommaso
force-pushed
the
feat/seqera-ondemand-cost-ratio
branch
from
September 29, 2026 12:02
6d73a31 to
48ab6b3
Compare
pditommaso
marked this pull request as ready for review
September 29, 2026 12:05
Co-authored-by: Chris Hakkaart <chris.hakkaart@seqera.io> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Co-authored-by: Chris Hakkaart <chris.hakkaart@seqera.io> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
bentsherman
approved these changes
Sep 30, 2026
pditommaso
added a commit
that referenced
this pull request
Oct 6, 2026
Replace the 0.96.0-SNAPSHOT dependency with the released 0.100.0, which includes MachineRequirement.onDemandCostRatio (#7710) and per-attempt startedAt (#7755), and is built against lib-httpx 2.7.1. Assisted-by: Claude Code (Claude Opus 5.5) Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for the Seqera executor's cost limit on the spot → on-demand fallback. It can be set for the whole run in config, or per process with a hint, just like
provisioning. The scheduler side is seqeralabs/sched#1400 (run level) and seqeralabs/sched#1491 (per task).With
provisioning = 'spotFirst', the scheduler falls back to on-demand when spot capacity runs out, but only while the highest on-demand hourly price of the instance types it selected is at most a set multiple of their highest spot price. Otherwise it retries the task on spot, and the task fails if spot capacity stays unavailable, with an error startingon-demand fallback refused. The scheduler applies a default per cloud provider (currently AWS 3.25, Google Cloud 2.48, Azure no limit).The config value is the default for every task of the run:
seqera { executor { machineRequirement { provisioning = 'spotFirst' onDemandCostRatio = 2.5 } } }A process hint overrides it for that process:
onDemandCostRatio0provisioning = 'spot'for that> 0Tasks with different limits run on separate clusters. Tasks that set a limit,
0included, don't use the compute environment's warm pool. For now this is the only way to set the ratio: Seqera Platform has no compute-environment setting for it.Changes
MachineRequirementOpts: newonDemandCostRatio(Double) config option. As a@ConfigOptionfield it is automatically a supportedmachineRequirement.*hint, merged over the config value like the other fields.SchemaMapperUtil: sends the ratio on the run's machine requirement (the run default) and on each task's (config value or hint). A sharedtoOnDemandCostRatiohelper checks fornullrather than truthiness, so an explicit0is sent and not dropped, and a negative value fails with a clear error.reference/config/seqera.mdx. Inexecutor/seqera.mdx, the hint is added to the supported list, plus an "On-demand fallback cost limit" section with the config and hint examples, the unset/0/> 0table and the cluster/warm-pool notes.sched-client0.79.3 → 0.96.0, and the sharedlibHttpxVersion2.7.0 → 2.7.1 to stay in step with the version sched-client is built against (2.7.1 is a bug-fix release: token-refresh client leak).Before merging
sched-client:0.96.0-SNAPSHOTwith the first sched release that includes seqeralabs/sched#1400. The per-task change needs no new client, because the field is already on the sharedMachineRequirementtype.Tests
MapperUtilTest: unset /0/2.5are mapped correctly for both the run and the task requirement, and a negative value is rejected.HintHelperTest: a hint of0overrides a config value of3.25(0is a real value, not "unset").sched-client:0.96.0-SNAPSHOT(0.96.0-20260929.120116-9), which includes seqeralabs/sched#1400 and Limit on run name length #1491. With the sched-client 0.96.0 release and lib-httpx 2.7.1: nf-seqera 255, nf-tower 430 and nf-commons proxy tests pass.Related: seqeralabs/sched#1400, seqeralabs/sched#1491, seqeralabs/docs#1913
🤖 Generated with Claude Code