Commit 8e3897a
committed
LazyLineageMap: always derive versions from the index
LazyLineageMap.get short-circuited on the parent's ``super().get()``
fallback, which builds the lineage from a single ``Tool`` object's
version via ``ToolLineage.from_tool`` and memoises it. With a tool
that has multiple indexed versions (e.g. ``__BUILD_LIST__`` 1.1.0 +
1.2.0), only the just-lazily-loaded version landed in
``tool.lineage.tool_versions``.
That broke ``get_safe_version`` at workflow upload:
``WORKFLOW_SAFE_TOOL_VERSION_UPDATES["__BUILD_LIST__"]`` allows
1.0.0 → 1.1.0 but not 1.0.0 → 1.2.0; the safe-version walk over the
truncated ``[1.2.0]`` lineage couldn't find a match, so
``ToolModule.__init__`` set ``self.tool = None``. The workflow ended
up bound to the latest tool with state shaped for the requested old
version, which then raised "Workflow step has upgrade messages" on
invoke. Reproduced by API
``test_run_with_int_parameter_nested``.
Fix: when the index has versions for the tool_id, always extend the
lineage from the index — don't let the parent's single-Tool fallback
freeze the version set.1 parent 3ac9a4a commit 8e3897a
1 file changed
Lines changed: 32 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
115 | 123 | | |
116 | 124 | | |
117 | 125 | | |
0 commit comments