garm v0.1.4 #211
gabriel-samfira
announced in
Announcements
garm v0.1.4
#211
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Welcome to GARM version v0.1.4!
Before we dive into the highlights, there are a couple of things we need to mention.
Breaking change warning⚠️
This version removes the LXD internal provider in favor of two new external providers:
This was done mainly due to the licensing change of LXD. If you're using LXD and are upgrading from previous versions, you must download the LXD external provider and configure it.
Another breaking (sort of) change is in the
garm-cli
. The--force
flag in therunner remove
command, is no longer mandatory when removing a runner. Moreover, the--force
flag now ignores provider errors. In previous versions, if a provider erred when removing a runner, GARM would keep trying until it succeeded. The problem was that if a provider was misconfigured, we would be stuck with a runner in error state until re manually removed it from the database. The--force
flag allows us to remove a runner from GARM even if the provider returns an error.Database upgrade⚠️
This version will execute a database migration. While we try not to break anything when making database migrations, it's always a good idea to create a backup of your DB as well as any configuration files. If anything goes wrong, you can revert the changes.
To safely create a backup of you DB, you can use the
sqlite3
CLI:# Change the path to your DB to the one configured in your config.toml sqlite3 /etc/garm/garm.db .backup /path/to/backup/location/garm-backup.db
Highlights
This release is packed with optimizations, changes and a couple of nice features.
JIT runners
The main highlight of this release is the ability to use just-in-time self-hosted runners. To accommodate this change, GARM now has more robust metadata endpoints that can serve the needed JIT files. This will most likely be expanded in the future to include setup scripts for clouds where we have userdata size constraints.
JIT runners allows us to avoid sending a runner registration token over the wire. Registration tokens can be used to register multiple runners and have a validity of one hour. A bad actor may intercept this token and use it to register their own runners. With JIT runners, only one runner may use the credentials at any given point in time. The credentials are fetched from GARM by the runner when it spins up.
This feature can be disabled in the provider config by specifying:
easily access controller info
We now have the ability to gain more insight into how GARM is configured. We've added a new command which can show us some info about the controller:
Easy webhook installation
Installing webhooks for entities (repos, orgs, enterprises) can be a chore. In this version, we've added the ability to let GARM install the needed webhook, with the correct settings by running a simple command. To make use of this feature, the PAT you're using must have access to
admin:org_hook
:This command will add the org
exampleOrg
to your GARM controller and install a webhook for it with a random webhook secret. You can also install a webhook for an existing organization or repository:To view the status of a webhook:
You can also uninstall a webhook:
ubuntu@garm:~$ garm-cli repo webhook uninstall b90911e1-8727-4bb7-a1eb-96855d73a27b
Webhooks installed by the above commands are always namespaced to the controller ID you get when you run
garm-cli controller-info show
. This way, when we remove a webhook, we don't accidentally remove someone else's hook. You can also manually install we webhook just like before. You don't need to namespace it to the controller ID. GARM will see the webhook and let you know if the hook is already installed.Removing a repo or org will also clean up the webhook if it was namespaced to our controller. You can opt to keep the hook by passing the
--keep-webhook
flag.Webhook installation is not available for enterprises.
Structured logging
GARM has now switched to the
slog
standard package for structured logging. As part of this change, we now have a dedicated[logging]
config section where you can set the log level, log format, enable the log streamer, etc. Check out the sample config for more info.Other updates
There are a lot of bug fixes and stability updates that should make this version behave better in relation to the GitHub API.
What's Changed
org/repo
by @mihaelabalutoiu in Cleaning up leftover runners fororg/repo
#149orgPool/repoPool
details on timeout exceeded by @mihaelabalutoiu in LogorgPool/repoPool
details on timeout exceeded #151organization
andrepository
by @mihaelabalutoiu in Add webhooks integration tests fororganization
andrepository
#161waitPoolRunningIdleInstances
function by @ionutbalutoiu in FixwaitPoolRunningIdleInstances
function #168waitPoolRunningIdleInstances
func by @ionutbalutoiu in OptimizewaitPoolRunningIdleInstances
func #171org/repo
by @mihaelabalutoiu in Cleaning up leftover Github webhooks fororg/repo
#175New Contributors
Full Changelog: v0.1.3...v0.1.4
This discussion was created from the release garm v0.1.4.
Beta Was this translation helpful? Give feedback.
All reactions