Skip to content

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Jun 2, 2025

What do these changes do?

Downgrade connector close error to debug
This is going to be expected with TLS 1.3. Error is too aggressive for something that is expected to happen.
Also send the message to the client_logger as the original PR (#3733) sent it to the root logger which was likely not intended

Are there changes in behavior for the user?

We never logged this before we backported waiting for connection closed in #11077 so there is likely no reason to log this at error level as there is nothing that can be done about it. Its purely needed for debugging.

fixes #11113

Is it a substantial burden for the maintainers to support this?

no

This is going to be expected with TLS 1.3. Error is too
aggressive for something that is expected to happen.

fixes #11113
@bdraco bdraco requested a review from asvetlov as a code owner June 2, 2025 07:41
@bdraco bdraco requested a review from webknjaz as a code owner June 2, 2025 07:44
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Jun 2, 2025
Copy link

codecov bot commented Jun 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.83%. Comparing base (21d640d) to head (726ee82).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11114   +/-   ##
=======================================
  Coverage   98.83%   98.83%           
=======================================
  Files         129      129           
  Lines       41763    41763           
  Branches     2245     2245           
=======================================
  Hits        41276    41276           
  Misses        337      337           
  Partials      150      150           
Flag Coverage Δ
CI-GHA 98.71% <100.00%> (ø)
OS-Linux 98.43% <50.00%> (ø)
OS-Windows 96.71% <100.00%> (ø)
OS-macOS 97.63% <50.00%> (ø)
Py-3.10.11 97.40% <50.00%> (+<0.01%) ⬆️
Py-3.10.17 97.90% <50.00%> (-0.01%) ⬇️
Py-3.11.12 98.08% <50.00%> (ø)
Py-3.11.9 97.57% <100.00%> (-0.01%) ⬇️
Py-3.12.10 98.46% <100.00%> (-0.01%) ⬇️
Py-3.13.3 98.44% <50.00%> (-0.02%) ⬇️
Py-3.9.13 97.28% <50.00%> (ø)
Py-3.9.22 97.77% <50.00%> (-0.02%) ⬇️
Py-pypy7.3.16 93.72% <50.00%> (-0.59%) ⬇️
VM-macos 97.63% <50.00%> (ø)
VM-ubuntu 98.43% <50.00%> (ø)
VM-windows 96.71% <100.00%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codspeed-hq bot commented Jun 2, 2025

CodSpeed Performance Report

Merging #11114 will not alter performance

Comparing downgrade_logging (726ee82) with master (21d640d)

Summary

✅ 59 untouched benchmarks

@bdraco bdraco added backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot backport-3.13 Trigger automatic backporting to the 3.13 release branch by Patchback robot and removed bot:chronographer:provided There is a change note present in this PR labels Jun 2, 2025
@psf-chronographer psf-chronographer bot added bot:chronographer:provided There is a change note present in this PR labels Jun 2, 2025
@bdraco bdraco enabled auto-merge (squash) June 2, 2025 08:12
@bdraco bdraco merged commit 758738e into master Jun 2, 2025
40 checks passed
@bdraco bdraco deleted the downgrade_logging branch June 2, 2025 08:13
Copy link
Contributor

patchback bot commented Jun 2, 2025

Backport to 3.12: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 758738e on top of patchback/backports/3.12/758738ed4d2a3c3d2c74b9d8ba217c7141af1a16/pr-11114

Backporting merged PR #11114 into master

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/aio-libs/aiohttp.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.12/758738ed4d2a3c3d2c74b9d8ba217c7141af1a16/pr-11114 upstream/3.12
  4. Now, cherry-pick PR Downgrade connector close error to debug #11114 contents into that branch:
    $ git cherry-pick -x 758738ed4d2a3c3d2c74b9d8ba217c7141af1a16
    If it'll yell at you with something like fatal: Commit 758738ed4d2a3c3d2c74b9d8ba217c7141af1a16 is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x 758738ed4d2a3c3d2c74b9d8ba217c7141af1a16
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Downgrade connector close error to debug #11114 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.12/758738ed4d2a3c3d2c74b9d8ba217c7141af1a16/pr-11114
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Copy link
Contributor

patchback bot commented Jun 2, 2025

Backport to 3.13: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 758738e on top of patchback/backports/3.13/758738ed4d2a3c3d2c74b9d8ba217c7141af1a16/pr-11114

Backporting merged PR #11114 into master

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/aio-libs/aiohttp.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.13/758738ed4d2a3c3d2c74b9d8ba217c7141af1a16/pr-11114 upstream/3.13
  4. Now, cherry-pick PR Downgrade connector close error to debug #11114 contents into that branch:
    $ git cherry-pick -x 758738ed4d2a3c3d2c74b9d8ba217c7141af1a16
    If it'll yell at you with something like fatal: Commit 758738ed4d2a3c3d2c74b9d8ba217c7141af1a16 is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x 758738ed4d2a3c3d2c74b9d8ba217c7141af1a16
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Downgrade connector close error to debug #11114 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.13/758738ed4d2a3c3d2c74b9d8ba217c7141af1a16/pr-11114
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

bdraco added a commit that referenced this pull request Jun 2, 2025
bdraco added a commit that referenced this pull request Jun 2, 2025
@@ -0,0 +1 @@
Downgraded the logging level for connector close errors from ERROR to DEBUG, as these are expected behavior with TLS 1.3 connections -- by :user:`bdraco`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, is it not expected that 1.3 connections close correctly? I thought it was badly implemented servers that don't close the connection?

Copy link

@jabbera jabbera Jun 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed here. This seems like a bad idea. It's basically suppressing a log entry that is alerting you to 100ms additional latency added by the server not sending it's close_notify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot backport-3.13 Trigger automatic backporting to the 3.13 release branch by Patchback robot 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.

New feature "ssl_shutdown_timeout" parameter makes system report unnecessary 'Connection lost: SSL shutdown timed out' error
3 participants