Skip to content

[25.1] Fix loading non-tool files from watched tool directories#21880

Merged
jmchilton merged 1 commit intogalaxyproject:release_25.1from
mvdbeek:limit_quick_load
Feb 18, 2026
Merged

[25.1] Fix loading non-tool files from watched tool directories#21880
jmchilton merged 1 commit intogalaxyproject:release_25.1from
mvdbeek:limit_quick_load

Conversation

@mvdbeek
Copy link
Copy Markdown
Member

@mvdbeek mvdbeek commented Feb 18, 2026

The quick_load callback in __watch_directory is used both during the initial directory scan (where _looks_like_a_tool is checked beforehand) and as a callback for the ToolWatcher (where no such check occurs). When the watcher detects a file system event for any .xml file in a watched directory, it calls quick_load directly without verifying the file is actually a tool. This causes files like macros.xml to be loaded as tools and fail with "Missing tool 'id'" errors.

Add a _looks_like_a_tool guard inside quick_load itself so the check is always applied regardless of the caller.
Noticed in planemo CI.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

The quick_load callback in __watch_directory is used both during the
initial directory scan (where _looks_like_a_tool is checked beforehand)
and as a callback for the ToolWatcher (where no such check occurs).
When the watcher detects a file system event for any .xml file in a
watched directory, it calls quick_load directly without verifying the
file is actually a tool. This causes files like macros.xml to be loaded
as tools and fail with "Missing tool 'id'" errors.

Add a _looks_like_a_tool guard inside quick_load itself so the check
is always applied regardless of the caller.
@github-actions github-actions Bot added this to the 26.1 milestone Feb 18, 2026
@jmchilton jmchilton merged commit 32e3371 into galaxyproject:release_25.1 Feb 18, 2026
50 of 54 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in Galaxy Dev - weeklies Feb 18, 2026
@ahmedhamidawan ahmedhamidawan modified the milestones: 26.1, 26.0 Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants