[PR #824/b051180d backport][3.13] Fix proxy-sync regression #829
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of PR #824 as merged into main (b051180).
Not sure how to properly test this. The big problem is that bandersnatch creates their own aiohttp session in order to download metadata and the packages. I thought by replacing their session with the remote's session (#750) we would get all of the remote's options by default, but I didn't realize that the auth & proxy settings are actually set at download time in the Downloader's
_runmethod (https://github.com/pulp/pulpcore/blob/main/pulpcore/download/http.py#L292-L294). This should fix the regression by patching thegetmethod that bandersnatch'sMasterclass uses to perform requests, but there is no way for me to test it with our current fixtures. Thehttp_proxyfixture doesn't give access to the proxy's request logs, just the data used to setup the proxy.