From 733894aee681817acbd641a58a7303b1ec358644 Mon Sep 17 00:00:00 2001 From: jmoore-skild Date: Fri, 31 Jul 2026 16:38:05 -0400 Subject: [PATCH] docs(backup): give the real reason cloud profiles are not restorable (#2656) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both docstrings said the collector never writes `cloud_profiles/*.json`. That was true when they were written and stopped being true at `455a9e4b` (#2717, "collect cloud profiles from every connected account"), which is this branch's rebase base — so the PR was shipping a stated reason its own base had invalidated. The real reason is the one the PR body now gives: restoring a preset means writing to a Bambu or Orca Cloud account, which is a different operation from every other category here. Those land in the local database, or on a printer the instance already owns. Checked that nothing in the restore path is confused by the new files — the category globs don't reach `cloud_profiles/`, and it stays out of `RestoreCategory`. --- backend/app/schemas/github_backup.py | 8 ++++---- backend/app/services/github_restore.py | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/backend/app/schemas/github_backup.py b/backend/app/schemas/github_backup.py index b66011b21..e78c1dc1b 100644 --- a/backend/app/schemas/github_backup.py +++ b/backend/app/schemas/github_backup.py @@ -218,10 +218,10 @@ REF_PATTERN = r"^(?:HEAD|[0-9a-fA-F]{7,40})$" class RestoreCategory(StrEnum): """Backup categories that can be restored. - Cloud profiles are deliberately absent: the backup collector never actually - writes ``cloud_profiles/*.json`` (it reads a "setting" list key the Bambu - Cloud API does not return), and the preset list it would collect carries no - setting payload to restore from. Tracked separately from #2656. + Cloud profiles are deliberately absent: restoring a preset means writing to + a Bambu or Orca Cloud account, which is a different operation from every + other category here — those land in the local database, or on a printer the + instance already owns. Tracked separately from #2656. """ KPROFILES = "kprofiles" diff --git a/backend/app/services/github_restore.py b/backend/app/services/github_restore.py index d3a05c7d0..57a1ffe47 100644 --- a/backend/app/services/github_restore.py +++ b/backend/app/services/github_restore.py @@ -23,9 +23,12 @@ Design notes worth knowing before editing: * **Categories are applied archives -> spools -> settings -> kprofiles.** Archives first because spool usage history references ``archive_id``; K-profiles last because they leave the database and talk to hardware. -* **Cloud profiles are not restorable.** The backup collector never actually - writes ``cloud_profiles/*.json``, and the preset list it would write carries - no setting payload. Tracked separately from #2656. +* **Cloud profiles are not restorable.** Restoring a preset means writing to a + Bambu or Orca Cloud account, which is a different operation from everything + else here — every other category lands in the local database or, for + K-profiles, on a printer the instance already owns. Tracked separately from + #2656. (The collector does write ``cloud_profiles/*.json`` as of #2717; the + earlier claim that it did not is no longer true.) """ import asyncio