mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
After ``setup_shed_config`` blanks ``shed_tool_conf.xml``, the toolbox reload that follows would otherwise inherit stale shed-tool ``ToolIndexEntry`` rows: the populator-driven cold-start check only re-runs when discovery finds a *new* path, not when it finds *fewer* than the index already has. Calling ``galaxy.tool_source_store.populator.reconcile_index`` between the conf rewrite and the ``reload_toolbox`` broadcast prunes those orphans. The next boot reads a clean index that matches the empty shed conf; integration tests that depend on ``reset_shed_tools`` leaving zero shed entries (``test_repository_*``) get the contract they want. Wrapped in try/except so a missing populator dependency in a stripped- down test environment doesn't break the rest of the reset path. Adds a module-level logger.