Require that inline comments be separated from configuration
data by whitespace. Unescape comment specifiers that follow
the correct escape sequence.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
If the user creates or moves a folder that was is reserved
reserved correctly ignore or remove watches as appropriate.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Expose the UID assigned to webcams and allow clients to fetch, modify,
and delete items based on the UID. New additions must not specify a
UID.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Temperature Monitors may report null values as temperatures,
thus special handling is needed. This commit also reworks
temperature store updates to use the subscription cache
rather than perform its own caching of "last temps".
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Now that all subscriptions are cached it is no longer required for
the paneldue component to cache its own printer state.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This callback will only fire after a component has requested
a subscription, preventing early updates while the component
is waiting for the subscription request to complete. It is still
valid for components to register the "server:status_update"
event handler if this behavior is not a concern.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It is possible that a subscripition request can occur between
after Klipper updates a field's status, but before it pushes
a status update to the connection. The result is a race
condiiton where the response to the subscription request
contains the lastest state but it is not propagated to
currently connected clients.
This is resolved by caching subscripiton data, diffing it
with the response to the subscription request, and
manually pushing the diff.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Wrap a Future instead of an Event, as we don't need to notify multiple
waiters. Additionally the future can return responses and raise exceptions
directly.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The subscripition request is reentrant in Klippy. Sending multiple
requests from the same connection may create a race condition,
so use a lock to prevent reentry.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
A previous bug in the webcam module could have set boolean
values as integers. Make sure they are type correct when
reading webcams from the db.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
In Python a "bool" is a subclass of int. When introspecting
a webcam's attributes it is necessary to check for booleans
before integers.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use Moonraker's environment variables when generating the
env file for service validation updates.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Allow all command line arguments to be specificed as an
environment variable. If both the command line argument
and environment variable is present the command line argument
takes precedence.
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>
Add a command line option that allows the installation to specify
the exact path to Moonraker's unix domain server socket. The
default location remains at:
<data_path>/comms/moonraker.sock
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>
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>
Submodules contain a .git file that includes the path to the
actual repository folder. Extract that path and use it for
lock file detection.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use git-branch to determine current the current branch and
head state instead of git-status. The former is a porcelain
command with guaranteed output.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Streamline the rollback defaults so only one dict object
is explicitly defined in "capture_state_for_rollback()".
Validate the rollback branch on detached heads before
setting it.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use the newly implemented versions utility for git version parsing.
This allows for simple access to version information and
version comparison.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>