Skip to content

fix(charm): check image readiness before starting runner manager service#777

Merged
cbartz merged 1 commit into
mainfrom
fix/check-image-before-reconcile
Apr 7, 2026
Merged

fix(charm): check image readiness before starting runner manager service#777
cbartz merged 1 commit into
mainfrom
fix/check-image-before-reconcile

Conversation

@cbartz
Copy link
Copy Markdown
Collaborator

@cbartz cbartz commented Apr 3, 2026

Overview

Moved _check_image_ready() into _reconcile() so every code path that starts the runner manager service first verifies the image integration has an available image.

Rationale

Several event handlers (_on_upgrade_charm, _on_planner_relation_changed, _on_planner_relation_broken) called _reconcile() without checking image readiness. This caused the service to start with combinations: [] and error with "No runner
combinations configured" instead of setting the charm to blocked/waiting status.

Juju Events Changes

No new events. Existing handlers _on_upgrade_charm, _on_planner_relation_changed, _on_planner_relation_broken, _on_config_changed, _on_image_relation_changed, and _on_debug_ssh_relation_changed now all go through _reconcile() for image readiness
checks. Redundant _check_image_ready() calls removed from the latter three.

Module Changes

  • charm.py: _reconcile() now calls _check_image_ready() before _setup_service().

Library Changes

None.

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.

Several event handlers (_on_upgrade_charm, _on_planner_relation_changed,
_on_planner_relation_broken) called _reconcile() without first checking
image readiness. This caused the runner manager service to start with
empty runner combinations, erroring with "No runner combinations
configured" instead of setting the charm to blocked/waiting status.

Move _check_image_ready() into _reconcile() so all code paths that
start the service are covered, and remove the now-redundant calls
from individual handlers.
@cbartz cbartz marked this pull request as ready for review April 7, 2026 05:08
@cbartz cbartz enabled auto-merge (squash) April 7, 2026 05:19
@cbartz cbartz merged commit c059a59 into main Apr 7, 2026
229 of 263 checks passed
@cbartz cbartz deleted the fix/check-image-before-reconcile branch April 7, 2026 13:40
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.

3 participants