From 0f4276d9b02f5e40ef3d66d689c56ef3ff381ff2 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Mon, 19 Jun 2023 11:49:17 -0400 Subject: [PATCH] docs: document update_manager changes Signed-off-by: Eric Callahan --- docs/changelog.md | 19 +++++++++++++++++-- docs/configuration.md | 26 +++++++++++++++++++++++++- docs/web_api.md | 41 +++++++++++++++++++++++++++++++++-------- 3 files changed, 75 insertions(+), 11 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index d0d5ab3..a2500b9 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -10,19 +10,34 @@ The format is based on [Keep a Changelog]. - **notifier**: The `attach` option now supports Jinja2 templates. - **notifier**: The `attach` option may now contain multiple attachments, each separated by a newline. +- **notifier**: Added support for a configurable `body_format` +- **power**: Added support for generic `http` type switches. +- **metadata**: Added support for OrcaSlicer ### Fixed - **simplyprint**: Fixed import error preventing the component from loading. -- **update_manager**: Moonraker will now restart the correct "moonraker" and +- **update_manager**: Moonraker will now restart the correct "moonraker" and "klipper" services if they are not the default values. +- **job_queue**: Fixed transition wihen auto is disabled +- **history**: Added modification time to file existance checks. +- **dbus_manager**: Fixed PolKit warning when PolKit features are not used. ### Changed -- Bumped Apprise to version `1.3.0`. +- **build**: Bumped apprise to version `1.3.0`. +- **build**: Bumped lmdb to version `1.4.1` - **machine**: Added `ratos-configurator` to list of default allowed services - **update_manager**: It is now required that an application be "allowed" for Moonraker to restart it after an update. +- **update_manager**: Git repo validation no longer requires a match for the + remote URL and/or branch. +- **update_manager**: Fixed potential security vulnerabilities in `web` type updates. + This change adds a validation step to the install, front-end developers may refer to + the [configuration documentation](./configuration.md#web-type-front-end-configuration) + for details. +- **API**: The `update_manager` APIs that return status report additional fields. + See the [API Documentation](./web_api.md#get-update-status) for details. ## [0.8.0] - 2023-02-23 diff --git a/docs/configuration.md b/docs/configuration.md index 75e3aa9..69e5f26 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1654,6 +1654,26 @@ down into 3 basic types: #### Web type (front-end) configuration +!!! Note + Front-end developers that wish to deploy updates via Moonraker + should host releases on their GitHub repo. In the root of each + release a `release_info.json` file should be present. This + file must contain a JSON object with the following fields: + + - `project_name`: The name of the GitHub project + - `project_owner`: The User or Organization that owns the project + - `version`: The current release version + + For example, a `release_info.json` for Mainsail might contain the + following: + ```json + { + "project_name": "mainsail", + "project_owner": "mainsail-crew", + "version": "v2.5.1" + } + ``` + ```ini # moonraker.conf @@ -1669,7 +1689,11 @@ repo: # For example, this could be set to fluidd-core/fluidd to update Fluidd or # mainsail-crew/mainsail to update Mainsail. This parameter must be provided. path: -# The path to the front-end's files on disk. This parameter must be provided. +# The path to the front-end's files on disk. This folder must contain a +# a previously installed client. The folder must not be located within a +# git repo and it must not be located within a path that Moonraker has +# reserved, ie: it cannot share a path with another extension. This parameter +# must be provided. persistent_files: # A list of newline separated file names that should persist between # updates. This is useful for static configuration files, or perhaps diff --git a/docs/web_api.md b/docs/web_api.md index f908a43..a69a86a 100644 --- a/docs/web_api.md +++ b/docs/web_api.md @@ -4163,7 +4163,10 @@ and `fluidd` are present as clients configured in `moonraker.conf` "commits_behind": [], "git_messages": [], "full_version_string": "v0.7.1-364-gecfad5c", - "pristine": true + "pristine": true, + "recovery_url": "https://github.com/Arksine/moonraker.git", + "remote_url": "https://github.com/Arksine/moonraker.git", + "warnings": [] }, "mainsail": { "name": "mainsail", @@ -4175,16 +4178,20 @@ and `fluidd` are present as clients configured in `moonraker.conf` "info_tags": [ "desc=Mainsail Web Client", "action=some_action" - ] + ], + "warnings": [], + "is_valid": true }, "fluidd": { "name": "fluidd", - "owner": "cadriel", - "version": "?", + "owner": "fluidd-core", + "version": "v1.16.2", "remote_version": "v1.16.2", - "configured_type": "web_beta", + "configured_type": "web", "channel": "beta", - "info_tags": [] + "info_tags": [], + "warnings": [], + "is_valid": true }, "klipper": { "channel": "dev", @@ -4225,7 +4232,10 @@ and `fluidd` are present as clients configured in `moonraker.conf` ], "git_messages": [], "full_version_string": "v0.10.0-1-g4c8d24ae-shallow", - "pristine": true + "pristine": true, + "recovery_url": "https://github.com/Klipper3d/klipper.git", + "remote_url": "https://github.com/Klipper3d/klipper.git", + "warnings": [] } } } @@ -4299,11 +4309,19 @@ as applications have the following fields: configuration for each client. Client developers my define what tags, if any, users will configure. They can choose to use those tags to display information or perform an additional action after an update if necessary. +- `recovery_url`: The url Moonraker will use to re-clone the repo when a + hard recovery is requested. If this reports a "?" then a hard recovery is + not possible. +- `remote_url`: The url for the currently configured remote. +- `warnings`: An array of strings that describe warnings detected during + repo init. These warnings describe potential issues, such as a mismatch + between the detected remote and the configured remote. If the `is_valid` + field reports `False` then the warnings will contain additional context. Web clients have the following fields: - `channel`: channel to fetch updates from -- `configured_type`: will be `web` or `web_beta` +- `configured_type`: will be `web` - `name`: name of the configured client - `owner`: the owner of the client - `version`: version of the installed client. @@ -4312,6 +4330,13 @@ Web clients have the following fields: configuration for each client. Client developers my define what tags, if any, users will configure. They can choose to use those tags to display information or perform an additional action after an update if necessary. +- `is_valid`: A boolean that reports true if an update is possible, false + if an update cannot be performed. +- `warnings`: An array of strings that describe warnings detected during + repo init. These warnings describe potential issues, such as a mismatch + between the detected owner and the configured owner. If the `is_valid` + field reports `False` then the warnings will contain additional context. + The `system` package has the following fields: