This is consistent with the http_client. The argument "attempts" is more
accurate than retries, as the first attempt is not a retry.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Previously the Klipper repo location can be changed outside of
the lock. If the location of the Klipper path is moved while an autorefresh is occurring it is possible for Moonraker to call refresh
and/or notify_update_refreshed before the repo has been initialized.
This commit moves the re-assignment of the "klipper" updated inside
the lock. In addition AppDeploy._is_valid is now defined in the
__init__() method.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
If the Klipper installation is not updatable (ie not a git repo)
abort reinstantion of the deployer.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
When the parent folder of a web client is a git repo note the specific
directory that contians a .git subdirectory.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use git-config to set track the current Moonraker instance managing a
a git repo. If multiple instances are detected log and create a repo
warning.
Singed-off-by: Eric Callahan <arksine.code@gmail.com>
This functionality was intended to allow for an automated
reinstallation between "git_repo" and "zip" types. The
"zip" type remains unused, and attempting to automate
this would likely be unreliable.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Require that "web" installations provide release info to validate
existing installations. For known web clients provide a fallback
that uses the manifest to validate the installation.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This endpoint allows clients to refresh items on an individual basis
when the "name" parameter is specified. This endpoint replaces
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Several components throughout Moonraker determine whether or not
Klipper is printing or is ready before taking action. This centralizes
queries in one area. The checks do not query Klipper directly but
rather rely on subscriptions to push state to Moonraker.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It that "git status" will not detect some repo issues, these are only
found after a fetch. When this condition is detected save the repo
state and report that the repo is corrupt and invalid.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Allow components to register reserved paths, then perform reserved
path validation it upon request. Reserved paths may be registered as
read-only or no access. Any request to modify an file/folder that is
either reserved or a child of a reserved path is rejected.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Check for updates every 7 days rather than every 28 days. This
is in preparation of an upcoming beta release.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Don't require the `app_params` argument, instead dynamically
generate the configuration from a dict. This simiplifies AppDeploy
initialization as the internally generated configurations can be
read in the same way as those supplied in moonraker.conf.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
While use of "unofficial" klippy extras an moonraker components
is not officially supported, there is no harm in facilitating
updates for these extensions in the update manager. This adds
configuration which will restart either moonraker or klipper
after an extension is updated.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
When using tempfile.TemporaryDirectory it is possible that
exiting the context will block when attempting to delete
the temporary directory. Don't use the context manager,
instead create and cleanup the temp dir using the default
threadpoolexecutor.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>