Skip to content

Add hints process directive for executor-specific scheduling hints#7034

Draft
pditommaso wants to merge 2 commits intomasterfrom
260414-hints-directive
Draft

Add hints process directive for executor-specific scheduling hints#7034
pditommaso wants to merge 2 commits intomasterfrom
260414-hints-directive

Conversation

@pditommaso
Copy link
Copy Markdown
Member

Summary

  • Introduce a new map-type hints process directive for executor-specific scheduling hints
  • Keys use [executor/][scope.]hintName format (e.g. seqera/machineRequirement.arch)
  • Multiple calls accumulate within a process; config overrides replace the entire map
  • Two-tier validation: warnings for unknown unprefixed keys, errors for unknown executor-prefixed keys
  • Initial Seqera Platform integration: 12 machineRequirement.* fields mapped to MachineRequirementOpts
  • Hints override Seqera config scope at the task level

Context

Follows the refined ADR proposal from #6960 (comment). Replaces fragile clusterOptions and overloaded ext/resourceLabels workarounds.

Ref: #5917, #6960

Test plan

  • ProcessBuilderTest — hints registration, accumulation, duplicate key overwrite, closure storage
  • TaskConfigTestgetHints() retrieval, empty map default, config override replacement
  • HintDefsTest — global registry validation, fuzzy "did you mean?" matching, value type validation
  • HintHelperTest — all 12 machineRequirement.* field mappings, overlay precedence, unknown key error, non-seqera hint ignoring
  • Smoke tests pass (NXF_SMOKE=1 ./gradlew :nextflow:test)

🤖 Generated with Claude Code

pditommaso and others added 2 commits April 14, 2026 23:48
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Introduce a new map-type `hints` process directive that provides a
structured, extensible way for pipeline authors to pass executor-specific
scheduling hints. Keys use `[executor/][scope.]hintName` format.

Core features:
- Multiple `hints` calls within a process body accumulate (merge)
- Config overrides via withName:/withLabel: replace the entire map
- Values support String, Integer, and Closure types
- Two-tier validation: warnings for unknown unprefixed keys (global
  registry), errors for unknown executor-prefixed keys
- Initial global catalog contains only `consumableResource`

Seqera Platform integration:
- `seqera/machineRequirement.*` hints map to MachineRequirementOpts
  fields (arch, provisioning, maxSpotAttempts, machineTypes, diskType,
  diskThroughputMiBps, diskIops, diskEncrypted, diskAllocation,
  diskMountPath, diskSize, capacityMode)
- Hints override Seqera config scope values at the task level
- Unknown `seqera/` keys produce an error

Ref: #5917, #6960

Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 14, 2026

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit a6093f7
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/69dec2885aa5820007fe7ef9

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.

1 participant