Propagate enable_profiling through ProcessedContainerSettings#483
Open
jhiemstrawisc wants to merge 1 commit into
Open
Propagate enable_profiling through ProcessedContainerSettings#483jhiemstrawisc wants to merge 1 commit into
jhiemstrawisc wants to merge 1 commit into
Conversation
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.
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.
ProcessedContainerSettings.from_container_settings()rebuilds the processed container settings from the rawContainerSettings, but it never copied theenable_profilingfield, 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'scontainers.enable_profilingconfig value.This regressed in #390, which moved
enable_profilingfrom a top-level config field to the nested container settings and added the field to bothContainerSettingsandProcessedContainerSettings, but missed wiring it through the conversion infrom_container_settings().Add the missing assignment, plus a regression test asserting that
enable_profilingsurvives the full config-parsing path.