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>
The versions module contains classes that can parse
Python and Git versions, providing methods to access
the version details.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
If a git repo not configured on the dev channel it is necessary
to move the HEAD to the commit for the correct tag.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
When a client repeatedly makes a request that results in an error
the log is spammed with tracebacks that don't provide significant
value. The method name, code, and error message should be
enough for basic troubleshooting.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
When logging stderr in realtime omit the program name. It often
does not provide useful context. The program itself can provide
context through its own logging facilities.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Add a debug logging helper to the base class. Use unique
logging prefixes for subclasses of AppDeploy.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Move specific configuration out of __init__ into several methods
that may be called by subclasses. This allows child implementations
to define and share specific sets of configuration that they require
without forcing all implementations to do so.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Remove hardcoded beta binding between Moonraker and Klipper.
This could result in a user getting stuck on a commit that requires
a future patch.
The original purpose of binding versions was to avoid a scenario
where Klipper introduces a feature incompatible with the current
Moonraker beta. Rather than binding the better solution is to
fix the incompatibility and tag a new beta.
Signed-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>
If the exectuable in the virtualenv is not "python" attempt to
detect the python executable. Use the pip entry point for the
pip command.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Set the minimum value for the sync_rate to 1 second, rather
than above 1 second. When transitioning from a null spool
to a named spool clear tracked extrusion.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>