fix: only precreate content plug targets
Metadata
Current evaluation
Merged #6222 as 333ac0e0b, limiting plug-target precreation to content plugs so plug definitions containing only private: true no longer error.
Resolution: closed resolved
Reason: PR #6222 was merged as commit 333ac0e0b. The change filters plug targets to content plugs and prevents access errors for non-content plug definitions.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Fixes an issue where certain plug formats (such as the one below) would cause an error during the precreation of plug targets.
```yaml
plugs:
my-plug:
private: true
```
---
- [ ] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md).
- [ ] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [ ] 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.
- [ ] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #6222 as 333ac0e0b, limiting plug-target precreation to content plugs so plug definitions containing only private: true no longer error. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #6222 as 333ac0e0b, restricting precreation to content plug targets and preventing errors for plug definitions containing only private: true. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix preventing errors during plug target precreation for specific formats like private plugs. Approved by two reviewers and integrated with 29 additions and 6 deletions across two files, resolving the reported issue. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix resolving an error during plug target precreation caused by specific plug formats like private: true. The change restricts precreation to valid targets, preventing runtime failures. |
Update history
No update history recorded yet.
Related work
-
Caused By:
canonical/snapcraft#6199
(confidence 90%)
This earlier change introduced pack-time plug and layout target precreation that exposed the failure.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3874 meta: fix content plug detection | snapcraft | merged | Merged PR #3874 in commit b962783c1, allowing empty content plug/slot definitions and deferring type validation until snap packaging. |