Skip to content

make generated service configs update-safe - #234

Merged
GitGab19 merged 2 commits into
stratum-mining:mainfrom
GitGab19:fix-update-errors
Jul 29, 2026
Merged

make generated service configs update-safe#234
GitGab19 merged 2 commits into
stratum-mining:mainfrom
GitGab19:fix-update-errors

Conversation

@GitGab19

Copy link
Copy Markdown
Member

This PR regenerates managed Translator/JDC configs from saved setup before starts and auto-starts, so app updates cannot keep stale TOML files around.

If saved setup is valid but missing required choices for the current version, surface a setup review with existing values prefilled. If saved setup cannot be read, preserve it and require an explicit reset. Also add shared validation and a release smoke check for generated configs against the selected sv2-apps images.

It unblocks getumbrel/umbrel-apps#5933.

Here a recording of the exact case described in the PR reviewed by the Umbrel team, where a TOML config file is stale, and it gets recovered by using the state.json information:

Screencast.From.2026-07-29.15-32-15.mp4

Here a recording of the case where the user runs it from an incomplete state:

Screencast.From.2026-07-29.15-33-01.mp4

Here a recording of the case where the user runs it from an invalid state.json:

Screencast.From.2026-07-29.15-34-03.mp4

@GitGab19
GitGab19 requested a review from lucasbalieiro July 29, 2026 13:48
@GitGab19
GitGab19 force-pushed the fix-update-errors branch from cf91aa7 to 82c3dd9 Compare July 29, 2026 14:17

@lucasbalieiro lucasbalieiro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concept ACK 82c3dd9

Comment thread server/src/index.ts

@lucasbalieiro lucasbalieiro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 82c3dd9

I've tried to test this locally by running an older version of sv2-ui (0.5.0 and 0.4.0), configured the wizard to a sovereing solo mining mode and then running again with the changes of this PR (simulating an update of the app) and the transition went well,

GitGab19 added 2 commits July 29, 2026 21:49
Regenerate managed Translator/JDC configs from saved setup before starts and
auto-starts, so app updates cannot keep stale TOML files around.

If saved setup is valid but missing required choices for the current version,
surface a setup review with existing values prefilled. If saved setup cannot be
read, preserve it and require an explicit reset. Also add shared validation and
a release smoke check for generated configs against the selected sv2-apps images.
Add backoff for repeated auto-start failures, log service-config preparation
errors on start paths, and make setup-review recovery resume with saved choices
without changing the normal reconfigure flow.
@GitGab19
GitGab19 force-pushed the fix-update-errors branch from 88624ca to 9d781ed Compare July 29, 2026 19:49
@GitGab19
GitGab19 merged commit 1c81ce5 into stratum-mining:main Jul 29, 2026
6 checks passed
@GitGab19
GitGab19 deleted the fix-update-errors branch July 29, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants