Skip to content

Yaml parser (New)#2383

Open
Hook25 wants to merge 35 commits intomainfrom
yaml_parser
Open

Yaml parser (New)#2383
Hook25 wants to merge 35 commits intomainfrom
yaml_parser

Conversation

@Hook25
Copy link
Collaborator

@Hook25 Hook25 commented Mar 12, 2026

Description

PXUs are a very outdated and weird format that scares off new contributors and makes the friction to contribute to Checkbox higher.

This PR introduces a new supported format: YAML

To begin with this transition, this translates all the pxus in Checkbox (plainbox provider) + all the pxus in metabox. The translation of the rest of the providers will be done and tested gradually in followup PRs.

Resolved issues

Fixes: CHECKBOX-1392

Documentation

N/A (Pending)

Tests

Unit + integration tested most of the additions

@Hook25 Hook25 marked this pull request as draft March 12, 2026 14:50
@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 88.07692% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.29%. Comparing base (3f533aa) to head (644bcde).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
checkbox-ng/plainbox/impl/secure/providers/v1.py 81.42% 9 Missing and 4 partials ⚠️
checkbox-ng/plainbox/impl/unit/testplan.py 71.42% 5 Missing and 3 partials ⚠️
checkbox-ng/plainbox/impl/session/state.py 81.81% 2 Missing and 2 partials ⚠️
checkbox-ng/plainbox/impl/unit/__init__.py 93.54% 1 Missing and 1 partial ⚠️
checkbox-ng/plainbox/impl/unit/job.py 86.66% 1 Missing and 1 partial ⚠️
checkbox-ng/plainbox/impl/xparsers.py 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2383      +/-   ##
==========================================
+ Coverage   57.76%   58.29%   +0.52%     
==========================================
  Files         467      476       +9     
  Lines       47299    48262     +963     
  Branches     8419     8613     +194     
==========================================
+ Hits        27321    28133     +812     
- Misses      19092    19242     +150     
- Partials      886      887       +1     
Flag Coverage Δ
checkbox-ng 76.02% <88.07%> (+0.34%) ⬆️
checkbox-support 66.84% <ø> (ø)
provider-base 32.63% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Hook25 Hook25 force-pushed the yaml_parser branch 3 times, most recently from f5627e0 to 5d65942 Compare March 17, 2026 08:13
Hook25 added 6 commits March 19, 2026 15:00
Minor: raise an exception instead of assert
flags weren't correctly treatedfor manual after suspend jobs because I
didn't notice them. Now the code is unique so it is easier to make
changes for both
@Hook25 Hook25 marked this pull request as ready for review March 19, 2026 16:00
Copy link
Collaborator

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!
If at some point we want to hard deprecate the .pxu files and clean the code, it's not going to be a super easy task, but at least all the markers you are putting for the comments will help.
Thanks for also taking care of handling properly the suspend flags, and especially the get_array_field_qualify and all the Visitors.
I run the smoke tests from the yaml and they passed no problem.
Let's see if the translated metabox tests also pass in the CI.

self.assertEqual(self.validator(self.variable, name), None)

def test_yearless_namespace_work(self):
name = "com.canonical:certification"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not from this PR, but this test doesn't do anything

@fernando79513
Copy link
Collaborator

I manually ran some YAML jobs and test/plans, and they worked fine. I think any other issues that may have slipped through should be raised during metabox tests.
I didn't find any flaw in the actual implementation either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants