← 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

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.

Suggested action:

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
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 issues

Issue Project State Summary Similarity
#599 feat(partitions): validate namespaced partitions craft-parts merged Validates namespaced partitions during LifecycleManager initialization, resolving issue #595. Merged after approval by two reviewers, adding 248 lines and removing 22 across five files.
84%
#489 partitions: add feature and validation craft-parts merged Merged. Implements the partitions feature and validation for LifecycleManager, adding a new parameter, input validation, error handling, and integration tests. Approved by two reviewers and passed CI checks.
72%