docs: align example charms with pre-release Charmcraft#2444
docs: align example charms with pre-release Charmcraft#2444
Conversation
Agent-Logs-Url: https://github.com/canonical/operator/sessions/98864d5d-9617-408f-855d-eca2fb3fdcbb Co-authored-by: dwilding <1141260+dwilding@users.noreply.github.com>
dwilding
left a comment
There was a problem hiding this comment.
Please review the dependency bumps in canonical/charmcraft#2653. We need to make sure these are also reflected in the example charms.
Agent-Logs-Url: https://github.com/canonical/operator/sessions/3e084487-8965-48e7-8117-1d1b0ac0b342 Co-authored-by: dwilding <1141260+dwilding@users.noreply.github.com>
Updated in commit |
dwilding
left a comment
There was a problem hiding this comment.
Please keep the copyright notices as-is. This is one aspect where we can deviate from what is generated by Charmcraft.
Agent-Logs-Url: https://github.com/canonical/operator/sessions/1cc24fff-2556-4330-990f-a716a1d1b737 Co-authored-by: dwilding <1141260+dwilding@users.noreply.github.com>
Done in |
james-garner-canonical
left a comment
There was a problem hiding this comment.
Looks good, thanks David.
| To use the profile versions used in the tutorial, initialise a charm using `charmcraft` directly from Github, like this: | ||
| ``` | ||
| uvx git+https://github.com/canonical/charmcraft@460e8df init --profile kubernetes | ||
| uvx git+https://github.com/canonical/charmcraft@fae9862 init --profile kubernetes |
There was a problem hiding this comment.
This is the hash of the latest profile update in charmcraft main.
dwilding
left a comment
There was a problem hiding this comment.
Please review the K8s example charms against https://github.com/canonical/charmcraft-profile-tools/tree/main/kubernetes (which was generated from Charmcraft). Specifically compare test_charm.py for the integration tests. There should be at least one difference we need to reflect in the example charms.
Please do the same of the machine charm - compare against https://github.com/canonical/charmcraft-profile-tools/tree/main/machine.
If you find changes, please check the .md source of the tutorials to see if anything needs updating for consistency.
…ration tests Agent-Logs-Url: https://github.com/canonical/operator/sessions/6bb8077b-a4d8-4bc3-ba4e-90ad9ca8f5a8 Co-authored-by: dwilding <1141260+dwilding@users.noreply.github.com>
Agent-Logs-Url: https://github.com/canonical/operator/sessions/6bb8077b-a4d8-4bc3-ba4e-90ad9ca8f5a8 Co-authored-by: dwilding <1141260+dwilding@users.noreply.github.com>
Agent-Logs-Url: https://github.com/canonical/operator/sessions/6bb8077b-a4d8-4bc3-ba4e-90ad9ca8f5a8 Co-authored-by: dwilding <1141260+dwilding@users.noreply.github.com>
Agent-Logs-Url: https://github.com/canonical/operator/sessions/6bb8077b-a4d8-4bc3-ba4e-90ad9ca8f5a8 Co-authored-by: dwilding <1141260+dwilding@users.noreply.github.com>
Done in |
|
Thanks @james-garner-canonical! I just tried to get clever and ask Copilot to sync one other inconsistency found in #2440. But it didn't catch that inconsistency and started making unwanted changes. I've reverted its work, so that things stand as you reviewed them. This is enough for one PR. |
We've been making a lot of changes to the example charms and corresponding Charmcraft profiles recently. The latest change to the profiles is canonical/charmcraft#2653, which bumps development deps in
uv.lock.I asked Copilot to regenerate the charms from Charmcraft and compare against our example charms. It found a couple of things that need syncing:
charmfixture for integration tests needs to use the new style, similar to our pytest-operator migration guide.pyproject.toml. This doesn't apply to thek8s-5-observecharm; I already did it in #2411.opsdependency needs updating inpyproject.toml.Copilot also updated all the
uv.lockfiles to matchpyproject.tomland bump the development deps. I was hesitant about this at first, but inspecting the agent session, Copilot did runuv lock --upgrade-package ...rather than hacking onuv.lock. So I'm happy to approve this. I also did some spot checks on the lockfile changes.Follow-up review syncs in this PR:
conftest.pyfiles (includingCanonical Ltd.wording and original year where applicable), rather than adopting generated header text.test_charm.pyfiles againstcharmcraft-profile-tools(kubernetesandmachine) and restored the scaffolded skipped workload-version test ink8s-1-minimalandk8s-2-configurableto match expected profile shape while keeping tutorial-specific app/resource values..mdsources for consistency after these test updates; no tutorial content changes were required.None of these charm changes affect anything that's shown in the tutorials.
I'm updating the tips in the tutorials about using Charmcraft from a commit hash: I bumped the commit hash now that canonical/charmcraft#2653 has merged.