mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-30 18:13:23 +08:00
docutils publishers are stateful and not thread-safe: all threads shared the
functools.cache'd Publisher, so concurrent /api/tools/{id}/build requests
corrupted each other's document state and raised. Tool.help_html swallowed the
exception and returned empty help, which is why the tools list intermittently
rendered cards without their help toggle
(test_tool_discovery_help_toggle_shows_and_hides, the most frequent flaky
selenium/playwright test on dev: 10 failed CI runs 07-06..07-18).
Guard publishing with a lock (results are memoized, so only first-time
conversions contend) and log the swallowed exception with a traceback. The new
concurrency test fails 3/3 without the lock.