feat(garm-configurator): integrate with image builder via github_runner_image_v0#222
Open
cbartz wants to merge 2 commits into
Open
feat(garm-configurator): integrate with image builder via github_runner_image_v0#222cbartz wants to merge 2 commits into
cbartz wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Integrates the garm-configurator charm with an image builder operator via the github_runner_image_v0 relation, forwarding OpenStack credentials over the relation and consuming the resulting image UUID for status/state.
Changes:
- Added a new
requires: imagerelation endpoint using thegithub_runner_image_v0interface. - Implemented holistic reconciliation to forward six OpenStack credential fields to connected image-builder relations and to set unit status based on whether an image UUID is available.
- Added unit + integration coverage for relation data propagation and UUID consumption using
any-charmas a fake provider.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
charms/garm-configurator/charmcraft.yaml |
Declares the new image requires endpoint/interface. |
charms/garm-configurator/src/charm.py |
Adds unified _reconcile across config and relation events; forwards credentials; sets Waiting/Active based on UUID presence. |
charms/garm-configurator/src/charm_state.py |
Extends CharmState with image_id sourced from relation unit data. |
charms/garm-configurator/tests/unit/test_charm.py |
Adds Scenario-based unit tests for credential forwarding and status behavior when UUID is absent/present. |
charms/tests/integration/conftest.py + charms/tests/integration/test_garm_configurator.py |
Adds an any-charm fake image builder and an end-to-end integration test validating relation data flow. |
e18c863 to
8c2ad23
Compare
8c2ad23 to
15869cc
Compare
911e84e to
c72c372
Compare
c72c372 to
0321d70
Compare
0321d70 to
0244ea2
Compare
0244ea2 to
d8f0057
Compare
d8f0057 to
4277973
Compare
…er_image_v0 Adds the image relation (github_runner_image_v0 interface) to the garm-configurator charm so it can supply OpenStack credentials to the image builder and receive the resulting image UUID. - charmcraft.yaml: add requires.image endpoint - charm.py: single _reconcile handles config_changed and all image relation events; forwards six OpenStack credential fields to every active image relation; reports WaitingStatus until a UUID arrives, ActiveStatus otherwise; explicitly excludes the breaking relation from writes and status checks during relation_broken - charm_state.py: add IMAGE_RELATION_NAME constant and image_id field on CharmState, populated from the provider's unit relation data - unit tests (23): credential forwarding, invalid-config guard, Waiting/Active status transitions, relation_broken exclusion - integration tests: any-charm fake image builder writes a synthetic UUID on relation_joined; test polls show-unit from both sides to verify all six credential fields (including password) and the UUID
4277973 to
e8f4b8c
Compare
cbartz
commented
Jun 3, 2026
| self.on[IMAGE_RELATION_NAME].relation_changed, | ||
| self.on[IMAGE_RELATION_NAME].relation_broken, | ||
| ]: | ||
| self.framework.observe(event, self._reconcile) |
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.
What this PR does
Wires the
garm-configuratorcharm to thegithub-runner-image-builder-operatorvia thegithub_runner_image_v0relation. The configurator forwards its OpenStack credentials to the image builder and waits for the resulting image UUID before reporting Active.Why we need it
ISD-5735: the image UUID needs to flow automatically into the scaleset configuration sent to GARM, rather than being set manually.
Test plan
Unit tests cover the credential forwarding and status transitions. Integration tests deploy a fake image builder via
any-charmand verify the full credential + UUID handshake end-to-end against a real Juju/microk8s environment.Checklist
CONTRIBUTING.mdhas been updated upon changes to the contribution/development processdocs/changelog.mdwith user-relevant changestest_garm_configurator.pyalready covered