Open
Conversation
Minor: drop unit key ordering, it is not the role of a translator and it breaks comments
Minor: clarify why assertion may blow up translator
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (87.86%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2316 +/- ##
==========================================
+ Coverage 55.24% 55.41% +0.17%
==========================================
Files 413 414 +1
Lines 44448 44675 +227
Branches 8194 8259 +65
==========================================
+ Hits 24556 24758 +202
- Misses 19032 19045 +13
- Partials 860 872 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a289b1d to
bb9e0f4
Compare
These fields are not supposed to be changed, must be transferred over as is
bb9e0f4 to
301b54d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
With this PR we introduce a new migration tool to translate PXUs to YAML. This already translates the unit with the new schema, which will be formalized (and bugfixed probably) in a followup PR.
Support for comments is best effort. All inline comments should be supported. Header comments are supported. Comments on the top level (unindented commets) are not supported. Untranslatable comments yield a warning.
Jinja support is best effort. Jinja blocks the translation of fields, all fields that contain jinja template are translated as is. Given that jinja can technically modify the semantics (keys) of pxus, the translator, even dumping fields as they are, may break units. All jinja fields yield a warning.
The following fields are unchanged, lines with
.are reduced to""as that is the semantic of them:The following fields are now objects, no longer raw json (although json is an option, yaml > json)
The following fields are now a list:
Inline overrides (which are effectively annotations in inclusions) are translated as such:
pxu:
yaml:
Resolved issues
Fixes: CHECKBOX-1393
Documentation
Documentation of the new schema is not part of this PR. All decisions takes are documented in line in the code.
Tests
Translator is tested