Skip to content

fix(updater): keep moonraker.conf, clean shutdown, safe updates, Spoolman pin - #359

Merged
gmmcosta15 merged 4 commits into
devfrom
fix/moonraker-conf-seed-only
Oct 21, 2026
Merged

gmmcosta15 merged 4 commits into
devfrom
fix/moonraker-conf-seed-only

Conversation

@gmmcosta15

@gmmcosta15 gmmcosta15 commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  • Feature
  • Bug Fix
  • Code Refactor
  • Documentation

Urgent fixes for the Release-2.0 fleet before the next stage promotion: BlocksScreen stops resetting moonraker.conf on every start, merged config options land in the right section, the USB monitor no longer aborts the app on shutdown, venv installs no longer overlap, and Spoolman is pinned to v0.27.0.

Changes

  • moonraker.conf no longer resets: copied only when missing, so the migration's patches survive a screen restart.
  • Merged options land in their own section: missing options are inserted under their existing header instead of the file's last one; multi-line values stay one option.
  • No crash when the screen closes: the USB monitor could abort the app on shutdown.
  • Concurrent venv writers are serialized: bs-bootstrap, post-merge and install-updater.sh share a venv lock; post-merge skips pip when the lock is busy instead of risking the updater's hook timeout.
  • Spoolman fixed to version v0.27.0: it no longer pulls untested upstream code.

Motivation

  • Repeating a section header instead would break Klipper save_variables, whose ConfigParser is strict, so options are inserted under the existing header
  • Qt docs: queued events already posted are still delivered after a disconnect, so a flag is needed rather than a disconnect
  • The updater kills post-merge after 600 s (HOOK_TIMEOUT); waiting on a long bs-bootstrap reinstall could trip it and roll the update back
  • Spoolman wiki: master is "Advanced users only" with one-way DB migrations; three boxes ran three different master commits. No migrations since v0.27.0, so the pin is downgrade-safe; R2 daemons already support version

Tests

  • New unit tests fail without the fix: seed-only kept/seeded, merge_cfg own-section/headerless/repeated-section/multi-line, USB close/restart (3)

Future work

  • Bump the Spoolman pin per upstream release

@gmmcosta15 gmmcosta15 self-assigned this Oct 21, 2026
@gmmcosta15 gmmcosta15 added the bug Something is broken, or a fix for it label Oct 21, 2026
@gmmcosta15
gmmcosta15 merged commit 7ed5b59 into dev Oct 21, 2026
9 checks passed
@gmmcosta15
gmmcosta15 deleted the fix/moonraker-conf-seed-only branch October 21, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken, or a fix for it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants