chore: refactor provider config reconciliation#240
Open
yanksyoon wants to merge 13 commits into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ation databag Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…armState Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rator relation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…efer Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… error The function was imported via 'from charms.tests.integration.conftest import ...' which fails collection (ModuleNotFoundError: No module named 'charms'). Move the function directly into test_garm.py where it is used. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… client Refactor garm_api.py, scaleset_reconciler.py, and related charm/test code to use the generated garm_client OpenAPI client from main instead of the hand-written urllib wrapper. Key changes: - Extend GarmApiClient (main) with login() using generated LoginApi - Add GarmAuthenticatedClient for scaleset/provider/org/repo operations - Remove credentials_name from ScalesetSpec (not in GARM scaleset API) - Rename image_id -> image in ScalesetSpec (matches GARM API field name) - Add entity_type/entity_name to ScalesetSpec for org/repo scoped creation - Reconciler now calls create_org_scaleset/create_repo_scaleset - Reconciler defers on missing provider OR entity (org/repo not in GARM) - GARM charm uses GARM_ADMIN_CREDENTIALS_LABEL (separate secret) for creds - Configurator writes org/repo fields to relation databag - All unit tests updated for new API design (99 passing) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cbartz
approved these changes
Jun 17, 2026
cbartz
reviewed
Jun 17, 2026
| if previous_hash == new_hash: | ||
| logger.debug("TOML config unchanged; skipping restart") | ||
| return | ||
| return new_hash |
Collaborator
There was a problem hiding this comment.
the l439 is no longer true - we no longer skip restart (restart is in l401)
yhaliaw
approved these changes
Jun 18, 2026
| self.unit.status = ops.WaitingStatus("Waiting for postgresql relation") | ||
| return | ||
|
|
||
Collaborator
There was a problem hiding this comment.
nitpick: remove the whitespace.
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
Why we need it
Checklist
CONTRIBUTING.mdhas been updated upon changes to the contribution/development process (e.g. changes to the way tests are run)docs/changelog.mdwith user-relevant changes(e.g., in
.github/workflows/integration_tests.yaml, ensure themoduleslist is correct)terraform fmtpasses andtflintreports no errors