Commit 3ac9a4a
committed
LazyToolBox: fall back to default Tool on exact-version miss
The lazy ``get_tool`` returned ``None`` when an indexed tool was
queried at a version not present in ``entries_by_version`` and
``exact=True``. The eager toolbox in that situation falls through to
the lineage path and returns ``rval[-1]`` (the latest available
version), regardless of ``exact`` — its loop only ``continue``s on
``exact`` when the tool *id* is unknown, not when the version is
missing.
This difference broke ``ToolModule.__init__`` during workflow upload
for any workflow pinned to a tool_version we no longer ship. The
eager flow returned the newest Tool, then
``get_safe_version`` downgraded it to a registered safe-upgrade
version (e.g. ``__BUILD_LIST__`` 1.0.0 → 1.1.0 via
``WORKFLOW_SAFE_TOOL_VERSION_UPDATES``). The lazy flow got ``None``,
left the step bound to the latest tool, and on invocation the
state-vs-tool mismatch raised "Workflow step has upgrade messages".
Surfaced by API ``test_run_with_int_parameter_nested`` against
build_list 1.0.0; would similarly affect any workflow whose
``WORKFLOW_SAFE_TOOL_VERSION_UPDATES`` entry has a current_version
below the latest indexed version.1 parent 8fdd0ab commit 3ac9a4a
1 file changed
Lines changed: 18 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1379 | 1379 | | |
1380 | 1380 | | |
1381 | 1381 | | |
1382 | | - | |
1383 | | - | |
1384 | | - | |
1385 | | - | |
1386 | | - | |
1387 | | - | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
1392 | 1400 | | |
1393 | 1401 | | |
1394 | 1402 | | |
| |||
0 commit comments