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: move the logging message where it's effective #4171

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

pb8o
Copy link
Contributor

@pb8o pb8o commented Oct 12, 2023

Move the message after the logger has been configured, so it actually gets printed.

Eliminate redundant message that outputs internal vmm crate version 0.1.0.

Fixes: 96ed457, 332f218

Changes

It can happen that the version printed is v0.1.0, instead of the expected version.

2023-10-12T15:15:39.609772934 [4a97aac2-88bc-4f59-8fe1-167bc078ac7e:main] Running Firecracker v0.1.0

Reason

This behavior may confuse users of the logs.

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.

@pb8o pb8o self-assigned this Oct 12, 2023
@pb8o pb8o added the Type: Fix Indicates a fix to existing code label Oct 12, 2023
@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

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

Comparison is base (e71046f) 82.97% compared to head (efbd227) 82.99%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4171      +/-   ##
==========================================
+ Coverage   82.97%   82.99%   +0.02%     
==========================================
  Files         221      221              
  Lines       28568    28567       -1     
==========================================
+ Hits        23703    23709       +6     
+ Misses       4865     4858       -7     
Flag Coverage Δ
4.14-c7g.metal 78.54% <3.84%> (+<0.01%) ⬆️
4.14-m5d.metal 80.34% <3.84%> (+0.01%) ⬆️
4.14-m6a.metal 79.48% <3.84%> (+<0.01%) ⬆️
4.14-m6g.metal 78.54% <3.84%> (+<0.01%) ⬆️
4.14-m6i.metal 80.32% <3.84%> (+<0.01%) ⬆️
5.10-c7g.metal 81.46% <3.84%> (+<0.01%) ⬆️
5.10-m5d.metal 83.01% <3.84%> (+<0.01%) ⬆️
5.10-m6a.metal 82.25% <3.84%> (+<0.01%) ⬆️
5.10-m6g.metal 81.46% <3.84%> (?)
5.10-m6i.metal 83.00% <3.84%> (+<0.01%) ⬆️
6.1-c7g.metal 81.46% <3.84%> (+<0.01%) ⬆️
6.1-m5d.metal 83.02% <3.84%> (+0.01%) ⬆️
6.1-m6a.metal 82.25% <3.84%> (+<0.01%) ⬆️
6.1-m6g.metal 81.46% <3.84%> (+<0.01%) ⬆️
6.1-m6i.metal 83.00% <3.84%> (+<0.01%) ⬆️

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

Files Coverage Δ
src/vmm/src/logger/logging.rs 75.00% <100.00%> (+2.27%) ⬆️
src/firecracker/src/main.rs 0.22% <0.00%> (-0.01%) ⬇️

... and 1 file with indirect coverage changes

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

@pb8o pb8o added the Status: Awaiting author Indicates that an issue or pull request requires author action label Oct 13, 2023
@pb8o pb8o force-pushed the fix-logging branch 3 times, most recently from 8e0da4a to f385b2d Compare October 16, 2023 15:17
@pb8o pb8o added Priority: Medium Indicates than an issue or pull request should be resolved ahead of issues or pull requests labelled Status: Awaiting review Indicates that a pull request is ready to be reviewed and removed Status: Awaiting author Indicates that an issue or pull request requires author action labels Oct 16, 2023
@pb8o pb8o requested a review from roypat October 16, 2023 15:31
Move the message after the logger has been configured, so it actually
gets printed.

Eliminate redundant message that outputs internal vmm crate version
0.1.0.

Fixes: 96ed457, 332f218

Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@xmarcalx xmarcalx left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I have some suggestions for the changelog. Let me know what you think.

Copy link
Contributor

@xmarcalx xmarcalx left a comment

Choose a reason for hiding this comment

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

sorry to be pedantic but let me know if it sound better 😊

CHANGELOG.md Outdated Show resolved Hide resolved
show-log-origin was turned on by the --show-level option.

Use the correct flag to enable it.

Fixes: 332f218

Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
Copy link
Contributor

@xmarcalx xmarcalx left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. LGTM

@pb8o pb8o merged commit 22eb608 into firecracker-microvm:main Oct 18, 2023
5 of 7 checks passed
@pb8o pb8o deleted the fix-logging branch October 18, 2023 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Indicates than an issue or pull request should be resolved ahead of issues or pull requests labelled Status: Awaiting review Indicates that a pull request is ready to be reviewed Type: Fix Indicates a fix to existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants