Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix policies yml parsing #827

Merged
merged 2 commits into from
Jul 17, 2024
Merged

Conversation

flavio
Copy link
Member

@flavio flavio commented Jul 17, 2024

Address the failures reported by our CI system.

They were caused by two changes done to the policies.yml file parsing:

  • The usage of deny_unknown_fields with untagged Enum is affected by a bug inside of the serde library. This is a known issue
  • The policies.yml.example file had invalid contents

flavio added 2 commits July 17, 2024 09:54
There seeems to be issues with the usage of the `deny_unknown_fields`
and untagged enumerations.
serde ends up confused and complains about perfectly valid files.

See serde-rs/serde#1600

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
The contents of the file were based on the initial RFC format, which was
then changed.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
@flavio flavio requested a review from a team as a code owner July 17, 2024 07:58
@flavio flavio self-assigned this Jul 17, 2024
Copy link
Member

@viccuad viccuad left a comment

Choose a reason for hiding this comment

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

LGTM. Would prefer a unit test that catches this though.

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.45%. Comparing base (1677586) to head (c2297bf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #827   +/-   ##
=======================================
  Coverage   58.45%   58.45%           
=======================================
  Files          17       17           
  Lines         994      994           
=======================================
  Hits          581      581           
  Misses        413      413           
Flag Coverage Δ
integration-tests 50.55% <ø> (ø)
unit-tests 34.60% <ø> (ø)

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.

@flavio flavio merged commit 9c0ce5f into kubewarden:main Jul 17, 2024
11 checks passed
@flavio flavio deleted the fix-policies-yml-parsing branch July 17, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants