Skip to content

client: fix upload timeouts with sock_read set (#7150)#7206

Merged
Dreamsorcerer merged 1 commit into3.9from
patchback/backports/3.9/fecbe999c7a110fbeba8aa6ba269497435b2870d/pr-7150
Feb 11, 2023
Merged

client: fix upload timeouts with sock_read set (#7150)#7206
Dreamsorcerer merged 1 commit into3.9from
patchback/backports/3.9/fecbe999c7a110fbeba8aa6ba269497435b2870d/pr-7150

Conversation

@Dreamsorcerer
Copy link
Copy Markdown
Member

Prevent the sock_read timeout callback from firing by only scheduling it afterthe payload (if any) has been fully written.

No

Fixes #7149

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
  • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following: * .feature: Signifying a new feature. * .bugfix: Signifying a bug fix. * .doc: Signifying a documentation improvement. * .removal: Signifying a deprecation or removal of public API.
  • .misc: A ticket has been closed, but it is not of interest to users.
  • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

Co-authored-by: Sam Bull [email protected]
(cherry picked from commit fecbe99)

What do these changes do?

Are there changes in behavior for the user?

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

Prevent the `sock_read` timeout callback from firing by only scheduling
it afterthe payload (if any) has been fully written.

No

Fixes #7149

- [x] I think the code is well written
- [x] Unit tests for the changes exist
- [x] Documentation reflects the changes
- [x] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt`
  * The format is &lt;Name&gt; &lt;Surname&gt;.
  * Please keep alphabetical order, the file is sorted by names.
- [x] Add a new news fragment into the `CHANGES` folder
  * name it `<issue_id>.<type>` for example (588.bugfix)
* if you don't have an `issue_id` change it to the pr id after creating
the pr
  * ensure type is one of the following:
    * `.feature`: Signifying a new feature.
    * `.bugfix`: Signifying a bug fix.
    * `.doc`: Signifying a documentation improvement.
    * `.removal`: Signifying a deprecation or removal of public API.
* `.misc`: A ticket has been closed, but it is not of interest to users.
* Make sure to use full sentences with correct case and punctuation, for
example: "Fix issue with non-ascii contents in doctest text files."

---------

Co-authored-by: Sam Bull <[email protected]>
(cherry picked from commit fecbe99)
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Feb 11, 2023
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 11, 2023

Codecov Report

Merging #7206 (a518b2a) into 3.9 (5998102) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              3.9    #7206   +/-   ##
=======================================
  Coverage   97.35%   97.36%           
=======================================
  Files         107      107           
  Lines       31276    31297   +21     
  Branches     3963     3964    +1     
=======================================
+ Hits        30449    30472   +23     
+ Misses        621      620    -1     
+ Partials      206      205    -1     
Flag Coverage Δ
CI-GHA 97.25% <100.00%> (+<0.01%) ⬆️
OS-Linux 96.93% <100.00%> (+<0.01%) ⬆️
OS-Windows 94.51% <100.00%> (+<0.01%) ⬆️
OS-macOS 96.49% <100.00%> (+<0.01%) ⬆️
Py-3.10.9 96.98% <100.00%> (+<0.01%) ⬆️
Py-3.11.0 95.38% <100.00%> (+<0.01%) ⬆️
Py-3.7.15 96.73% <100.00%> (+<0.01%) ⬆️
Py-3.7.9 94.37% <100.00%> (+<0.01%) ⬆️
Py-3.8.10 94.29% <100.00%> (+<0.01%) ⬆️
Py-3.8.16 96.63% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 94.29% <100.00%> (+<0.01%) ⬆️
Py-3.9.16 96.65% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.11 94.06% <100.00%> (-0.01%) ⬇️
VM-macos 96.49% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 96.93% <100.00%> (+<0.01%) ⬆️
VM-windows 94.51% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiohttp/client_proto.py 96.64% <100.00%> (+0.02%) ⬆️
aiohttp/client_reqrep.py 97.82% <100.00%> (+<0.01%) ⬆️
tests/test_client_functional.py 98.48% <100.00%> (+0.01%) ⬆️
tests/test_client_proto.py 100.00% <100.00%> (ø)
aiohttp/client.py 94.59% <0.00%> (+0.41%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Dreamsorcerer Dreamsorcerer merged commit e49bfdb into 3.9 Feb 11, 2023
@Dreamsorcerer Dreamsorcerer deleted the patchback/backports/3.9/fecbe999c7a110fbeba8aa6ba269497435b2870d/pr-7150 branch February 11, 2023 17:31
@skshetry
Copy link
Copy Markdown

@Dreamsorcerer, is there any reason not to backport this in 3.8? We'd love to see this released, as it's breaking chunking uploads of large files for us. Happy to create backport PR. 🙂

@Dreamsorcerer
Copy link
Copy Markdown
Member Author

Firstly, it changes the behaviour in a significant enough way, that'd I'm not too comfortable including in a bug release (and would like to avoid doing another 3.8 release at this point). Secondly, we'd ideally get a write timeout parameter included before this is released (#7150 (comment)), otherwise there is potential here for a connection to never timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants