Add resourceAllocation field to trace record#6973
Open
pditommaso wants to merge 3 commits intomasterfrom
Open
Conversation
Expose scheduler-allocated resources (cpuShares, memoryMiB, accelerators, time) in the trace record. The value is taken from the last TaskAttempt's resources, falling back to the TaskState's resourceAllocation if no attempts exist. Also bump sched-client to 0.46.0-SNAPSHOT which renames TaskState.resourceRequirement to resourceAllocation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
This reverts commit 00f35b3. The accelerator and accelerator_type fields in the trace record are superseded by the resourceAllocation field which carries the actual scheduler-allocated resources including accelerator info. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Member
Author
|
@bentsherman have a look at this. I think we can remove accelerator for "classic" trace and only keep as platform trace via |
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
bentsherman
reviewed
Mar 30, 2026
| transient private ContainerMeta containerMeta | ||
| transient private Integer numSpotInterruptions | ||
| transient private String logStreamId | ||
| transient private Map<String,Object> resourceAllocation |
Member
There was a problem hiding this comment.
not blocking, but the naming is a bit awkward. how about resourcesAllocated ?
bentsherman
reviewed
Mar 30, 2026
Comment on lines
-107
to
-108
| accelerator: 'num', | ||
| accelerator_type: 'str' |
Member
There was a problem hiding this comment.
These fields denoted the requested accelerators. Now that you are moving them into the allocated resources, will they denote the accelerators allocated by sched?
bentsherman
reviewed
Mar 30, 2026
| def handler = createHandler() | ||
| handler.cachedTaskState = new SchedTaskState() | ||
| .resourceRequirement(new ResourceRequirement().time('2h')) | ||
| .resourceAllocation(new ResourceRequirement().time('2h')) |
Member
There was a problem hiding this comment.
Should ResourceRequirement be renamed to something like ResourceRequest ? Seems like here it is being used to model things other than hard requirements
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
resourceAllocationtransient field toTraceRecordexposing scheduler-allocated resources (cpuShares, memoryMiB, accelerators, time)TaskAttempt.resources, falling back toTaskState.resourceAllocationwhen no attempts existTowerClientto the platformTaskState.resourceRequirement→resourceAllocation)Test plan
getResourceAllocation()inSeqeraTaskHandlerTest(null state, single attempt, multiple attempts, fallback scenarios)resourceAllocationpropagation inTowerClientTest.makeTasksReq()resourceAllocationincluded in trace record🤖 Generated with Claude Code