feat: scaffold garm-configurator charm (ISD-5732)#209
Open
florentianayuwono wants to merge 8 commits into
Open
feat: scaffold garm-configurator charm (ISD-5732)#209florentianayuwono wants to merge 8 commits into
florentianayuwono wants to merge 8 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Charm deploys and reaches Active state with no relations or config. Uses ops-scenario for unit testing. 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>
Collaborator
Author
florentianayuwono
left a comment
There was a problem hiding this comment.
review session from weii
- Add missing parts section to charmcraft.yaml (fixes charmcraft validation error requiring at least 1 part) - Replace pyright with mypy in pyproject.toml and tox.toml, matching platform-engineering-charm-template config - Keep ubuntu@24.04 base; ubuntu@26.04 is not yet in charmcraft's supported bases (22.04, 24.04, 24.10, 25.04) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Expand ruff lint.select to include A, B, CPY, I, RUF, S, SIM, TC, UP - Align lint.ignore with template - Add lint.flake8-copyright, lint.pydocstyle.convention, target-version - Add pythonpath to pytest options - Expand codespell skip list - Add [tool.bandit] config and bandit to static tox env Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
yanksyoon
approved these changes
May 22, 2026
Member
yanksyoon
left a comment
There was a problem hiding this comment.
LGTM! Thanks @florentianayuwono !
Contributor
There was a problem hiding this comment.
Pull request overview
This PR scaffolds a new Kubernetes charm, garm-configurator, intended to deploy standalone and immediately report ActiveStatus("Ready"), and wires it into the repo’s CI/unit/integration testing setup.
Changes:
- Adds
charms/garm-configurator/with a minimalops.CharmBaseimplementation that sets unit status viacollect_unit_status. - Adds unit tests for the charm using
ops-scenarioand an integration test validating the charm becomes Active when deployed standalone. - Adds a dedicated tox integration environment and includes the new charm in the GitHub Actions charm lint/unit test matrix.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tox.ini | Adds a dedicated garm-configurator-integration tox environment to run the new integration test. |
| charms/tests/integration/test_garm_configurator.py | New integration test that deploys the charm and asserts it becomes Active. |
| charms/garm-configurator/src/charm.py | Implements the minimal charm logic (sets ActiveStatus("Ready") via collect_unit_status). |
| charms/garm-configurator/tests/unit/test_charm.py | Adds ops-scenario unit tests covering install/config-changed/collect-unit-status. |
| charms/garm-configurator/tox.toml | Adds charm-local lint/static/unit/coverage tox configuration. |
| charms/garm-configurator/pyproject.toml | Configures ruff/codespell/mypy/bandit/pytest/coverage for the new charm. |
| charms/garm-configurator/requirements.txt | Pins ops==3.7.0 for the new charm. |
| charms/garm-configurator/charmcraft.yaml | Defines charmcraft build metadata for the new charm. |
| .github/workflows/charms_lint_and_unit.yaml | Adds charms/garm-configurator to the CI matrix. |
| if not charm: | ||
| return None | ||
| if len(charm) > 1: | ||
| configurator_charms = [f for f in charm if "configurator" in f] |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Summary
charms/garm-configurator/— a minimal K8Sops.CharmBasecharm with no container, no relations, and no config optionsActiveStatus("Ready")viacollect_unit_status, reaching Active immediately on deployops-scenario(Context/State API) — 3 tests covering install, config-changed, and collect-unit-status eventsjubilantgarm-configurator-integrationtox env intox.iniand adds charm to CI lint/unit matrixAcceptance Criteria
Test Plan
tox -c tox.tomlfromcharms/garm-configurator/— all environments passtox -e garm-configurator-integration -- --charm-file=<built.charm>on a live K8S Juju modelNotes
ops==3.7.0does not includeContext/Stateinops.testing— these live in the separateops-scenario==8.7.0package (from scenario import Context, State).