The dbus_next dependency is no longer maintained. Replace
it with dbus_fast, which is a fork and drop in compatible.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Initial support for pip-like requirement specifiers applicable
to system packages. This allows for a package dependencies
specific to distribution version.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Add an exc_info parameter that optionally takes an
exception that is passed to the logging function. This
will log the traceback without an additional logging call.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The default behavior of systemd is to remove shared memory
files when the user that created them logs out. This breaks
instance ID tracking for most installations. While its possible
to overcome this by changing the user type or the logind
configuration, these solutions required elevated privileges.
The simple solution is to store iids in a temporary file, with
access protected by a flock.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Implement instance package wide for the update_manager. This
only requires detecting multiple instances once and eliminates
costly calls to git.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
New repos have not yet saved the valid state, so it is necessary to
provide a default value when attempting to access the "is_valid"
field.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Save repo state if an exception is raised during a refresh
attempt. Add additional repo warnings with for better
descriptions regarding repo issues.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This enables customizing the time of day within which periodic refresh occurs.
Previously docs said it happens between 12am-4am which is misleading,
because the code effectively allowed refresh until 4:59:59 AM.
The default window is now '0-5', which is practically the same as before.
The comment about checking every 24h hours has been fixed as well.
This hasn't been true since commit c4fa76f21792943ea512d24326259f01d2fa7e89
Signed-off-by: Kamil Domański <kamil@domanski.co>
This performs a significant refactor to the ZipDeploy class, making it near identiical to WebClientDeploy. Zipped applications have the same
"release_info" requirement as web clients. Unlike web clients, they may also
configure the dependency and service options available to git repos.
The ZipDeploy class can also support we clients, eliminating duplicate code
and the need to keep web_deploy.py.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
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>
If the destination file exists it is necessary to explicitly use
the filename to overwrite. Otherwise an error is generated.
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>
Emit a single event where the first argument contains
a "JobEvent" enumeration that describes the particular
event. This reduces the number of callbacks registered
by JobState consumers and allows them react to multiple
state changes in the same callback.
The individual events remain for compatibility, however
they are deprecated. Current modules should be updated
to use the "job_state:state_changed" event and new modules
must use this event.
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>
This allows Moonraker to report anomalies detected in an updater
that won't prevent an update. Front ends may decide to present
these to users in a more subtle fashion so they know the state of
the repo without being concerned of an issue.
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>
After performing a recovery attempt to reset to the commit the
repo was at prior to the repo failure.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Add a check for shallow repos and move validation logic to the
GitRepo class. Additionally report the real number of commits behind.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>