Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ requires:
interface: debug-ssh
image:
interface: github_runner_image_v0
mongodb:
interface: mongodb_client
limit: 1
planner:
interface: github_runner_planner_v0

Expand Down Expand Up @@ -156,16 +153,14 @@ config:
type: int
default: 0
description: >-
The number of non-reactive virtual machine runners spawned by the charm per each
combination of flavor and base. Currently, if the charm is integrated with MongoDB
this config option will be ignored.
The number of virtual machine runners spawned by the charm per each
combination of flavor and image.
max-total-virtual-machines:
type: int
default: 0
description: >-
If the github-runner charm is integrated with MongoDB, the reactive mode will not spawn
new virtual machines if there are max-total-virtual-machines of more virtual machines
managed by the charm.
Maximum number of virtual machines managed by the charm. The charm will not spawn
new runners beyond this limit. Set to 0 (default) for no cap.
flavor-label-combinations:
type: string
default: ""
Expand Down
6 changes: 5 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

This changelog documents user-relevant changes to the GitHub runner charm.

## 2026-03-25

- Removed `mongodb` relation. MongoDB-based reactive runner spawning is no longer supported. **If you have an active MongoDB relation, remove it with `juju remove-relation` before upgrading.**
- Updated documentation to clarify that reactive MongoDB-based runner spawning is no longer supported.

## 2026-03-20

- The pressure reconciler is now always used, replacing the legacy reconcile mode. When no planner relation is configured, it uses `base-virtual-machines` as static pressure to maintain the configured minimum runner count.
- HTTP server endpoints (`/runner/check`, `/runner/flush`) now use `RunnerManager` directly instead of the legacy `RunnerScaler`.
- Set GitHub API pagination page size to 100 (up from PyGithub default of 30), reducing API calls when listing runners.

## 2026-03-18
Expand Down
1 change: 0 additions & 1 deletion docs/how-to/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ basic operations you can complete with the charm.
Debug with SSH <debug-with-ssh>
Integrate with COS <integrate-with-cos>
Spawn OpenStack runner <openstack-runner>
Set up reactive spawning <reactive>

