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: upgrade from LegacyVersion #2679

Closed
wants to merge 4 commits into from
Closed

Conversation

terriko
Copy link
Contributor

@terriko terriko commented Feb 9, 2023

Restarting the effort to handle the cases that were previously handled by LegacyVersion so we can upgrade to the latest packaging. This doens't actually work yet.

@terriko
Copy link
Contributor Author

terriko commented Feb 10, 2023

Currently failing 12 tests:

 =========================== short test summary info ============================
FAILED test/test_csv2cve.py::TestCSV2CVE::test_csv2cve_valid_file - assert 52 >= 60
FAILED test/test_cvescanner.py::TestCVEScanner::test_canonical_convert[product0-2.11.1-] - TypeError: cannot unpack non-iterable Version object
FAILED test/test_cvescanner.py::TestCVEScanner::test_canonical_convert[product1-2.11.1-] - TypeError: cannot unpack non-iterable Version object
FAILED test/test_cvescanner.py::TestCVEScanner::test_canonical_convert[product2-1.1.0h-1.1.0.7] - packaging.version.InvalidVersion: Invalid version: '110h'
FAILED test/test_cvescanner.py::TestCVEScanner::test_canonical_convert[product3-1.1.0h-1.1.0.7] - packaging.version.InvalidVersion: Invalid version: '110h'
FAILED test/test_cvescanner.py::TestCVEScanner::test_canonical_convert[product4--] - packaging.version.InvalidVersion: Invalid version: ''
FAILED test/test_cvescanner.py::TestCVEScanner::test_canonical_convert[product5-7.4-] - TypeError: cannot unpack non-iterable Version object
FAILED test/test_cvescanner.py::TestCVEScanner::test_canonical_convert[product6-7.4-] - TypeError: cannot unpack non-iterable Version object
FAILED test/test_exploits.py::TestExploitScanner::test_exploit_checker[True-exploits_list0-product_info0-triage_info0-CRITICAL-EXPLOIT] - IndexError: list index out of range
FAILED test/test_exploits.py::TestExploitScanner::test_exploit_checker[False-exploits_list1-product_info1-triage_info1-CRITICAL] - IndexError: list index out of range
FAILED test/test_exploits.py::TestExploitScanner::test_exploit_checker[True-exploits_list2-product_info2-triage_info2-CRITICAL] - IndexError: list index out of range
FAILED test/test_exploits.py::TestExploitScanner::test_exploit_checker[False-exploits_list3-product_info3-triage_info3-CRITICAL] - IndexError: list index out of range
===== 12 failed, 1532 passed, 44 skipped, 40 warnings in 760.45s (0:12:40) =====

I haven't dug into these because I'm done work for the week (and need to switch to childcare) but that's an interesting set of failures. What I've learned from playing around with this today is that LegacyVersion was hiding some interesting conversions in our data, and I'm not sure the choices I made just to get it working were exactly the ones that we had before.

@terriko terriko added this to the 3.3 milestone Jun 28, 2023
@terriko
Copy link
Contributor Author

terriko commented Sep 27, 2023

For the record: I think this PR will be replaced by something that uses cmp_version https://pypi.org/project/cmp_version/ but I need to update our licensing paperwork before that can happen.

@terriko
Copy link
Contributor Author

terriko commented Oct 17, 2023

Closing in favour of #3430

@terriko terriko closed this Oct 17, 2023
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.

1 participant