Skip to content

Update the Virtualization Test to Clean up Logs (Bugfix)#743

Merged
Hook25 merged 5 commits intomainfrom
vm_timeout_update_2
Jan 10, 2024
Merged

Update the Virtualization Test to Clean up Logs (Bugfix)#743
Hook25 merged 5 commits intomainfrom
vm_timeout_update_2

Conversation

@mreed8855
Copy link
Copy Markdown
Collaborator

@mreed8855 mreed8855 commented Sep 21, 2023

I have added an option to reduce the error messages shown in the logs while the script checks to see if the virtual machine has booted.

This fixes this issue
#695

Jira Card
https://warthogs.atlassian.net/browse/SERVCERT-1259

This PR will replace PR #720

Description

Resolved issues

#695

Documentation

Tests

Run checkbox and run the virtualization/verify_lxd_vm job

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 21, 2023

Codecov Report

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

Comparison is base (0c63d8e) 37.06% compared to head (5d94225) 37.43%.
Report is 10 commits behind head on main.

Files Patch % Lines
providers/base/bin/virtualization.py 93.10% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #743      +/-   ##
==========================================
+ Coverage   37.06%   37.43%   +0.37%     
==========================================
  Files         313      313              
  Lines       34805    34808       +3     
  Branches     5982     5983       +1     
==========================================
+ Hits        12899    13029     +130     
+ Misses      21335    21201     -134     
- Partials      571      578       +7     
Flag Coverage Δ
provider-base 6.91% <93.10%> (+0.92%) ⬆️

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.

Hook25
Hook25 previously requested changes Sep 22, 2023
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

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

I have suggested a couple of ideas here and there, overall nice contribution, thank you.

To consider this ready I will need to ask you to write a few unit tests to improve the overall coverage of this contribution. Given that we have a 90% target on patches, covering cleanup and run_command should be enough but if you want/can, try to reach 100% (covering start_vm is going to be a little bit more complicated but we really need to improve the overall coverage of provider scripts and checkbox itself!).

@Hook25 Hook25 changed the title Update the Virtualization Test to Clean up Logs Update the Virtualization Test to Clean up Logs (Bugfix) Sep 22, 2023
@mreed8855 mreed8855 force-pushed the vm_timeout_update_2 branch from 79900bd to 0afd0db Compare October 5, 2023 18:31
@Hook25 Hook25 force-pushed the vm_timeout_update_2 branch 2 times, most recently from baad4a9 to 1922999 Compare January 9, 2024 17:00
I have added an option to reduce the error messages shown in the logs
while the script checks to see if the virtual machine has booted.
(Bugfix) for issue #695

Updated suggested changes in PR review
- Changed error_msgs to log_stderr
- Replaced elif with a cleaner if statement
@Hook25 Hook25 force-pushed the vm_timeout_update_2 branch from be809d4 to 617fdb9 Compare January 9, 2024 18:30
Add test for cleanup

Fully test start_vm

Partially test setup

Add no stderr test
@Hook25 Hook25 force-pushed the vm_timeout_update_2 branch from 617fdb9 to ea4ada6 Compare January 9, 2024 18:33
Copy link
Copy Markdown
Contributor

@kissiel kissiel left a comment

Choose a reason for hiding this comment

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

Awesome, +1

@Hook25 Hook25 dismissed their stale review January 10, 2024 10:30

I have modified this PR

@Hook25 Hook25 merged commit 1cf70e8 into main Jan 10, 2024
@Hook25 Hook25 deleted the vm_timeout_update_2 branch January 10, 2024 10:50
LiaoU3 pushed a commit to LiaoU3/checkbox that referenced this pull request Mar 20, 2024
* Update the Virtualization Test Clean up Logs

I have added an option to reduce the error messages shown in the logs
while the script checks to see if the virtual machine has booted.
(Bugfix) for issue canonical#695

Updated suggested changes in PR review
- Changed error_msgs to log_stderr
- Replaced elif with a cleaner if statement

* Add a few tests to virtualization.py

Add test for cleanup

Fully test start_vm

Partially test setup

Add no stderr test

* Updated tests and small refactoring of start_vm

* Black run_command and setup

* Recover deleted minor tests

---------

Co-authored-by: Hook25 <massimiliano.girardi@canonical.com>
binli pushed a commit to binli/checkbox that referenced this pull request Mar 22, 2024
* Update the Virtualization Test Clean up Logs

I have added an option to reduce the error messages shown in the logs
while the script checks to see if the virtual machine has booted.
(Bugfix) for issue canonical#695

Updated suggested changes in PR review
- Changed error_msgs to log_stderr
- Replaced elif with a cleaner if statement

* Add a few tests to virtualization.py

Add test for cleanup

Fully test start_vm

Partially test setup

Add no stderr test

* Updated tests and small refactoring of start_vm

* Black run_command and setup

* Recover deleted minor tests

---------

Co-authored-by: Hook25 <massimiliano.girardi@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants