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

pkg/csconfig: use yaml.v3; deprecate yaml.v2 for new code #2867

Merged
merged 3 commits into from Mar 4, 2024
Merged

Conversation

mmetc
Copy link
Contributor

@mmetc mmetc commented Mar 4, 2024

This allows us to parse time.Duration while unmarshaling, and have a proper error when the duration is provided as an integer without a unit (which is interpreted as nanoseconds with yaml.v2, forbidden with v3)

While v3 is better in all cases, there are a few API differences, so we are going to migrate over time.

@mmetc mmetc added this to the 1.6.1 milestone Mar 4, 2024
Copy link

github-actions bot commented Mar 4, 2024

@mmetc: There are no area labels on this PR. You can add as many areas as you see fit.

  • /area agent
  • /area local-api
  • /area cscli
  • /area appsec
  • /area security
  • /area configuration
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 82.69231% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 58.03%. Comparing base (41b4373) to head (f3d3bdf).

Files Patch % Lines
pkg/csconfig/crowdsec_service.go 0.00% 3 Missing ⚠️
pkg/csconfig/api.go 90.00% 2 Missing ⚠️
pkg/csconfig/console.go 50.00% 2 Missing ⚠️
pkg/csconfig/profiles.go 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2867      +/-   ##
==========================================
+ Coverage   57.97%   58.03%   +0.05%     
==========================================
  Files         240      240              
  Lines       31042    31063      +21     
==========================================
+ Hits        17996    18026      +30     
+ Misses      11415    11408       -7     
+ Partials     1631     1629       -2     
Flag Coverage Δ
bats 38.01% <61.53%> (+0.02%) ⬆️
unit-linux 52.32% <76.92%> (+0.04%) ⬆️
unit-windows 47.85% <75.00%> (+0.07%) ⬆️

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.

Copy link
Contributor

@sabban sabban left a comment

Choose a reason for hiding this comment

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

lgtm

@mmetc mmetc marked this pull request as ready for review March 4, 2024 13:22
@mmetc mmetc merged commit e7ecea7 into master Mar 4, 2024
17 checks passed
@mmetc mmetc deleted the yaml.v3 branch March 4, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants