Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpClient] Make retry strategy work again#53889

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:5.4fromNyholm:retry-strategy
Feb 14, 2024

Conversation

Nyholm
Copy link
Member

@NyholmNyholm commentedFeb 10, 2024
edited
Loading

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#53886
LicenseMIT

PR#53506 accidentally disabled the retry functionality. I reverted that PR and added a small test to make sure this does not happen again.

Thank you@ldebrouwer for reporting this.

FYI@nicolas-grekas@rmikalkenas, I will try to find an other solution tofix#52587. But I'll do that in a separate PR to get a quick merge on this one.

ldebrouwer reacted with heart emoji
@Nyholm
Copy link
MemberAuthor

Sorry, I could not find a fix for you@rmikalkenas. I only found "hacky" solutions..

I still suggest merging this and then reopen#52587

@rmikalkenas
Copy link
Contributor

rmikalkenas commentedFeb 12, 2024
edited
Loading

IMO it could be easily fixed by adjusting logic at

if ($context->getInfo('canceled') ||$chunk->isTimeout() ||null !==$chunk->getInformationalStatus()) {

With mine introduced fixisTimeout method will no longer throw aTransportExceptionInterface, therefore retry mechanism wont be called (looks like this part wasn't covered by tests and I didn't check it as well).

Removing previously mentioned$chunk->isTimeout() call from if block solves both issues - yours and mine. Edit: it needs more changes, as we cannot blindly allow to retry all timeouts (idempotent methods etc)

In addition to that,Symfony\Contracts\HttpClient\ChunkInterface::isTimeout contract should be adjusted as well, since this method will never throw TransportException.

@Nyholm
Copy link
MemberAuthor

it needs more changes, as we cannot blindly allow to retry all timeouts (idempotent methods etc)

Yeah. Im afraid so..

looks like this part wasn't covered by tests and I didn't check it as well

Correct. That is the biggest issue.
Since I am not 100% sure what changes needs to be done to fix both issues. I suggest to do a quick merge on this one so it can be released in next patch version. Then reopen and try to fix#52587

ldebrouwer and rmikalkenas reacted with thumbs up emoji

@nicolas-grekas
Copy link
Member

Thank you@Nyholm.

@Nyholm
Copy link
MemberAuthor

Thank you for merging

ldebrouwer reacted with hooray emoji

This was referencedFeb 27, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
5.4
Development

Successfully merging this pull request may close these issues.

4 participants
@Nyholm@rmikalkenas@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp