Merged
Conversation
575a78e to
ac79755
Compare
Connect the planner client and pressure reconciler to the charm and CLI: - Add build_pressure_reconciler factory and planner mode in CLI - Add planner configuration to charm_state - Add planner stub server for integration testing - Add integration tests for planner-driven runner management - Add ADR documenting the pressure reconciler design
ac79755 to
6afe25d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR follows up on planner integration work by wiring the charm/application to run in “planner mode” when planner relation/config is present, while keeping the legacy reconcile path available.
Changes:
- Add planner relation-derived config into charm state and propagate it into
ApplicationConfiguration. - Add planner-mode startup path in
github-runner-managerCLI (PressureReconciler create/delete loops) plus a new application-level integration test with a planner stub. - Update CI/workflow and test harness pieces to run the new integration test and capture logs.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/charm_state.py |
Adds PlannerConfig and reads endpoint/token from planner relation into CharmState. |
src/factories.py |
Passes planner URL/token into ApplicationConfiguration. |
tests/unit/conftest.py |
Updates CharmState fixture to include planner_config. |
tests/unit/test_charm_state.py |
Adds unit tests for _build_planner_config_from_charm. |
tests/unit/test_factories.py |
Adds unit test asserting planner fields are propagated into app config. |
github-runner-manager/src/github_runner_manager/cli.py |
Switches between planner mode (PressureReconciler) and legacy mode based on planner config. |
github-runner-manager/src/github_runner_manager/manager/pressure_reconciler.py |
Adds build_pressure_reconciler() helper and adjusts delete-loop interval semantics. |
github-runner-manager/src/github_runner_manager/configuration/base.py |
Updates reconcile_interval doc to “minutes”. |
github-runner-manager/tests/integration/planner_stub.py |
Adds a lightweight Flask-based planner stub server for integration tests. |
github-runner-manager/tests/integration/test_planner_runner.py |
Adds end-to-end-ish integration test that scales runner based on planner pressure. |
github-runner-manager/tests/integration/conftest.py |
Centralizes wait_for_runner helpers and adds a planner_stub fixture. |
github-runner-manager/tests/integration/test_debug_ssh.py |
Reuses shared runner-wait helper and wires planner config into test app setup. |
github-runner-manager/tests/integration/factories.py |
Adds optional planner URL/token into generated app config. |
github-runner-manager/tests/integration/application.py |
Adds optional log file handler for CLI subprocess. |
github-runner-manager/tox.ini |
Adjusts integration test command/posargs behavior. |
.github/workflows/test_github_runner_manager.yaml |
Adds test_planner_runner to integration test matrix. |
docs/adr/001_pressure_reconciler_design.md |
Adds ADR describing the two-loop pressure reconciler approach. |
docs/changelog.md |
Notes planner-driven pressure reconciler addition and fixes indentation. |
github-runner-manager/src/github_runner_manager/manager/pressure_reconciler.py
Outdated
Show resolved
Hide resolved
florentianayuwono
approved these changes
Feb 24, 2026
Contributor
florentianayuwono
left a comment
There was a problem hiding this comment.
pre approving this PR thanks chris!
github-runner-manager/src/github_runner_manager/manager/pressure_reconciler.py
Outdated
Show resolved
Hide resolved
github-runner-manager/src/github_runner_manager/manager/pressure_reconciler.py
Outdated
Show resolved
Hide resolved
github-runner-manager/src/github_runner_manager/manager/pressure_reconciler.py
Show resolved
Hide resolved
github-runner-manager/src/github_runner_manager/manager/pressure_reconciler.py
Show resolved
Hide resolved
javierdelapuente
approved these changes
Feb 25, 2026
Contributor
TICS Quality Gate✔️ Passedgithub-runner-operatorSee the results in the TICS Viewer The following files have been checked for this project
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applicable spec: ISD-244
Overview
This PR is a follow-up of #734 to use the planner in the charm.
It adds the usage upon relating with the planner, while keeping the legacy mode still available for charms that are not integrated with the planner.
It also adds an application level integration test.
A follow-up PR to remove the legacy code and end-to-test based on the planner is expected.
Rationale
We need to use the planner upon relating.
Juju Events Changes
n/a
Module Changes
Mainly adaptions on charm state and on the cli in the application and application level integration tests
Library Changes
n/a
Checklist
urgent,trivial,complex).github-runner-manager/pyproject.toml.application version is not bumped, because the application was not used yet