Don't configure the root logger when importing image_puller - #471
Merged
mr-c merged 1 commit intoSep 26, 2026
Merged
Conversation
cwl_utils.image_puller called logging.basicConfig(level=logging.INFO) at import time. Since cwltool 3.3 imports it from cwltool.singularity, any program that imports cwltool gets its root logger set to INFO with a stderr handler, so INFO messages from unrelated libraries start going to stderr. Configure logging in docker-extract's main() instead, so the CLI output is unchanged.
mvdbeek
added a commit
to galaxybot/galaxy
that referenced
this pull request
Sep 26, 2026
cwl_utils.image_puller calls logging.basicConfig(level=logging.INFO) at import time, and cwltool 3.3 imports it. Any Galaxy process that imports cwltool then logs INFO messages to stderr, which fails jobs whose tools treat stderr as an error, such as history export to a URI (gcsfs logs an INFO line when imported). With cwl-utils 0.44 excluded the resolver falls back to cwltool 3.2.20260720092025 and cwl-utils 0.43, as on dev. Upstream fix: common-workflow-language/cwl-utils#471
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #471 +/- ##
=======================================
Coverage 38.85% 38.86%
=======================================
Files 51 51
Lines 34718 34724 +6
Branches 8824 8824
=======================================
+ Hits 13489 13494 +5
- Misses 18331 18332 +1
Partials 2898 2898 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mr-c
approved these changes
Sep 26, 2026
Member
|
Thank you @mvdbeek ! |
Contributor
Author
|
Thanks for the quick merge! |
mvdbeek
added a commit
to galaxybot/galaxy
that referenced
this pull request
Sep 26, 2026
cwl-utils 0.45 includes the fix for the import-time logging.basicConfig() (common-workflow-language/cwl-utils#471), so the cwltool update can go ahead. The cwl-utils!=0.44 exclusion stays.
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.
cwl_utils.image_pullercallslogging.basicConfig(level=logging.INFO)at import time. cwltool 3.3.20260925135507 now imports it fromcwltool/singularity.py, so any program that imports cwltool has its root logger set to INFO with a stderr handler. INFO messages from unrelated libraries then go to stderr.In Galaxy this broke history exports. The export job imports cwltool indirectly, gcsfs then logs an INFO line at import, and Galaxy treats unexpected stderr from that job as a failure (galaxyproject/galaxy#23736).
This moves the
basicConfigcall intodocker-extract'smain(), so the CLI still prints the puller's INFO messages, and adds a test that importingcwl_utils.image_pullerleaves the root logger unconfigured. I checked that the test fails without the change.