feat(profile): add example action to kubernetes and machine init profiles
Metadata
Current evaluation
Merged PR #2813, adding example pause/resume actions for machine charms and restart for Kubernetes charms to the charmcraft init profiles, complete with unit and integration tests.
Resolution: closed resolved
Reason: The pull request was merged, adding example lifecycle actions (pause/resume for machine, restart for Kubernetes) to the charmcraft init profiles along with corresponding tests.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Extends both the `kubernetes` and `machine` profiles so that `charmcraft init` scaffolds a working example action alongside the existing lifecycle hook code, with unit and integration tests for it.
The profile is a strong signal to human and agentic charmers for best practices. Including an example of an action is concrete input without needing the charmer to go find documentation, or have that in training data (human or model).
The actions here were chosen from what charms in the wild actually declare, rather than invented. Across ~400 charms that declare actions, `pause`/`resume` is by a wide margin the most common pair in machine charms, and `restart` is the most common workload-lifecycle action in Kubernetes charms once the copy-paste families are discounted.
### Changes
Both profiles in `charmcraft.yaml.j2`:
Adds an `actions:` block with links to the charmcraft and Juju reference docs, matching the style of the existing `config:` block.
In the `machine` profile, `pause` and `resume`:
`pause` stops the workload and leaves the unit deployed in maintenance status, so an operator can take a unit out of service without removing it; `resume` starts it again. `src/workload.py.j2` gains a `stop()` stub alongside the existing `install()` and `start()`.
In the `kubernetes` profile, `restart`:
Restarts the Pebble service in the workload container, waits for the workload to be ready, and sets the unit active again.
---
- [x] I've followed the [contribution guidelines](https://github.com/canonical/charmcraft/blob/main/CONTRIBUTING.md).
- [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [x] I've successfully run `make lint && make test`.
- [ ] ~I've added or updated any relevant documentation.~
- [ ] ~In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing.~
- [x] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | closed resolved | Merged PR #2813, adding example pause/resume actions for machine charms and restart for Kubernetes charms to the charmcraft init profiles, complete with unit and integration tests. | |
| ~deepseek/deepseek-pro-latest |
Impact:
50
Quick Win:
18
Complexity:
40
Confidence:
70
Actionability:
60
|
needs review | Adds example actions to kubernetes and machine init profiles: pause/resume for machine, restart for kubernetes, with workload stubs and tests. Approved by 4 reviewers, but CI has failures and one unresolved comment. | |
| ~deepseek/deepseek-pro-latest |
Impact:
45
Quick Win:
16
Complexity:
35
Confidence:
70
Actionability:
55
|
needs review | Adds example actions (pause/resume for machine, restart for kubernetes) to init profile templates with tests. Approved by 4 reviewers, but CI is failing and one review comment remains unresolved. | |
| stealth/space-bunny-alpha |
Impact:
43
Quick Win:
15
Complexity:
39
Confidence:
88
Actionability:
58
|
needs review | Adds tested pause/resume and restart action examples to the machine and Kubernetes init scaffolds; four reviewers approved it, but lint/files and OSV checks fail and several CI jobs remain pending. | |
| stealth/space-bunny-alpha |
Impact:
55
Quick Win:
15
Complexity:
46
Confidence:
91
Actionability:
50
|
needs review | Adds scaffolded pause/resume actions for machine charms and a restart action for Kubernetes charms, with tests and release notes; approved by four reviewers but still has one unresolved comment, failing lint/OSV checks, and pending suites. | |
| stealth/space-bunny-alpha |
Impact:
55
Quick Win:
19
Complexity:
45
Confidence:
94
Actionability:
62
|
needs review | Adds restart and pause/resume example actions to Kubernetes and machine init profiles with tests and release notes; approved by four reviewers, but OSV-scanner fails and several checks remain pending. | |
| stealth/space-bunny-alpha |
Impact:
50
Quick Win:
23
Complexity:
35
Confidence:
70
Actionability:
70
|
needs review | Scaffolds example actions (pause/resume for machine, restart for Kubernetes) in the charmcraft init profiles, with unit/integration tests and release notes. Approved by 4 reviewers; OSV-scanner failing, slow/spread checks still pending, awaiting maintainer go-ahead. | |
| stealth/space-bunny-alpha |
Impact:
45
Quick Win:
25
Complexity:
30
Confidence:
78
Actionability:
78
|
needs review | Adds example actions (pause/resume for machine, restart for kubernetes) plus charmcraft.yaml actions blocks, workload stop() stub, and unit/integration tests to the charmcraft init profiles. Approved by 4 reviewers; OSV-scanner failing, slow/snap tests still pending. | |
| stealth/space-bunny-alpha |
Impact:
45
Quick Win:
17
Complexity:
40
Confidence:
84
Actionability:
64
|
needs review | Adds pause/resume actions to machine and restart to Kubernetes init profiles, with workload stubs and tests; four reviewers approved it, but one review thread and three CI checks remain unresolved. | |
| stealth/space-bunny-alpha |
Impact:
57
Quick Win:
18
Complexity:
46
Confidence:
88
Actionability:
58
|
needs review | Adds tested pause/resume and restart action scaffolds to Charmcraft's Kubernetes and machine init profiles; approved by four reviewers, but lint and OSV checks fail and one review thread remains unresolved. | |
| stealth/space-bunny-alpha |
Impact:
42
Quick Win:
13
Complexity:
46
Confidence:
68
Actionability:
57
|
needs review | Adds a scaffolded example action (pause/resume for machine, restart for Kubernetes) to the charmcraft init profiles, with template, src, unit and spread test, and release-note changes. Approved by 4 reviewers, 1 thread open, lint/files and OSV checks failing, slow tests pending. | |
| stealth/space-bunny-alpha |
Impact:
46
Quick Win:
18
Complexity:
43
Confidence:
82
Actionability:
67
|
needs review | Adds pause/resume actions to the machine profile and restart to Kubernetes, with unit and integration coverage. Four approvals received; OSV-scanner is failing and snap-build/spread checks remain pending. | |
| qwen/qwen3.6-35b-a3b |
Impact:
50
Quick Win:
38
Staleness:
5
Complexity:
25
Confidence:
85
|
needs review | Adds example pause/resume actions to machine profile and restart action to kubernetes profile in charmcraft init templates. Approved by 4 reviewers, CI passing, 1 unresolved review comment. | |
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
45
Quick Win:
34
Staleness:
45
Complexity:
25
Confidence:
75
|
needs review | Adds example actions (pause/resume for machine, restart for kubernetes) to init profiles with unit and integration tests. Approved by 4 reviewers with 1 unresolved comment and failing CI checks. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
30
Confidence:
80
|
needs review | Adds example pause/resume/restart actions to kubernetes and machine init profiles with tests. Approved by 4 reviewers, 1 unresolved comment, and CI has failing snap-build/test checks. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
45
Complexity:
40
Confidence:
85
|
needs review | Adds example pause and resume actions for machine charms and restart for Kubernetes charms to charmcraft init profiles, including tests. Currently approved by three reviewers with one unresolved comment and pending CI checks. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
15
Complexity:
45
Confidence:
85
|
needs review | Adds example pause/resume and restart actions to kubernetes and machine init profiles in charmcraft, including scaffolding code and tests. Approved by 3 reviewers with mostly passing CI. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
30
Confidence:
90
|
needs review | Adds example pause/resume/restart actions to kubernetes and machine init profiles with tests. Approved by 2 reviewers, 1 unresolved comment, CI pending slow tests. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
15
Complexity:
25
Confidence:
85
|
needs review | Adds example pause/resume actions to machine profiles and restart to kubernetes profiles in charmcraft init. Includes tests and doc links. Currently approved by two reviewers, has one unresolved comment, and is awaiting CI fixes. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
15
Complexity:
40
Confidence:
85
|
needs review | Adds example pause/resume/restart actions to kubernetes and machine init profiles with tests. Approved by 2 reviewers, 4 unresolved comments, CI mostly passing except minimum dependencies test. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
30
Complexity:
40
Confidence:
85
|
needs review | Adds example lifecycle actions to charmcraft init profiles for machine and kubernetes, including tests and workload stubs. Currently approved by two reviewers but has four unresolved comments and a failing minimum dependencies CI check. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
15
Complexity:
35
Confidence:
85
|
needs review | Adds example pause/resume and restart actions to kubernetes and machine init profiles in charmcraft, including tests. Currently approved by 2 reviewers with 4 unresolved comments, pending CI completion. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
20
Complexity:
40
Confidence:
85
|
needs review | Adds example pause/resume and restart actions to kubernetes and machine init profiles with tests. Approved by 2 reviewers but has 4 unresolved comments and pending CI checks. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
15
Complexity:
25
Confidence:
90
|
needs review | Adds example pause/resume actions to machine and restart to kubernetes init profiles, including tests and workload stubs. Approved by two reviewers, pending CI and 4 unresolved comments. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
30
Confidence:
85
|
needs review | Adds example pause/resume and restart actions to machine and kubernetes init profiles with tests. Approved by two reviewers but has 14 unresolved comments and failing CI checks for snap-build and lint. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
25
Complexity:
20
Confidence:
85
|
needs review | Adds example lifecycle actions (pause/resume for machine, restart for k8s) to charmcraft init profiles with tests. Approved by one reviewer but has 13 unresolved comments and failing CI checks for snap-build and lint. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
20
Confidence:
90
|
needs review | Extends kubernetes and machine init profiles with example pause/resume and restart actions, including tests and workload stubs. Awaiting maintainer review with minor CI failures on snap-build and lint. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
5
Complexity:
20
Confidence:
90
|
needs review | Adds example pause/resume and restart actions to kubernetes and machine init profiles, including tests and documentation links. Currently awaiting maintainer review with CI tests pending. |
Update history
| Date | Change |
|---|---|
| merged | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2401 feat(test): add testing profiles for init command | charmcraft | merged | Merged PR #2401 as commit a7334d49, adding test-machine and test-kubernetes init profiles for charmcraft test; the feature shipped in Charmcraft 4.0. | |
| #2814 feat(profile): add secrets handling to kubernetes and machine init profiles | charmcraft | closed | Merged as 5888db42, adding Juju secrets handling to Charmcraft's Kubernetes and machine init profiles, including observed/app-managed secrets, rotation, expiry, and tests. |