Update and refresh
------------------
Expand Down
114 changes: 0 additions & 114 deletions docs/how-to/reactive.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ Thinking about using the GitHub runner charm for your next project? [Get in touc
1. [Debug with SSH](how-to/debug-with-ssh.md)
1. [Integrate with COS](how-to/integrate-with-cos.md)
1. [Spawn OpenStack runner](how-to/openstack-runner.md)
1. [Set up reactive spawning](how-to/reactive.md)
1. [Comply with security requirements](how-to/comply-security.md)
1. [Upgrade](how-to/upgrade.md)
1. [Contribute](how-to/contribute.md)
Expand Down
22 changes: 4 additions & 18 deletions docs/reference/charm-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,26 @@ Container_Boundary(c1, "GitHub Runner Charm"){

Component(openstackrunnermanager, "OpenstackRunnerManager", "", "")
Component(runnermanager, "RunnerManager", "", "")
Component(runnerscaler, "RunnerScaler", "", "")
Component(pressurereconciler, "PressureReconciler", "", "")

Rel(runnerscaler, runnermanager, "uses", "")
Rel(pressurereconciler, runnermanager, "uses", "")
Rel(runnermanager, cloudrunnermanager, "uses", "")
Rel(runnermanager, githubrunnermanager, "uses", "")
Rel(openstackrunnermanager, cloudrunnermanager, "implements", "")
}

Container_Boundary(c2, "Reactive Processes"){
Component(runnerprocess, "github_runner_manager.reactive.runner", "Reactive Process", "")
}

Rel(githubrunnermanager, github, "manages VMs", "")
Rel(openstackrunnermanager, osrunnign, "manages VMs", "")

Rel(runnermanager, runnerprocess, "creates/deletes processes", "")

Rel(runnerprocess, github, "manages VMs", "")
Rel(runnerprocess, osrunnign, "manages VMs", "")

UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="2")
```

The `RunnerScaler` is the entry point component to reconcile the desired number of runners using the `RunnerManager`.
The `PressureReconciler` is the entry point component to reconcile the desired number of runners using the `RunnerManager`.
The `RunnerManager` is the main component of the charm. The `RunnerManager` interacts with the other charm components in the following ways:
* `CloudRunnerManager`: To interact with the compute infrastructure to create and manage
self-hosted runners. OpenStack is currently the only available cloud implementation.
self-hosted runners. OpenStack is currently the only available cloud implementation.
* `GithubRunnerManager`: To interact with the GitHub API.

In the case of reactive runners, the `RunnerManager` will also create processes that
will be in charge of consuming events that were created from GitHub webhooks, and starting GitHub runners in a
reactive manner. Those events are stored in `mongodb` and are enqueued by
the charm [`github-runner-webhook-router`](https://github.com/canonical/github-runner-webhook-router).

## Virtual machines

To ensure a clean and isolated environment for every runner, self-hosted runners use OpenStack virtual machines. The charm spawns virtual machines, setting resources based on charm configurations. Virtual machines will not be reused between jobs, this is [similar to how GitHub hosts their runners due to security concerns](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#self-hosted-runner-security).
Expand Down
2 changes: 0 additions & 2 deletions docs/reference/cos.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ Relevant log files are (replace `<app-name>` with the name of the application an
- `/var/log/github-runner-manager/<app-name>-<unit-no>.log` : It contains logs from the runner manager application. This is particularly useful
for resolving issues related to reconciliation, such as problems with spawning VMs or contacting GitHub.
- `/var/log/juju/unit-<app-name>-<unit-no>.log` : It contains the Juju debug logs. These are relevant for inspecting issues with the charm operating the runner manager application.
- `/var/log/reactive_runner/<reactive-process-pid>.log` : It contains logs of the process of spawning a runner on demand. This is particularly relevant for troubleshooting issues
, such as queue consumption issues or the inability to spawn VMs on OpenStack.
- `/var/log/github-runner-metrics.log` : This contains the logs used to calculate metrics.

Use Loki to filter through multiple files or units.
Expand Down
13 changes: 0 additions & 13 deletions docs/reference/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,3 @@ juju integrate github-runner tmate-ssh-server
```


### `mongodb`

_Interface_: mongodb_client
_Supported charms_: [mongodb](https://charmhub.io/mongodb), [mongodb-k8s](https://charmhub.io/mongodb-k8s)

The mongodb integration provides the necessary information for the runner manager to access
the mongodb database, which is required for the (experimental) reactive spawning feature.
Integrating the charm with mongodb lets the charm automatically go into reactive mode.

Example mongodb_client integrate command:
```
juju integrate github-runner mongodb
```
2 changes: 1 addition & 1 deletion github-runner-manager/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[project]
name = "github-runner-manager"
version = "0.16.0"
version = "0.17.0"
authors = [
{ name = "Canonical IS DevOps", email = "is-devops-team@canonical.com" },
]
Expand Down
6 changes: 3 additions & 3 deletions github-runner-manager/src/github_runner_manager/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def main(
log_level: The log level.

Raises:
ClickException: If no non-reactive combinations are configured.
ClickException: If no runner combinations are configured.
"""
logging.basicConfig(
level=log_level,
Expand All @@ -123,9 +123,9 @@ def main(
config = ApplicationConfiguration.from_yaml_file(StringIO(config_file.read()))
lock = Lock()

combinations = config.non_reactive_configuration.combinations
combinations = config.runner_configuration.combinations
if not combinations:
raise click.ClickException("No non-reactive combinations configured.")
raise click.ClickException("No runner combinations configured.")
runner_manager = build_runner_manager(config, combinations[0])
pressure_reconciler = build_pressure_reconciler(config, runner_manager, lock)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
ApplicationConfiguration,
Flavor,
Image,
NonReactiveCombination,
NonReactiveConfiguration,
ProxyConfig,
QueueConfig,
ReactiveConfiguration,
RunnerCombination,
RunnerConfiguration,
SSHDebugConnection,
SupportServiceConfig,
UserInfo,
Expand Down
Loading
Loading