emozilla
45c24f319f
fix(dashboard): late-bound helpers wait for a module another thread is importing
...
web_deps' late() and LateState() looked their module up in sys.modules
and imported it only when it was absent. Python lists a module there as
soon as its import starts, so when two threads made the first call at
once, the second one got the module the first was still importing and
failed with "partially initialized module ... has no attribute ...
(most likely due to a circular import)". Router helpers run outside the
dashboard app too: a plugin host that calls config_env.get_env_vars
from worker threads without importing hermes_cli.web_server answered
one of two concurrent first requests with a 500.
_server() now always calls importlib.import_module. It returns a loaded
module straight from sys.modules and waits on the module's import lock
while another thread is still importing it. On the importing thread
itself (a real circular import) it still returns the partial module, as
a plain import does.
The same lookup also ran in GatewayDashboardMount.ensure(), before its
off-loop import of hermes_cli.web_server, and in the config backend
selection (_backend_for); both now go through import_module as well.
tests/held_import.py holds a module's import open on a helper thread
and runs a caller during it, releasing once the caller has returned or
is waiting for that import, so the new tests fail deterministically on
the old lookup without fixed sleeps.
2026-11-19 18:12:39 -05:00
..
2026-11-14 13:24:26 +01:00
2026-11-17 19:10:58 +01:00
2026-11-19 02:35:54 -06:00
2026-11-18 03:40:34 -08:00
2026-11-16 10:29:52 -08:00
2026-11-19 14:30:30 +01:00
2026-11-12 23:36:59 -06:00
2026-11-14 01:03:00 -08:00
2026-11-13 16:42:15 -08:00
2026-11-14 13:22:36 +01:00
2026-11-13 18:45:31 +00:00
2026-11-16 10:12:09 -08:00
2026-11-13 18:45:31 +00:00
2026-11-13 16:54:40 +01:00
2026-11-18 09:36:27 -08:00
2026-11-19 11:00:21 -08:00
2026-11-14 12:04:53 +01:00
2026-11-19 12:35:40 +01:00
2026-11-14 20:51:51 +01:00
2026-11-17 21:09:24 +01:00
2026-11-12 23:35:39 +01:00
2026-11-13 20:21:56 +01:00
2026-11-19 14:20:18 +01:00
2026-11-13 17:58:28 -05:00
2026-11-19 11:00:21 -08:00
2026-11-13 20:37:29 +01:00
2026-11-17 21:09:24 +01:00
2026-11-17 17:51:20 +01:00
2026-11-16 10:29:52 -08:00
2026-11-17 17:51:20 +01:00
2026-11-19 10:36:13 -08:00
2026-11-14 13:15:34 +01:00
2026-11-19 03:31:38 -08:00
2026-11-13 18:45:31 +00:00
2026-11-16 17:43:16 +05:30
2026-11-13 02:36:06 -08:00
2026-11-12 19:55:11 +01:00
2026-11-17 17:51:20 +01:00
2026-11-16 19:21:55 -06:00
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-15 08:20:26 +05:30
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-16 19:21:55 -06:00
2026-11-12 23:40:12 +05:30
2026-11-13 16:21:19 -08:00
2026-11-15 08:20:26 +05:30
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-16 15:23:37 +05:30
2026-11-14 02:52:41 -08:00
2026-11-18 03:40:34 -08:00
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-16 12:19:49 -08:00
2026-11-13 17:50:03 -08:00
2026-11-18 03:40:34 -08:00
2026-11-16 19:21:55 -06:00
2026-11-16 11:28:45 -08:00
2026-11-17 21:42:04 -06:00
2026-11-16 21:57:07 +05:30
2026-11-13 20:20:47 +01:00
2026-11-19 18:12:39 -05:00
2026-11-14 14:33:50 +01:00
2026-11-14 03:45:21 -08:00
2026-11-14 15:35:44 +01:00
2026-11-14 03:45:21 -08:00
2026-11-18 17:51:44 -08:00
2026-11-13 14:38:26 +01:00
2026-11-20 01:55:26 +05:30
2026-11-18 03:40:34 -08:00
2026-11-12 22:39:16 +05:30
2026-11-13 20:21:55 +01:00
2026-11-13 21:23:31 +01:00
2026-11-14 13:09:23 +01:00
2026-11-14 13:09:23 +01:00
2026-11-13 16:51:36 +01:00
2026-11-12 23:40:12 +05:30
2026-11-12 23:40:12 +05:30
2026-11-16 15:40:08 +05:30
2026-11-12 14:09:07 +05:30
2026-11-16 15:40:08 +05:30
2026-11-17 17:51:22 +01:00
2026-11-13 16:42:15 -08:00
2026-11-17 17:51:20 +01:00
2026-11-14 03:58:59 -08:00
2026-11-14 12:50:47 +01:00
2026-11-14 01:03:00 -08:00
2026-11-16 19:21:55 -06:00
2026-11-19 03:31:38 -08:00
2026-11-14 12:05:40 +01:00
2026-11-13 22:55:53 +01:00
2026-11-13 20:20:46 +01:00
2026-11-13 02:36:06 -08:00
2026-11-12 14:09:07 +05:30
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-16 21:57:49 +05:30
2026-11-17 07:20:56 -05:00
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-16 13:55:18 +05:30
2026-11-17 17:51:20 +01:00
2026-11-14 03:43:44 -08:00
2026-11-17 17:51:20 +01:00
2026-11-13 00:27:08 -08:00
2026-11-14 03:43:44 -08:00
2026-11-14 06:08:53 -08:00
2026-11-11 23:20:47 -08:00
2026-11-14 11:37:50 -08:00
2026-11-16 19:21:55 -06:00
2026-11-14 10:50:28 -05:00
2026-11-14 10:40:53 -05:00
2026-11-14 06:33:40 -08:00
2026-11-13 18:45:31 +00:00
2026-11-14 10:50:28 -05:00
2026-11-17 19:10:41 +01:00
2026-11-19 10:48:12 -08:00
2026-11-14 12:05:38 +01:00
2026-11-14 02:23:19 -08:00
2026-11-14 20:30:43 +01:00
2026-11-19 01:53:36 -08:00
2026-11-13 18:45:32 +00:00
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-19 03:31:38 -08:00
2026-11-14 16:16:34 +01:00
2026-11-17 17:51:20 +01:00
2026-11-14 02:38:28 -08:00
2026-11-12 21:12:00 +01:00
2026-11-17 17:51:20 +01:00
2026-11-13 16:51:37 +01:00
2026-11-17 17:51:20 +01:00
2026-11-11 22:44:52 -08:00
2026-11-13 16:51:36 +01:00
2026-11-14 03:44:36 -08:00
2026-11-17 17:51:20 +01:00
2026-11-14 17:16:29 +01:00
2026-11-17 17:51:20 +01:00
2026-11-14 06:08:53 -08:00
2026-11-13 17:49:25 -08:00
2026-11-14 03:44:36 -08:00
2026-11-16 13:56:35 +05:30
2026-11-17 17:51:20 +01:00
2026-11-13 18:45:31 +00:00
2026-11-17 17:51:22 +01:00
2026-11-13 18:45:31 +00:00
2026-11-14 01:03:00 -08:00
2026-11-13 14:40:35 +01:00
2026-11-16 21:58:16 +05:30
2026-11-17 17:51:20 +01:00
2026-11-14 01:24:46 +05:30
2026-11-14 01:03:00 -08:00
2026-11-19 10:48:12 -08:00
2026-11-14 17:07:12 +01:00
2026-11-14 01:03:00 -08:00
2026-11-13 18:45:31 +00:00
2026-11-14 17:07:10 +01:00
2026-11-12 14:09:07 +05:30
2026-11-14 21:03:31 +01:00
2026-11-13 12:58:14 +05:30
2026-11-13 20:21:54 +01:00
2026-11-13 20:34:31 +01:00
2026-11-13 20:21:54 +01:00
2026-11-14 02:38:28 -08:00
2026-11-13 20:21:55 +01:00
2026-11-19 03:27:23 -08:00
2026-11-17 21:42:04 -06:00
2026-11-14 03:42:26 -08:00
2026-11-17 21:42:04 -06:00
2026-11-15 08:20:26 +05:30
2026-11-19 11:00:21 -08:00
2026-11-16 15:40:08 +05:30
2026-11-14 01:03:00 -08:00
2026-11-14 01:03:00 -08:00
2026-11-14 01:03:00 -08:00
2026-11-14 13:22:36 +01:00
2026-11-17 17:51:20 +01:00
2026-11-13 19:23:34 +01:00
2026-11-13 15:30:30 -08:00
2026-11-14 12:46:07 +01:00
2026-11-17 11:27:30 -05:00
2026-11-13 18:45:32 +00:00
2026-11-13 18:45:31 +00:00
2026-11-13 18:45:31 +00:00
2026-11-13 20:47:04 +00:00
2026-11-13 15:30:30 -08:00
2026-11-13 20:47:04 +00:00
2026-11-19 10:54:52 -08:00
2026-11-17 06:41:24 +05:30
2026-11-14 05:45:02 +05:30
2026-11-14 05:45:02 +05:30
2026-11-13 15:30:30 -08:00
2026-11-13 15:30:30 -08:00
2026-11-17 06:41:24 +05:30
2026-11-12 22:23:28 +01:00
2026-11-17 06:41:24 +05:30
2026-11-14 05:45:02 +05:30
2026-11-15 01:22:06 +05:30
2026-11-17 06:41:24 +05:30
2026-11-13 15:30:30 -08:00
2026-11-13 15:30:30 -08:00
2026-11-17 06:41:24 +05:30
2026-11-17 06:41:24 +05:30
2026-11-13 01:44:01 -08:00
2026-11-13 15:30:30 -08:00
2026-11-15 14:02:40 +05:30
2026-11-12 22:23:28 +01:00
2026-11-15 01:22:06 +05:30
2026-11-14 05:45:02 +05:30
2026-11-14 14:33:50 +01:00
2026-11-13 17:48:43 -08:00
2026-11-17 17:51:22 +01:00
2026-11-13 12:58:14 +05:30
2026-11-12 17:16:33 +05:30
2026-11-13 02:36:06 -08:00
2026-11-13 14:30:56 +05:30
2026-11-13 17:48:43 -08:00
2026-11-19 21:02:08 +05:30
2026-11-14 13:22:36 +01:00
2026-11-17 17:51:20 +01:00
2026-11-14 01:03:00 -08:00
2026-11-13 20:21:55 +01:00
2026-11-19 14:20:19 +01:00
2026-11-15 01:58:38 +01:00
2026-11-14 13:22:36 +01:00
2026-11-16 18:09:07 +05:30
2026-11-14 02:37:48 -08:00
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:22 +01:00
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:20 +01:00
2026-11-17 17:51:22 +01:00
2026-11-17 17:51:22 +01:00
2026-11-17 17:51:20 +01:00
2026-11-19 10:48:12 -08:00
2026-11-16 15:40:08 +05:30
2026-11-19 10:48:12 -08:00
2026-11-13 16:54:40 +01:00
2026-11-16 17:43:16 +05:30
2026-11-13 18:16:09 +01:00
2026-11-17 17:51:20 +01:00
2026-11-18 08:52:55 -06:00
2026-11-16 10:12:09 -08:00
2026-11-17 17:51:20 +01:00
2026-11-13 00:47:59 +01:00
2026-11-17 17:51:20 +01:00
2026-11-16 17:43:16 +05:30
2026-11-17 17:51:20 +01:00
2026-11-14 13:15:34 +01:00
2026-11-13 20:46:29 +01:00
2026-11-16 21:57:49 +05:30
2026-11-17 17:51:22 +01:00
2026-11-11 22:40:06 -08:00
2026-11-14 16:16:33 +01:00
2026-11-12 22:39:07 +05:30
2026-11-14 02:23:19 -08:00
2026-11-14 02:23:19 -08:00
2026-11-14 02:23:19 -08:00
2026-11-14 01:11:55 -08:00
2026-11-14 17:07:29 +01:00
2026-11-17 17:51:20 +01:00
2026-11-14 02:23:19 -08:00
2026-11-14 02:23:19 -08:00
2026-11-14 01:11:55 -08:00
2026-11-14 02:23:19 -08:00
2026-11-12 22:23:28 +01:00
2026-11-17 17:51:20 +01:00
2026-11-13 23:49:02 -08:00
2026-11-14 02:23:19 -08:00
2026-11-13 23:49:02 -08:00
2026-11-14 01:11:55 -08:00
2026-11-14 02:23:19 -08:00
2026-11-11 22:40:06 -08:00
2026-11-13 18:45:33 +00:00
2026-11-13 18:45:31 +00:00
2026-11-19 18:12:39 -05:00
2026-11-12 19:29:02 -08:00
2026-11-16 10:29:52 -08:00
2026-11-17 17:51:20 +01:00
2026-11-14 05:44:33 +05:30
2026-11-16 17:43:16 +05:30
2026-11-12 15:56:31 -05:00
2026-11-15 02:14:14 +01:00
2026-11-13 16:51:55 +01:00
2026-11-17 17:51:20 +01:00
2026-11-16 21:57:07 +05:30
2026-11-14 17:11:29 +01:00
2026-11-17 17:51:20 +01:00
2026-11-18 15:12:51 +01:00
2026-11-13 18:45:31 +00:00
2026-11-17 17:51:20 +01:00
2026-11-16 13:56:35 +05:30
2026-11-12 14:16:57 -06:00
2026-11-14 03:49:07 -08:00
2026-11-19 10:48:12 -08:00
2026-11-17 17:51:22 +01:00
2026-11-11 22:10:25 -08:00
2026-11-13 17:51:19 -08:00
2026-11-13 17:48:43 -08:00