canonical / canonical/craft-application

YAML loading either needs simplification or better testing

Open
#24 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
14
Forks
29
Avg merge
2d 3h
Merged PRs (30d)
12

Description

See [this comment thread](https://github.com/canonical/craft-application/pull/20/files/88c186c8a772c0ad8f5a8cfeb8fe84d352729111#diff-e1faa3a7dda894734ce22e2d235c8e3a1fd7e0ad2ae234fff07ed0fe131af6d3).

The modifications made to the YAML loader may be more than is needed with the latest pyyaml, but I'm not confident enough to say so. If the questioned `except` clause is needed, we should have a test for it that has it raise that error, as right now the loader fails with the same issue before it gets to the dict constructor.

Contributor guide

Open the contributing guide

Research direction

Start by reading the YAML loader changes in the linked pull-request diff and trace the failing path described in the issue. Determine whether the questioned exception handling is still needed with the current PyYAML behavior, then add a test that exercises the relevant error before the dictionary construction. Done means the loader is simplified or the behavior is covered by a focused test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.