← Back to issue list

package repositories: improve error handling

View original Github issue

Metadata

Project
snapcraft
Number
#3334
Type
pull request
State
merged
Author
cjp256
Labels
Created
Updated
Closed

Current evaluation

Improves package repository error handling by introducing PackageRepositoriesValidationError to replace generic RuntimeErrors. Adds checks for empty URLs, PPAs, suites, and components. Approved and merged after passing CI.

Suggested action:

No scores available.

Issue body

- Create PackageRepositoriesValidationError for errors pointing user to documentation page for package-repositories. - Convert all validation RuntimeErrors to PackageRepositoriesValidationError. - Add some trivial checks/handling for empty string url and ppa. - Add trivial check for empty suites/components. Signed-off-by: Chris Patterson <chris.patterson@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Improves package repository error handling by introducing PackageRepositoriesValidationError to replace generic RuntimeErrors. Adds checks for empty URLs, PPAs, suites, and components. Approved and merged after passing CI.
qwen3.6-35b-a3b-mtp-q6 Merged package repository error handling improvements. Replaced generic RuntimeErrors with PackageRepositoriesValidationError, added empty string checks for URLs, PPAs, suites, and components, and refactored validation across initialization, unmarshaling, and a dedicated validate method.
qwen3.6-35b-a3b-mtp-q6 Merged. Replaced RuntimeErrors with PackageRepositoriesValidationError for package repositories. Added checks for empty URLs, PPAs, suites, and components. Refactored validation across init, unmarshal, and a dedicated validate method.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3276 meta: add suite/component validation checks for package-repositories snapcraft closed Closed without merging. The validation checks for package-repositories were abandoned due to lack of reviewer engagement and CI verification.
70%