Files
galaxy/lib
mvdbeek 9a12b3aaed remove_tool_by_id: purge every spelling the tool resolves under
test_repository_uninstall kept resurrecting the tool after all
index-level fixes. Local repro + probes showed removal completed on the
right toolbox but two in-memory paths still served the tool:

- The materialise LRU is keyed by whatever id the caller resolved with,
  so the same tool sits under both its guid and its short id; the
  guid-prefix purge left the short-id entry behind. Purge by cached
  tool identity instead.
- _tools_by_old_id is keyed by old_id — the SHORT id for a shed guid —
  and super().remove_tool_by_id deletes from it by object identity
  only, which misses when the bucket holds an earlier registration
  (stub or materialised instance) than _tools_by_id. The leftover
  resurfaced through the eager get_tool fall-through. Scrub every
  object belonging to the removed guid; sibling installs sharing the
  short id survive.

Verified locally: the full TestRepositoryInstallIntegrationTestCase
passes 3/3 consecutive lazy runs (install, uninstall, update).
2026-07-28 17:27:25 +02:00
..
2026-07-22 08:11:31 +03:00