Skip to content

Add resourceAllocation field to trace record#6973

Draft
pditommaso wants to merge 2 commits intomasterfrom
add-resource-allocation-trace-field
Draft

Add resourceAllocation field to trace record#6973
pditommaso wants to merge 2 commits intomasterfrom
add-resource-allocation-trace-field

Conversation

@pditommaso
Copy link
Copy Markdown
Member

Summary

  • Add resourceAllocation transient field to TraceRecord exposing scheduler-allocated resources (cpuShares, memoryMiB, accelerators, time)
  • Source the value from the last TaskAttempt.resources, falling back to TaskState.resourceAllocation when no attempts exist
  • Forward the field through TowerClient to the platform
  • Bump sched-client to 0.46.0-SNAPSHOT (renames TaskState.resourceRequirementresourceAllocation)

Test plan

  • Unit tests for getResourceAllocation() in SeqeraTaskHandlerTest (null state, single attempt, multiple attempts, fallback scenarios)
  • Unit test for resourceAllocation propagation in TowerClientTest.makeTasksReq()
  • Existing trace metadata test updated to verify resourceAllocation included in trace record

🤖 Generated with Claude Code

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>
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 25, 2026

Deploy Preview for nextflow-docs-staging canceled.

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

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>
@pditommaso
Copy link
Copy Markdown
Member Author

@bentsherman have a look at this. I think we can remove accelerator for "classic" trace and only keep as platform trace via resourceAllocation

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