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

harden lazy wheel wheel error handling #9051

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

abn
Copy link
Member

@abn abn commented Feb 28, 2024

This change attempts to provide a catch-all safety net for circumstances where an index server is behaving badly when ranged requests are made.

Additionally, this change also helps guard against missing "Content-Range" headers in specific scenarios.

Resolves: #9042
Mitigtates: #9056

@abn abn requested a review from radoering February 28, 2024 00:51
@abn abn force-pushed the catch-all-lazy-wheel-errors branch 2 times, most recently from 2276267 to 713c245 Compare February 28, 2024 02:36
tests/conftest.py Outdated Show resolved Hide resolved
@aabmets
Copy link

aabmets commented Feb 28, 2024

Great job! Thank you a lot for fixing this! :)

@abn abn force-pushed the catch-all-lazy-wheel-errors branch from 713c245 to 9f39259 Compare February 28, 2024 13:14
@abn abn requested a review from radoering February 28, 2024 13:15
@dimbleby
Copy link
Contributor

dimbleby commented Feb 28, 2024

#9056 looks as though it provides another instance of the LazyWheel code making optimistic assertions about server behaviour, dunno whether it makes sense to handle that in this pull request or separately

526│ assert response_length == min(initial_chunk_size, ret_length)

@abn
Copy link
Member Author

abn commented Feb 28, 2024

dunno whether it makes sense to handle that in this pull request or separately

I reckon another PR might be better largely because I do not want to hold this up too long since this will in-effect solve that as well, or make it not impact UX. But might be good to have a targeted fix for defense-in-depth measure.

This change attempts to provide a catch-all safety net for circumstances
where an index server is behaving badly when ranged requests are made.

Additionally, this change also helps guard against  missing
"Content-Range" headers in specific scenarios.
@abn abn force-pushed the catch-all-lazy-wheel-errors branch from 9f39259 to 8cfb9ee Compare February 28, 2024 14:42
@abn abn added backport/1.8 Backport a PR to 1.8 through an automated PR and removed backport/1.8 Backport a PR to 1.8 through an automated PR labels Feb 28, 2024
@abn abn merged commit b7bc5ce into python-poetry:main Feb 28, 2024
22 checks passed
@abn abn deleted the catch-all-lazy-wheel-errors branch February 28, 2024 19:14
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/1.8 Backport a PR to 1.8 through an automated PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poetry 1.8.0 does not tolerate new sources in pyproject.toml
4 participants