Skip to content

Align Seqera executor maxSpotAttempts and Fusion handling - #7412

Merged
pditommaso merged 4 commits into
masterfrom
align-seqera-spot-attempts
Aug 6, 2026
Merged

Align Seqera executor maxSpotAttempts and Fusion handling#7412
pditommaso merged 4 commits into
masterfrom
align-seqera-spot-attempts

Conversation

@pditommaso

Copy link
Copy Markdown
Member

Make the Seqera executor follow the same pattern used by AWS Batch and Google Batch.

  • The spot attempts policy now lives in a maxSpotAttempts method in SeqeraTaskHandler, mirroring AwsBatchTaskHandler and GoogleBatchTaskHandler: the config value wins, otherwise fall back to FusionConfig.DEFAULT_SNAPSHOT_MAX_SPOT_ATTEMPTS when Fusion snapshots are enabled. SchemaMapperUtil no longer owns that policy, it just maps the resolved value. The method takes the hint-overlaid MachineRequirementOpts since Seqera resolves seqera/machineRequirement.* hints per task.
  • The Fusion snapshot flag passed to the scheduler is guarded by fusionEnabled() at the call site, as done by the other two executors.
  • SeqeraExecutor.isFusionEnabled now simply delegates to FusionHelper.isFusionEnabled instead of throwing from a boolean getter; the "requires Fusion" abort moved to register.

Behavior is unchanged in practice — Fusion is mandatory for this executor, so the new guard is always true. This aligns the structure and adds test coverage for the spot attempts resolution.

🤖 Generated with Claude Code

Make the Seqera executor follow the same pattern used by AWS Batch and
Google Batch:

- The spot attempts policy now lives in a `maxSpotAttempts` method in
  `SeqeraTaskHandler`, matching `AwsBatchTaskHandler` and
  `GoogleBatchTaskHandler`: the config value wins, otherwise fall back to
  `FusionConfig.DEFAULT_SNAPSHOT_MAX_SPOT_ATTEMPTS` when Fusion snapshots
  are enabled. `SchemaMapperUtil` just maps the resolved value.
- The Fusion snapshot flag is guarded by `fusionEnabled()` at the call
  site, as done by the other executors.
- `SeqeraExecutor.isFusionEnabled` now simply delegates to
  `FusionHelper.isFusionEnabled` instead of throwing from a boolean
  getter; the "requires Fusion" check is done in `register`.

Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Assisted-by: Claude Code (Opus 5)
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@netlify

netlify Bot commented Jul 30, 2026

Copy link
Copy Markdown

Deploy Preview for nextflow-docs ready!

Name Link
🔨 Latest commit 54a47db
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs/deploys/6a7359b140bdab00084f0b5c
😎 Deploy Preview https://deploy-preview-7412--nextflow-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread plugins/nf-seqera/src/main/io/seqera/executor/SeqeraTaskHandler.groovy Outdated
Fusion is mandatory for the Seqera executor -- `register` aborts when it
is not enabled -- so `fusionEnabled()` is always true by the time a task
is submitted. Test the snapshot flag directly instead, both at the
`toMachineRequirement` call site and in `maxSpotAttempts`.

Also move the misplaced `createHandlerWithError` javadoc back onto its
method.

Assisted-by: Claude Code (Opus 5)
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
A negative `machineRequirement.maxSpotAttempts` was silently dropped:
`maxSpotAttempts` returned it as-is and `SchemaMapperUtil` then mapped
any non-positive value to null. Fail early instead, using the same
`IllegalArgumentException` style as the neighbouring machine requirement
validation in `SchemaMapperUtil`.

Assisted-by: Claude Code (Opus 5)
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>

@bentsherman bentsherman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failure looks like a flaky cloudinfo test

@pditommaso

Copy link
Copy Markdown
Member Author

Weird, twice in a row on the Java 25 suite

@pditommaso
pditommaso merged commit 22214c5 into master Aug 6, 2026
9 of 11 checks passed
@pditommaso
pditommaso deleted the align-seqera-spot-attempts branch August 6, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants