Skip to content

feat(pressure reconciler): Support no planner integration#759

Merged
cbartz merged 11 commits intomainfrom
feat/pressure-reconciler-no-planner-ISD-4104
Mar 24, 2026
Merged

feat(pressure reconciler): Support no planner integration#759
cbartz merged 11 commits intomainfrom
feat/pressure-reconciler-no-planner-ISD-4104

Conversation

@cbartz
Copy link
Copy Markdown
Collaborator

@cbartz cbartz commented Mar 18, 2026

Applicable spec: ISD-244

Overview

Support using no planner in the pressure reconciler.

Rationale

Currently we need one planner deployment per Github organisation. For some organisations, that only require a fixed pool of runners, a dedicated planner deployment is overkill. As we are going to drop the legacy reconcile in a future PR, we need to let the pressure reconciler support no planner integration.

Checklist

  • The charm style guide was applied.
  • The contributing guide was applied.
  • The changes are compliant with ISD054 - Managing Charm Complexity
  • The documentation for charmhub is updated.
  • The PR is tagged with appropriate label (urgent, trivial, complex).
  • The changelog is updated with changes that affects the users of the charm.
  • The application version number is updated in github-runner-manager/pyproject.toml.

@cbartz cbartz changed the base branch from main to chore/prepare-tests-for-legacy-removal-ISD-4104 March 18, 2026 10:07
Base automatically changed from chore/prepare-tests-for-legacy-removal-ISD-4104 to main March 20, 2026 11:43
@cbartz cbartz force-pushed the feat/pressure-reconciler-no-planner-ISD-4104 branch from aa7d274 to ddd61be Compare March 20, 2026 13:45
@cbartz cbartz requested a review from Copilot March 20, 2026 13:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the pressure reconciler to operate without a planner integration (using a configured minimum runner count as fallback/static pressure), and refactors the HTTP server endpoints to use RunnerManager directly.

Changes:

  • Add RunnerInfo + RunnerManager.get_runner_info() for aggregated runner status reporting.
  • Allow PressureReconciler to be built/run with planner_client=None and update unit tests accordingly.
  • Refactor /runner/check and /runner/flush HTTP endpoints to call RunnerManager instead of RunnerScaler; bump package version and update changelog.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
github-runner-manager/src/github_runner_manager/manager/pressure_reconciler.py Makes planner optional, adds no-planner branch in create loop, and exposes build_runner_manager.
github-runner-manager/src/github_runner_manager/manager/runner_manager.py Introduces RunnerInfo and get_runner_info() aggregation on RunnerManager.
github-runner-manager/src/github_runner_manager/http_server.py Switches HTTP endpoints from RunnerScaler to RunnerManager and adjusts response serialization.
github-runner-manager/src/github_runner_manager/cli.py Builds a RunnerManager for the HTTP server and wires pressure reconciler threads conditionally.
github-runner-manager/tests/unit/test_http_server.py Updates tests to mock/use RunnerManager directly.
github-runner-manager/tests/unit/manager/test_runner_manager.py Adds unit tests for RunnerManager.get_runner_info().
github-runner-manager/tests/unit/manager/test_pressure_reconciler.py Adds tests for no-planner behavior and build function behavior.
github-runner-manager/pyproject.toml Bumps application version to 0.16.0.
docs/changelog.md Documents no-planner support and HTTP endpoint refactor.

@cbartz cbartz changed the title [WIP] feat(pressure reconciler): Support no planner integration feat(pressure reconciler): Support no planner integration Mar 23, 2026
@cbartz cbartz requested a review from Copilot March 23, 2026 11:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

github-runner-manager/src/github_runner_manager/cli.py:106

  • The main() docstring still says "Start the reconcile service", but the CLI now always starts the pressure reconciler loops (and no longer supports the legacy reconcile service). Updating the docstring to reflect the new behavior will prevent confusion for future maintainers.
    """Start the reconcile service.

…ner-ISD-4104' into feat/pressure-reconciler-no-planner-ISD-4104
@cbartz cbartz marked this pull request as ready for review March 23, 2026 11:48
Copy link
Copy Markdown
Member

@yanksyoon yanksyoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for the changes :)

@cbartz cbartz enabled auto-merge (squash) March 24, 2026 06:27
cbartz added 2 commits March 24, 2026 10:26
The _wait_for_runner_ready and _wait_for_no_runners helpers call
juju.run() in a retry loop but don't catch TimeoutError. When the unit
is busy (e.g. spawning a VM after config change), the action times out
and jubilant raises TimeoutError, killing the test immediately instead
of retrying on the next iteration.
@cbartz cbartz merged commit 1e1f86f into main Mar 24, 2026
117 of 121 checks passed
@cbartz cbartz deleted the feat/pressure-reconciler-no-planner-ISD-4104 branch March 24, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants