18 Commits
Author SHA1 Message Date
John ChiltonandClaude Opus 5.5 6b0ef8dae9 Run the workflow-safe update for steps pinned to a superseded tool version
A stored step at a version no longer installed, e.g. __BUILD_LIST__ 1.0.0
with 1.1.0 and 1.2.0 installed, now invokes under
require_exact_tool_versions and runs 1.1.0, the newest version in its
WORKFLOW_SAFE_TOOL_VERSION_UPDATES range.

- The exact-version pre-flight accepts the safe update when the pinned
  version misses.
- ToolModule swaps to the safe update for non-exact loads too. Stored steps
  load non-exact at invocation, so they ran the newest version (1.2.0) even
  though the run form treated the step as a safe upgrade.
- ToolModule.execute looks up the version the module resolved, not the
  stored one, so its inputs match the module's state.

get_safe_version_tool backs both lookups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 09:14:08 +01:00
mvdbeek d09d825877 Name the version a versioned guid points at in the missing tools error
A step with tool id .../compose_text_param/0.1.1 and tool_version 0.1.0
was reported as "(version 0.1.0, installed: 0.1.0, 0.1.1)" when both
versions are installed, which reads as if 0.1.0 were installed and
missing at once. When the requested version is installed under the same
versionless guid, the error now says the tool id names another version:
"(version 0.1.0, but the tool id names version 0.1.1)".
2026-11-10 18:14:46 +01:00
mvdbeek e6c5fbacba Require the named version for exact-version workflow tool lookups
get_tool(exact=True) means exact tool id. On the eager toolbox a
versioned guid pinned to a version that isn't installed still resolved
to the newest installed version through lineage, so the invocation
pre-flight passed and the workflow ran another version. The cached
toolbox rejected the same step.

get_tool_at_version now also requires that the step's id names the tool
it found: the tool's id, its short id or its versionless guid. A
versioned guid names only its own version, the rule ToolsService applies
to exact lookups on dev. The pre-flight uses it as the only lookup for
exact steps that give a version, and ToolModule keeps another version
only for the workflow-safe update check.
2026-11-10 18:14:46 +01:00
John ChiltonandClaude Opus 5.5 f4c31cf365 Name installed versions when an exact-version workflow tool is missing
When require_exact_tool_versions rejects a step, the 400 said the tool was
"not installed" even when other versions of it were. Append the versions
installed under that id, e.g. "compose_text_param (version 0.0.1, installed:
0.1.0)", so a version mismatch is not mistaken for a missing tool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 18:14:46 +01:00
John ChiltonandClaude Opus 5.5 8c4e7457e1 Accept unversioned shed tool ids for exact-version workflow invocation
The invocation pre-flight passed require_exact_tool_versions as the toolbox's
exact argument, which means exact tool id. A step naming a Tool Shed tool by
its unversioned guid (or short id) plus tool_version missed the lookup, so API
invocations reported installed tools as "not installed". Saving missed the
same way, so updating such a workflow was refused for missing tools.

Add ToolBox.get_tool_at_version, which resolves an id through lineage but only
at the requested version, and fall back to it in the pre-flight and in
ToolModule.__init__ when the exact-id lookup misses. Version mismatches are
still reported as missing.

Fixes #24722

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 18:14:46 +01:00
John ChiltonandClaude Opus 5.5 55bc640810 Baseline tests for unversioned shed tool ids in workflow invocation
Pin the toolbox's exact-id lookup semantics and the invocation pre-flight's
current handling of an unversioned Tool Shed tool_id: non-exact invocation
works, and an exact request for a version that isn't installed is rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 18:14:46 +01:00
mvdbeek fc7e9ebaf9 Address cached toolbox review feedback 2026-07-28 17:29:08 +02:00
guerler 5707f62012 Add workflow invocation test 2026-06-02 18:02:48 +03:00
mvdbeek 8c8de0b096 Add test for workflow scheduling with unresolved 'auto' extension collection
Test that a workflow with a collection input whose datasets have ext='auto'
delays scheduling and succeeds once extensions are resolved.

Related to galaxyproject/galaxy#22261
2026-03-30 15:51:59 +02:00
Nicola Soranzo 17003e8d00 Apply 2026 black style 2026-01-20 10:25:45 +00:00
mvdbeek 1dce8cf75b Add test for keeping picked dataset's extension in place 2024-09-10 18:50:12 +02:00
mvdbeek 71f0e49659 Test that optional data to bool coercion works 2024-02-19 10:33:20 +01:00
Nicola Soranzo c35d8f2a06 Replace `unittest.TestCase` with pytest-based partial re-implementation
Also:
- Rename `FooBarTestCase` test classes as `TestFooBar`. These were collected
  by pytest only because they were `unittest.TestCase` derived, but normally
  pytest collects only test classes whose name starts with `Test`, see
  https://docs.pytest.org/en/7.1.x/reference/reference.html#confval-python_classes
2022-09-27 03:34:58 +01:00
Nicola Soranzo b5c7e2c86a Replace `self.assert* method calls with plain asserts in test/`
using https://github.com/pytest-dev/unittest2pytest with the following command:

```
unittest2pytest -f self_assert -w -n test/
```

(excluding ``self.assertRaises*`` method calls).
2022-09-21 23:50:05 +01:00
John Chilton 1edee72ce2 Rework uses_shed... 2022-07-05 13:43:04 +01:00
Nicola Soranzo 7466ab89a6 Move `uses_shed.py to galaxy_test.driver`
to break circular dependency between galaxy-test-base and
galaxy-test-driver packages.

Also:
- Use f-string.
2022-06-28 18:33:05 +01:00
John Chilton 18891f3791 More structured and typed workflow test helpers. 2022-03-31 17:22:46 -04:00
Simon Bray 865a3b915e add integration test for invoking workflows with nonexistent tool_ids or tool_versions 2022-02-10 11:30:36 +01:00