← Back to issue list

feat!(platform): add reserved platform names

View original Github issue

Metadata

Project
craft-application
Number
#936
Type
pull request
State
merged
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #936 (commit b534c8a8) adding RESERVED_PLATFORM_NAMES in craft_application/models/platforms.py, blocking '*' and 'any'; fixes #890 (CRAFT-4747). Includes ruff 0.14.0 bump.

Resolution: closed resolved

Reason: PR #936 was approved by 3 reviewers, passed all CI checks and merged as commit b534c8a8 in craft-application. The change lands in craft_application/models/platforms.py, defining a RESERVED_PLATFORM_NAMES frozenset ('any', '*') enforced by _validate_platform_name with unit tests, fixing issue #890 (CRAFT-4747).

Evaluated by: mr-cal-bot

No scores available.

Issue body

This makes `*` and `any` reserved (unusable) platform names and allows for the creation of additional reserved platform names. Drive-by: upgrade ruff pre-commit to 0.14.0 Signed-off-by: Alex Lowe <alex.lowe@canonical.com> Requires: #935 Fixes: #890 CRAFT-4747 - [x] Have you followed the guidelines for contributing? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint && make test`? - [x] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? ---

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #936 (commit b534c8a8) adding RESERVED_PLATFORM_NAMES in craft_application/models/platforms.py, blocking '*' and 'any'; fixes #890 (CRAFT-4747). Includes ruff 0.14.0 bump.
stealth/space-bunny-alpha — closed resolved Merged PR reserved * and any as platform names, added support for further reserved names, and upgraded ruff pre-commit to 0.14.0 (CRAFT-4747).
qwen/qwen3.6-35b-a3b — — Merged. Reserves * and any as platform names and establishes a framework for additional reserved names. Approved by three reviewers with all CI checks passing. A proposed character domain restriction was deferred to future work.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-application#890 (confidence 98%)

    Issue explicitly listed as 'Fixes: #890 CRAFT-4747' — "any" is an invalid platform name; previously closed with only Jira follow-up.

  • Blocked By: canonical/craft-application#935 (confidence 70%)

    PR body states 'Requires: #935', a prerequisite merged before this change.

  • Related To: canonical/craft-platforms#166 (confidence 45%)

    Companion craft-platforms issue for the same 'any' platform name problem, closed unresolved with the change deferred.

Related issues

Issue Project State Summary Similarity
#947 feat!(platforms): prevent use of '/' in platform names craft-application merged Merged PR #947 as commit f7f3b1ff, adding validation that rejects platform names containing "/" and fixing #941 (CRAFT-4876).
80%
#176 feat!(platform): make 'any' and '*' invalid platform names craft-platforms merged Merged #176 as commit 62631bd, rejecting 'any' and '*' as platform names and adding reusable reserved-name handling; fixes #166.
78%
#84 fix: do not strip base from platform names craft-platforms merged Merged PR #84 via commit 7680af2: shorthand platform names now retain their base, preventing duplicate BuildInfo names required by craft-application.
72%
#209 feat: validate platform names craft-platforms merged Merged PR #209 (commit 2a92a08): get_build_plan now validates platform names and a new craft_platforms.validators/platform_types module offers validation helpers. Shipped in craft-platforms 0.11.0.
72%
#2590 docs: add platform naming rules charmcraft merged PR #2590 by lengau was approved by two reviewers and merged into main as commit 3313a280, adding craft-application's platform naming rules to docs/reference/platforms.rst (docs-only, +49/-13).
71%
#735 feat(models): make the Platforms schema and processing work the same craft-application merged Merged #735 in commit 6efd2941, adding generic platform dictionaries so Pydantic/JSON schemas match platform processing; it fixes #688 (CRAFT-4421).
70%
#6092 docs(reference): add platform naming rules snapcraft merged Merged platform naming rules into the reference docs and bumped craft-application; the related lint fix was handled in canonical/craft-application#1023 (commit 83c5b7d4e).
70%