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

Backport PR #4242 to support all logger level case variants #4270

Conversation

wearyzen
Copy link
Contributor

@wearyzen wearyzen commented Nov 24, 2023

Changes

Backport PR #4242

This commit re-introduces this support such that all variants should again be supported.

Reason

#4047 updated
parsing the logger level filter. It removed all case variants outside
fully uppercase (e.g. INFO) and the 1st character being upper case
(e.g. Info) this removed support for other previously supported
variants e.g. info.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following
Developer Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • [ ] Any required documentation changes (code and docs) are included in this PR.
  • [ ] API changes follow the Runbook for Firecracker API changes.
  • User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • [ ] New TODOs link to an issue.
  • Commits meet contribution quality standards.

  • This functionality cannot be added in rust-vmm.

Jonathan Woollett-Light and others added 2 commits November 24, 2023 16:08
#4047 updated
parsing the logger level filter. It removed all case variants outside
fully uppercase (e.g. `INFO`) and the 1st character being upper case
(e.g. `Info`) this removed support for other previously supported
variants e.g. `info`. This commit re-introduces this support such that
all variants should again be supported.
Fixes commit 332f218

Signed-off-by: Jonathan Woollett-Light <jcawl@amazon.co.uk>
Signed-off-by: Sudan Landge <sudanl@amazon.com>
Add unit test to cover all cases of LevelFilter.
Remove redundant logic from levelfilter_from_str because
levelfilter_from_str_all_variants is a better place to put the logic.

Signed-off-by: Jonathan Woollett-Light <jcawl@amazon.co.uk>
Signed-off-by: Sudan Landge <sudanl@amazon.com>
@wearyzen wearyzen changed the title Backport https://github.com/firecracker-microvm/firecracker/pull/4242 Backport PR #4242 Nov 24, 2023
@wearyzen wearyzen changed the title Backport PR #4242 Backport PR #4242 to support all logger level case variants Nov 24, 2023
@wearyzen wearyzen marked this pull request as ready for review November 24, 2023 16:18
@wearyzen wearyzen self-assigned this Nov 24, 2023
Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (92bed78) 82.96% compared to head (f0fb745) 82.97%.

Files Patch % Lines
src/vmm/src/logger/logging.rs 95.65% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           firecracker-v1.5    #4270   +/-   ##
=================================================
  Coverage             82.96%   82.97%           
=================================================
  Files                   223      223           
  Lines                 28456    28471   +15     
=================================================
+ Hits                  23609    23623   +14     
- Misses                 4847     4848    +1     
Flag Coverage Δ
4.14-c7g.metal 78.50% <95.65%> (+<0.01%) ⬆️
4.14-m5d.metal 80.31% <95.65%> (-0.01%) ⬇️
4.14-m6a.metal 79.44% <95.65%> (+<0.01%) ⬆️
4.14-m6g.metal 78.51% <95.65%> (+<0.01%) ⬆️
4.14-m6i.metal 80.29% <95.65%> (+<0.01%) ⬆️
5.10-c7g.metal 81.42% <95.65%> (+<0.01%) ⬆️
5.10-m5d.metal 82.97% <95.65%> (-0.02%) ⬇️
5.10-m6a.metal 82.21% <95.65%> (+<0.01%) ⬆️
5.10-m6g.metal 81.42% <95.65%> (+<0.01%) ⬆️
5.10-m6i.metal 82.97% <95.65%> (+<0.01%) ⬆️
6.1-c7g.metal 81.42% <95.65%> (+<0.01%) ⬆️
6.1-m5d.metal 82.97% <95.65%> (-0.02%) ⬇️
6.1-m6a.metal 82.21% <95.65%> (+<0.01%) ⬆️
6.1-m6g.metal 81.42% <95.65%> (+<0.01%) ⬆️
6.1-m6i.metal 82.97% <95.65%> (+<0.01%) ⬆️

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.

@wearyzen wearyzen added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Nov 24, 2023
@wearyzen wearyzen force-pushed the firecracker-v1.5_level_filter branch 2 times, most recently from ae99d37 to 7d640de Compare November 24, 2023 16:52
Adding an entry for #4270 which is a backport of #4242.

Signed-off-by: Sudan Landge <sudanl@amazon.com>
@wearyzen wearyzen force-pushed the firecracker-v1.5_level_filter branch from 7d640de to f0fb745 Compare November 24, 2023 16:54
@wearyzen wearyzen merged commit b85d0b7 into firecracker-microvm:firecracker-v1.5 Nov 27, 2023
4 of 7 checks passed
@pb8o pb8o mentioned this pull request Nov 28, 2023
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting review Indicates that a pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants