Skip to content

[26.0] AttributeError when history is None during tool execution#22031

Merged
jmchilton merged 1 commit intogalaxyproject:release_26.0from
mvdbeek:fix_22018_history_none_tool_execution
Mar 12, 2026
Merged

[26.0] AttributeError when history is None during tool execution#22031
jmchilton merged 1 commit intogalaxyproject:release_26.0from
mvdbeek:fix_22018_history_none_tool_execution

Conversation

@mvdbeek
Copy link
Copy Markdown
Member

@mvdbeek mvdbeek commented Mar 10, 2026

When executing tools via the API without a history_id and no active session history, the history variable is None, causing a crash at history.add_pending_items(). This raises a clear error early in the service layer and adds a defensive guard in execute.py.

Fixes #22018

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.

When executing tools via the API without a history_id and no active
session history, the history variable is None, causing a crash at
history.add_pending_items(). This raises a clear error early in the
service layer and adds a defensive guard in execute.py.

Fixes galaxyproject#22018
@jmchilton
Copy link
Copy Markdown
Member

FAILED lib/galaxy_test/api/test_tools_upload.py::TestToolsUpload::test_abort_fetch_job - AssertionError: assert 'error' == 'discarded'

I'm assuming this can't be related - but I don't recall ever seeing it fail before. I'll rerun that test.

@mvdbeek
Copy link
Copy Markdown
Member Author

mvdbeek commented Mar 10, 2026

FAILED lib/galaxy_test/api/test_tools_upload.py::TestToolsUpload::test_abort_fetch_job - AssertionError: assert 'error' == 'discarded'

I'm assuming this can't be related - but I don't recall ever seeing it fail before. I'll rerun that test.

httpstat.us down / unreachable etc. I think you fixes this on the dev branch ?

@mvdbeek mvdbeek requested a review from jmchilton March 12, 2026 13:27
@jmchilton jmchilton merged commit 8935fbc into galaxyproject:release_26.0 Mar 12, 2026
51 of 62 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in Galaxy Dev - weeklies Mar 12, 2026
@ahmedhamidawan ahmedhamidawan modified the milestones: 26.1, 26.0 Mar 16, 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