containerbuildsystem / cachi2

Cachi2 is a CLI tool that pre-fetches your project's dependencies to aid in making your build process network-isolated.
GNU General Public License v3.0
7 stars 25 forks source link

toil(pkg managers:pip): refactor and unify sdist & wheel handling #467

Closed ben-alkov closed 5 months ago

ben-alkov commented 7 months ago

Refactor and unify pip sdist & wheel handling (STONEBLD-1705), to wit:

Eliminate the differences as much as possible

Maintainers will complete the following section

Note: if the contribution is external (not from an organization member), the CI pipeline will not run automatically. After verifying that the CI is safe to run:

ben-alkov commented 7 months ago

Note that tests haven't been touched yet (also the reason for the mypy fail).

IDK what CodeQL's issue is...

ben-alkov commented 7 months ago

~I've identified an issue where existing artifacts (i.e. things which have already been downloaded) are not being hashed (if required). I haven't resolved this yet.~

Fixed

ben-alkov commented 6 months ago

you can fix one failing test by: mock_distributions.side_effect = [[pypi_package1], [pypi_package2]]

I've got that locally, but then my comment in Slack becomes the problem:

test_download_from_requirement_files is failing in async_download_files() with 'cachi2.core.errors.FetchError: exception_name: InvalidURL, details: ""' It was failing in '.pip.download_binary_file' (same error), so I changed the mock to '.general.async_download_files'... there isn't anything "lower level" than that to mock

eskultety commented 6 months ago

Uhm, what's wrong with that bit of code CodeQL complains about it? I don't see a problem, it's proper instantiation, can we dismiss the error as false positive?