Add ResourcesResolver for pre-flight resource optimization#6873
Draft
pditommaso wants to merge 1 commit intomasterfrom
Draft
Add ResourcesResolver for pre-flight resource optimization#6873pditommaso wants to merge 1 commit intomasterfrom
pditommaso wants to merge 1 commit intomasterfrom
Conversation
…i skip] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
ce9e7ef to
2205c1a
Compare
✅ Deploy Preview for nextflow-docs-staging canceled.
|
d9fa5cd to
d752bc2
Compare
bentsherman
reviewed
Mar 2, 2026
|
|
||
| `TaskProcessor.submitTask()` — after hash computation, before `executor.submit()`. This means: | ||
|
|
||
| - The cache hash reflects **declared** (original) resources, not optimized ones — caching stays deterministic based on user intent. |
Member
There was a problem hiding this comment.
This point is moot because resource requests aren't included in the task hash anyway
bentsherman
reviewed
Mar 2, 2026
| - container image | ||
| - process name | ||
| - attempt number | ||
| - task index |
Member
There was a problem hiding this comment.
Is this the within-process index or within-run index? Not sure that it's relevant either way
Member
Author
There was a problem hiding this comment.
Within run, but not really needed
bentsherman
reviewed
Mar 2, 2026
| - machineType | ||
| - resourceLimits (upper bounds) | ||
| - container image | ||
| - process name |
Member
There was a problem hiding this comment.
Base name or fully-qualified name? I assume it should be the base name
Member
Author
There was a problem hiding this comment.
Actually right now it's using FQ name, however I agree it should not
bentsherman
reviewed
Mar 2, 2026
| - process name | ||
| - attempt number | ||
| - task index | ||
| - input files total size in bytes |
Member
There was a problem hiding this comment.
Since this request is in-memory, I would just pass the raw data e.g. list of file names with sizes, or a map based on the process input names
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
ResourcesResolverextension point that allows a scheduler optimization engine to dynamically adjust task resource allocation (cpus, memory, time, disk) before executionContainerResolverplugin pattern: interface in core, no-op default, overridden by nf-seqera pluginTaskProcessor.submitTask()after hash computation, beforeexecutor.submit()TaskConfig, preserving original declared valuesTest plan
TaskConfigoverrides map with testsTaskProcessor.submitTask()SeqeraResourcesResolverin nf-seqera plugin🤖 Generated with Claude Code