← Back to issue list

Parse and validate namespaced partitions

View original Github issue

Metadata

Project
craft-parts
Number
#595
Type
issue
State
closed
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Namespaced-partition validation was completed via merged PR #599, commit 06a5f999, with dedicated validation errors and unit tests.

Resolution: closed resolved

Reason: PR #599 was merged as commit 06a5f999 and implemented validation for namespaced partitions, including format checks and dedicated errors. The issue was explicitly closed via PR #599.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done The LifecycleManager needs to parse and validate namespaced partitions. Namespaces can only contain lowercase alphabetical characters. Namespaced partitions can contain lowercase alphabetical characters and hyphens. They cannot start or end with a hyphen. A new error will inform the user of invalid namespaced partitions. This means a single regex check will not be sufficient. #### Existing error - invalid partition This error already exists: ``` Partition 'test!' must only contain lowercase letters. ``` #### New error - invalid namespaced partition This error occurs when a namespaced partitions contains invalid characters. ``` Namespaced partition 'test!/foo' is invalid. Namespaced partitions are formatted as `<namespace>/<partition>`. Namespaces must only contain lowercase letters. Nmespaced partitions must only contain lowercase letters and hyphens and cannot start or end with a hyphen. ``` Unit tests only, no integration tests will be written for this task. ### Why it needs to get done To support components in snapcraft

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Namespaced-partition validation was completed via merged PR #599, commit 06a5f999, with dedicated validation errors and unit tests.
stealth/space-bunny-alpha — closed resolved Namespaced partition parsing and validation landed in craft-parts PR #599 (commit 06a5f999), with dedicated validation errors and unit tests.
qwen/qwen3.6-35b-a3b — — Fixed by implementing parsing and validation for namespaced partitions in LifecycleManager. Added error handling for invalid namespaces and partitions, enforcing lowercase letter and hyphen constraints. Resolved via merged pull request #599.
qwen/qwen3.6-35b-a3b — — Implemented parsing and validation for namespaced partitions in LifecycleManager, enforcing lowercase letter and hyphen rules with dedicated error messages. Covered by unit tests. Closed via pull request #599.
qwen/qwen3.6-35b-a3b — — Implemented parsing and validation for namespaced partitions in LifecycleManager, enforcing lowercase letters and hyphen rules with custom error messages. Resolved via pull request #599.
qwen3.6-35b-a3b-mtp-q6 — — Implemented parsing and validation for namespaced partitions in LifecycleManager, enforcing lowercase letter and hyphen rules with dedicated error messages. Resolved via unit tests and closed via pull request #599.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/craft-parts#599 (confidence 100%)

    Merged namespaced-partition validation implementation referenced by the closing comment.

Related issues

Issue Project State Summary Similarity
#599 feat(partitions): validate namespaced partitions craft-parts merged Merged PR #599 as commit 06a5f999, adding namespaced partition validation during LifecycleManager initialization and fixing #595 (CRAFT-2032).
80%
#596 Handle namespaced partitions in utility functions craft-parts closed Namespaced partition handling was implemented and tested by merged PR #600 (commit f387afa5), updating the four path and directory utility functions.
76%
#598 Add integration tests for namespaced partitions craft-parts open Namespaced-partition integration coverage remains missing after parsing, utility, and environment-variable work landed; the maintainer also identified the misuse-warning path as an untested TODO.
74%
#600 feat(partitions): handle namespaced partitions in utils craft-parts merged Merged into main in commit f387afa5 (PR #600), adding namespaced-partition handling to four partition utilities and resolving craft-parts#596.
72%