Skip to content

Propagate enable_profiling through ProcessedContainerSettings#483

Open
jhiemstrawisc wants to merge 1 commit into
Reed-CompBio:mainfrom
jhiemstrawisc:fix-profiling
Open

Propagate enable_profiling through ProcessedContainerSettings#483
jhiemstrawisc wants to merge 1 commit into
Reed-CompBio:mainfrom
jhiemstrawisc:fix-profiling

Conversation

@jhiemstrawisc

Copy link
Copy Markdown
Collaborator

ProcessedContainerSettings.from_container_settings() rebuilds the processed container settings from the raw ContainerSettings, but it never copied the enable_profiling field, so the processed settings always used the dataclass default of False. run_container_singularity() reads the flag off the processed settings (config.enable_profiling), so the profiling branch never ran: no peer cgroup was created, cgroup_wrapper.sh never executed, and no usage-profile.tsv was written, regardless of the user's containers.enable_profiling config value.

This regressed in #390, which moved enable_profiling from a top-level config field to the nested container settings and added the field to both ContainerSettings and ProcessedContainerSettings, but missed wiring it through the conversion in from_container_settings().

Add the missing assignment, plus a regression test asserting that enable_profiling survives the full config-parsing path.

ProcessedContainerSettings.from_container_settings() rebuilds the processed
container settings from the raw ContainerSettings, but it never copied the
enable_profiling field, so the processed settings always used the dataclass
default of False. run_container_singularity() reads the flag off the processed
settings (config.enable_profiling), so the profiling branch never ran: no peer
cgroup was created, cgroup_wrapper.sh never executed, and no usage-profile.tsv
was written, regardless of the user's containers.enable_profiling config value.

This regressed in Reed-CompBio#390, which moved enable_profiling from a top-level config
field to the nested container settings and added the field to both
ContainerSettings and ProcessedContainerSettings, but missed wiring it through
the conversion in from_container_settings().

Add the missing assignment, plus a regression test in test_config.py asserting
that enable_profiling survives the full config-parsing path.
@jhiemstrawisc jhiemstrawisc requested review from agitter and ntalluri June 8, 2026 21:46
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