← Back to issue list

project: catch parent YAML exceptions

View original Github issue

Metadata

Project
snapcraft
Number
#2263
Type
pull request
State
merged
Author
kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #2263 as commit 057f66649, broadening ProjectInfo YAML exception handling to prevent parser tracebacks and fix LP #1792049.

Resolution: closed resolved

Reason: The merged change catches MarkedYAMLError and ReaderError explicitly, with YAMLError as a fallback, resolving the parsing failures tracked by LP #1792049.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh tests/unit`? ----- Currently `ProjectInfo` is pretty granular with the YAML exceptions it catches. There is no need for this since most of them inherit from `MarkedYAMLError` anyway, and it means we're constantly playing a game of whack-a-mole as new YAML exceptions are discovered. This PR fixes [LP: #1792049](https://bugs.launchpad.net/snapcraft/+bug/1792049) by catching `MarkedYAMLError`s and `ReaderError`s explicitly, and finally fall back to catching a `YAMLError` to avoid these tracebacks in the future.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #2263 as commit 057f66649, broadening ProjectInfo YAML exception handling to prevent parser tracebacks and fix LP #1792049.
stealth/space-bunny-alpha — closed resolved Merged PR #2263 as commit 057f66649, broadening ProjectInfo YAML error handling to prevent parser tracebacks and fix LP #1792049.
stealth/space-bunny-alpha — closed resolved Merged in snapcore/snapcraft#2263 (commit 057f66649), broadening ProjectInfo YAML exception handling to prevent parser tracebacks and fix LP #1792049.
qwen/qwen3.6-35b-a3b — — Merged update to ProjectInfo catches parent MarkedYAMLError, ReaderError, and YAMLError classes instead of granular exceptions. Prevents future tracebacks and resolves Launchpad bug #1792049. Approved and passed CI.
qwen3.6-35b-a3b-mtp-q6 — — Merged updates to ProjectInfo that catch parent YAML exceptions (MarkedYAMLError, ReaderError, YAMLError) instead of granular types. This prevents unhandled tracebacks from new YAML errors and resolves LP: #1792049.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.