Ben Barclay
04d620d91f
fix(docker): run config migrations during container boot (salvage #35508 ) ( #36627 )
...
Salvage of #35508 (@dchenk), rebased onto current main. Resolved the
tests/tools/test_stage2_hook_puid_pgid.py conflict (kept both the
envdir-creation regression test on main and the new config-migration
tests).
Docker image upgrades replace code under $INSTALL_DIR but preserve
$HERMES_HOME on the mounted volume, so the persisted config.yaml never
received the schema migrations that non-Docker `hermes update` runs
(#35406 ). This adds scripts/docker_config_migrate.py, invoked from
stage2-hook after first-boot seeding and before gateway services start:
it backs up config.yaml + .env, runs migrate_config(interactive=False),
and honors HERMES_SKIP_CONFIG_MIGRATION=1 for manual control.
Also fixes a latent bug in check_config_version(): it called load_config()
which deep-merges DEFAULT_CONFIG, so a legacy config with no raw
_config_version falsely reported as already-current. It now reads the raw
on-disk file so legacy configs are correctly detected for migration.
Differs from #35508 as submitted (Option B cleanup): dropped the
`_config_version` line added to cli-config.yaml.example and removed the
accompanying test_cli_config_example_declares_latest_version change-detector
test. The example is a copy-template and has no business asserting a schema
version; check_config_version() reads the user's real config.yaml, not the
example. This removes a second sync point that drifts on every version bump.
Closes #35508 . Fixes #35406 .
Co-authored-by: Dmitriy Cherchenko <17372886+dchenk@users.noreply.github.com >
2026-06-04 11:11:27 +10:00
..
2026-02-26 03:20:08 +03:00
2026-05-27 02:12:27 -07:00
2026-05-19 11:10:51 -07:00
2026-05-28 22:26:25 -07:00
2026-05-25 01:20:33 -07:00
2026-04-07 17:19:07 -07:00
2026-05-28 22:26:25 -07:00
2026-04-26 05:43:31 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 00:43:32 -07:00
2026-05-28 22:26:25 -07:00
2026-04-21 14:31:48 -05:00
2026-06-01 09:57:10 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-02 12:19:44 -05:00
2026-05-28 22:26:25 -07:00
2026-05-28 05:47:30 -07:00
2026-05-29 02:24:48 -07:00
2026-05-27 09:38:58 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-24 03:00:33 -07:00
2026-05-08 14:27:40 -07:00
2026-05-24 04:25:32 -07:00
2026-05-19 14:51:21 -07:00
2026-05-18 20:01:34 -07:00
2026-05-18 10:14:38 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 13:22:54 -07:00
2026-05-28 15:14:05 +10:00
2026-05-15 14:45:43 -07:00
2026-05-28 22:26:25 -07:00
2026-06-03 05:41:13 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 15:14:05 +10:00
2026-05-28 22:26:25 -07:00
2026-04-09 16:24:53 -07:00
2026-04-29 23:18:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-25 01:20:33 -07:00
2026-05-28 15:50:25 +10:00
2026-06-02 20:29:54 -04:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 12:16:15 -07:00
2026-05-28 22:26:25 -07:00
2026-05-17 02:29:41 -07:00
2026-05-28 22:26:25 -07:00
2026-05-13 09:34:15 -07:00
2026-04-21 14:23:45 -07:00
2026-05-28 22:26:25 -07:00
2026-04-17 19:03:26 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 11:11:27 +10:00
2026-04-29 23:18:55 -07:00
2026-06-01 11:28:56 +10:00
2026-05-28 22:26:25 -07:00
2026-04-28 01:18:09 -07:00
2026-04-24 05:09:08 -07:00
2026-05-29 23:45:05 -07:00
2026-04-24 05:09:08 -07:00
2026-05-18 17:39:50 +00:00
2026-05-28 22:26:25 -07:00
2026-05-09 18:43:40 -07:00
2026-05-07 05:27:47 -07:00
2026-05-07 05:27:47 -07:00
2026-05-31 13:59:56 +05:30
2026-05-28 22:26:25 -07:00
2026-06-01 16:58:58 -07:00
2026-06-01 16:58:58 -07:00
2026-04-25 18:47:53 -07:00
2026-05-31 03:19:37 -07:00
2026-06-03 05:57:15 -07:00
2026-06-02 21:16:41 +10:00
2026-05-27 02:12:27 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 02:12:27 -07:00
2026-05-29 12:17:12 +10:00
2026-05-27 02:12:27 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 02:12:27 -07:00
2026-05-29 12:17:12 +10:00
2026-05-27 02:12:27 -07:00
2026-06-02 23:43:27 -07:00
2026-06-02 23:43:27 -07:00
2026-04-30 06:43:22 -04:00
2026-05-28 22:26:25 -07:00
2026-05-12 13:59:22 -04:00
2026-06-03 05:41:35 -07:00
2026-06-02 20:49:44 -05:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 11:04:46 -07:00
2026-04-20 22:14:29 -07:00
2026-04-20 22:14:29 -07:00
2026-04-17 05:08:07 -07:00
2026-05-03 03:25:45 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 13:36:33 -07:00
2026-06-03 06:38:40 -07:00
2026-05-28 15:14:05 +10:00
2026-06-01 13:27:30 +10:00
2026-05-13 18:40:14 -07:00
2026-05-28 22:26:25 -07:00
2026-05-04 15:31:15 -04:00
2026-05-28 22:26:25 -07:00
2026-04-09 16:24:53 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 17:54:17 -07:00
2026-05-30 23:05:56 -07:00
2026-03-14 12:11:23 -07:00
2026-06-02 11:59:27 +10:00
2026-05-28 22:26:25 -07:00
2026-05-29 12:36:59 -07:00
2026-06-03 09:29:19 -07:00
2026-05-28 22:26:25 -07:00
2026-05-31 17:46:56 -05:00
2026-04-24 04:46:17 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 23:45:05 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 01:23:06 -07:00
2026-06-02 20:30:13 -04:00
2026-05-28 22:26:25 -07:00
2026-04-29 20:33:29 -07:00
2026-05-28 00:19:31 -07:00
2026-05-21 19:17:45 -07:00
2026-05-31 17:46:56 -05:00
2026-05-28 22:26:25 -07:00
2026-05-30 01:40:57 -07:00
2026-05-18 20:17:10 -07:00
2026-05-28 21:00:46 -07:00
2026-05-18 21:33:08 -07:00
2026-05-28 22:26:25 -07:00
2026-05-30 01:40:49 -07:00
2026-06-03 06:19:32 -07:00
2026-06-01 20:26:57 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 19:02:55 -07:00
2026-05-18 20:47:01 -07:00
2026-05-31 01:16:33 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 19:02:55 -07:00
2026-05-23 23:10:36 -07:00
2026-05-07 13:04:41 -07:00
2026-05-07 13:04:41 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 17:50:42 -07:00
2026-03-29 21:54:36 -07:00
2026-05-06 03:50:59 -07:00
2026-05-31 17:46:56 -05:00
2026-05-19 01:28:32 -07:00
2026-06-02 20:29:54 -04:00
2026-05-07 05:17:03 -07:00
2026-05-28 22:26:25 -07:00
2026-06-03 17:49:39 -07:00
2026-05-28 22:26:25 -07:00
2026-05-30 07:45:26 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 22:29:48 -07:00
2026-05-20 09:18:23 -07:00
2026-05-31 17:46:56 -05:00
2026-05-28 22:26:25 -07:00
2026-04-17 06:33:21 -07:00
2026-05-31 03:19:37 -07:00
2026-04-25 18:47:53 -07:00
2026-04-16 01:16:14 -07:00
2026-05-29 12:32:35 -07:00
2026-04-24 04:58:46 -07:00
2026-04-08 19:58:16 -07:00
2026-05-29 23:45:05 -07:00
2026-05-28 22:26:25 -07:00
2026-05-30 20:57:01 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 00:19:31 -07:00
2026-05-13 18:40:14 -07:00
2026-04-13 04:33:52 -07:00
2026-05-29 02:24:48 -07:00
2026-06-01 06:32:48 +05:30
2026-05-28 22:26:25 -07:00
2026-05-29 23:45:05 -07:00
2026-05-09 23:17:25 -07:00
2026-06-02 06:31:37 -07:00
2026-05-06 09:08:33 -07:00
2026-05-17 02:29:41 -07:00
2026-04-21 05:19:43 -07:00
2026-05-28 22:26:25 -07:00
2026-03-16 06:07:45 -07:00
2026-05-05 04:37:47 -07:00
2026-05-30 00:22:46 -07:00
2026-03-14 10:35:14 -07:00
2026-05-23 17:49:47 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 00:59:42 -07:00
2026-05-31 17:46:56 -05:00
2026-05-25 01:41:19 -07:00
2026-05-24 18:04:54 -07:00
2026-06-03 06:36:46 -07:00
2026-06-04 02:33:33 +05:30
2026-05-09 13:02:25 -07:00
2026-05-17 13:54:12 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-24 18:07:47 -07:00
2026-05-29 22:29:48 -07:00
2026-05-28 22:26:25 -07:00
2026-05-25 01:20:33 -07:00
2026-05-30 02:53:42 -07:00
2026-05-28 22:26:25 -07:00
2026-05-31 15:02:26 -07:00
2026-05-29 02:24:48 -07:00
2026-05-28 02:36:09 -07:00
2026-06-03 09:00:16 -07:00
2026-05-31 03:19:37 -07:00
2026-05-07 05:10:33 -07:00
2026-05-28 22:26:25 -07:00
2026-05-08 14:27:40 -07:00
2026-04-27 08:52:12 -07:00
2026-05-28 03:34:47 -07:00
2026-05-29 12:32:35 -07:00
2026-05-25 01:20:33 -07:00
2026-05-12 01:02:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-10 13:06:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-26 18:31:07 -07:00
2026-05-28 22:26:25 -07:00
2026-05-02 02:08:06 -07:00
2026-05-15 10:36:38 +05:30
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-01 16:58:58 -07:00
2026-05-31 09:13:06 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-19 01:28:32 -07:00
2026-05-25 01:20:33 -07:00
2026-05-31 09:13:06 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 11:59:58 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 04:53:13 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-08 17:01:12 -07:00
2026-05-07 05:53:14 -07:00
2026-05-08 16:07:23 -07:00
2026-05-29 22:26:24 +05:30
2026-06-04 01:19:28 +05:30
2026-05-28 22:26:25 -07:00
2026-03-30 11:17:15 -07:00
2026-05-28 22:26:25 -07:00
2026-05-08 11:18:14 -07:00
2026-05-28 22:26:25 -07:00
2026-05-31 03:19:37 -07:00
2026-05-25 01:47:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-02 19:49:10 -07:00
2026-03-26 13:39:41 -07:00
2026-05-24 18:04:54 -07:00
2026-05-28 22:26:25 -07:00
2026-06-03 16:40:28 -07:00
2026-05-27 22:03:45 -05:00
2026-06-02 20:28:18 -04:00
2026-05-30 07:31:48 -07:00
2026-05-29 17:24:38 -07:00
2026-06-03 16:40:13 -07:00
2026-05-29 13:30:28 -07:00
2026-05-30 02:38:40 -07:00
2026-04-19 22:43:09 -07:00
2026-05-28 22:26:25 -07:00
2026-05-19 03:01:02 -07:00
2026-06-03 04:59:49 -07:00
2026-05-08 14:55:40 -07:00
2026-05-28 22:26:25 -07:00
2026-06-01 20:27:41 -07:00
2026-06-02 20:29:54 -04:00
2026-05-15 12:11:32 -07:00
2026-05-06 15:49:59 -07:00
2026-06-02 18:28:24 -05:00
2026-05-25 01:15:24 -07:00
2026-05-24 15:00:44 -07:00
2026-05-24 17:47:24 -07:00
2026-06-03 17:48:55 -07:00
2026-06-02 20:28:18 -04:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-17 12:35:01 -07:00
2026-05-24 18:12:16 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00