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: broken quiet mode in main branch (#1587) #1648

Merged
merged 1 commit into from
Apr 28, 2022
Merged

fix: broken quiet mode in main branch (#1587) #1648

merged 1 commit into from
Apr 28, 2022

Conversation

b31ngd3v
Copy link
Contributor

closes #1587

@codecov-commenter
Copy link

Codecov Report

Merging #1648 (728eebc) into main (3daa905) will increase coverage by 2.27%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1648      +/-   ##
==========================================
+ Coverage   78.39%   80.67%   +2.27%     
==========================================
  Files         291      291              
  Lines        6027     6027              
  Branches      989      989              
==========================================
+ Hits         4725     4862     +137     
+ Misses       1086      955     -131     
+ Partials      216      210       -6     
Flag Coverage Δ
longtests 80.67% <0.00%> (+2.27%) ⬆️

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

Impacted Files Coverage Δ
cve_bin_tool/cvedb.py 85.35% <0.00%> (+13.81%) ⬆️
cve_bin_tool/nvd_api.py 70.68% <0.00%> (-13.80%) ⬇️
cve_bin_tool/version_scanner.py 76.35% <0.00%> (+0.77%) ⬆️
cve_bin_tool/extractor.py 59.23% <0.00%> (+1.08%) ⬆️
cve_bin_tool/cli.py 72.72% <0.00%> (+2.59%) ⬆️
cve_bin_tool/checkers/glibc.py 100.00% <0.00%> (+4.16%) ⬆️
cve_bin_tool/available_fix/debian_cve_tracker.py 83.67% <0.00%> (+6.12%) ⬆️
cve_bin_tool/available_fix/redhat_cve_tracker.py 80.35% <0.00%> (+8.92%) ⬆️
test/test_cli.py 91.13% <0.00%> (+10.12%) ⬆️
test/test_scanner.py 74.61% <0.00%> (+12.30%) ⬆️
... and 5 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Hah, good eye. I'm kind of surprised we didn't see this more often, but I guess since we try to pre-populate the db it just wasn't always doing an update during that test.

@terriko terriko merged commit 61b028b into intel:main Apr 28, 2022
@BenL-github
Copy link
Contributor

BenL-github commented Apr 28, 2022

Oh nice, I looked into this issue awhile back and couldn't solve it. I have a quick question:

I thought quiet mode sets the value of error_mode to NoTrace where NoTrace = 1 (see lines 357-356 of cli.py).
Why does it say in a comment that # error_mode.value will only be greater than 1 if quiet mode If quiet mode has a value of 1?

Also, since lines 323-331 have the same logic, may I apply this fix to that as well? @terriko

@b31ngd3v b31ngd3v deleted the dev-2 branch April 29, 2022 04:09
@b31ngd3v
Copy link
Contributor Author

b31ngd3v commented Apr 29, 2022

image
@BenL-github i think you're right, something doesn't add up
edit: one more question-
image
why self.error_mode.value? i think self.error_mode holds the int value itself.

anthonyharrison pushed a commit to anthonyharrison/cve-bin-tool that referenced this pull request May 2, 2022
Co-authored-by: b31ngd3v <b31ngd3v@gmail.com>
@terriko
Copy link
Contributor

terriko commented May 3, 2022

I suspect all of this code needs a refactor so we're using log levels to determine output all the way through if we can instead of having error_mode at all, but I haven't had time to look at it all and see what would be the right solution. If someone else wants to tackle it, go ahead and start an issue to discuss ideas.

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.

Quiet mode broken in main branch?
4 participants