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

Upgrade to aiohttp 3.7.1 #42305

Merged
merged 4 commits into from
Oct 25, 2020
Merged

Upgrade to aiohttp 3.7.1 #42305

merged 4 commits into from
Oct 25, 2020

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Oct 24, 2020

Proposed change

Upgrade to aiohttp 3.7.1

https://github.com/aio-libs/aiohttp/releases/tag/v3.7.1

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@bdraco
Copy link
Member Author

bdraco commented Oct 24, 2020

Every ssl connection is failing with ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)

@bdraco
Copy link
Member Author

bdraco commented Oct 24, 2020

SSL seems broken for lots of cases

2020-10-24 18:20:10 ERROR (MainThread) [homeassistant.components.griddy] Error requesting Griddy getnow data: Cannot connect to host app.gogriddy.com:443 ssl:default [Network unreachable]
2020-10-24 18:20:15 ERROR (MainThread) [homeassistant.components.griddy] Error requesting Griddy getnow data: Cannot connect to host app.gogriddy.com:443 ssl:default [[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1108)]
2020-10-24 18:20:26 ERROR (MainThread) [homeassistant.components.august.gateway] Unable to connect to August service: Cannot connect to host api-production.august.com:443 ssl:True [SSLCertVerificationError: (1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: IP address mismatch, certificate is not valid for '52.88.132.123'. (_ssl.c:1108)")]
2020-10-24 18:20:19 ERROR (MainThread) [custom_components.hacs.custom_components.hacs.remaining_github_calls] Cannot connect to host api.github.com:443 ssl:True [SSLCertVerificationError: (1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: IP address mismatch, certificate is not valid for '140.82.114.5'. (_ssl.c:1108)")]
2020-10-24 18:23:10 ERROR (MainThread) [custom_components.wundergroundpws.sensor] Error fetching WUnderground data: ClientConnectorError(ConnectionKey(host='api.weather.com', port=443, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=1275515410648092276), OSError(101, 'Network unreachable'))
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host owner-api.teslamotors.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')]

@bdraco
Copy link
Member Author

bdraco commented Oct 24, 2020

Looks like the bug has been fixed aio-libs/aiohttp#5118

@bdraco bdraco changed the title Upgrade to aiohttp 3.7.0 Upgrade to aiohttp 3.7.1 Oct 24, 2020
@bdraco
Copy link
Member Author

bdraco commented Oct 24, 2020

Now that aio-libs/aiohttp#5110 is fixed, everything seems to be running smoothly.

Just need to wait for 3.7.1 to be released to pypi

@balloob
Copy link
Member

balloob commented Oct 24, 2020

So uh, are we doing all these HTTPS requests in our test suite 🤔

In another PR, we should solve them all. Our tests should not hit any external API.

@balloob
Copy link
Member

balloob commented Oct 24, 2020

Oh see now that's custom component too, so must be your local instance. Phew :)

@bdraco
Copy link
Member Author

bdraco commented Oct 24, 2020

Sadly the test suite is a problem as well but the ci cuts off at 1 error

@balloob
Copy link
Member

balloob commented Oct 24, 2020

I wonder if we can configure a firewall on CI to block all external access so we do not require a bump to aiohttp to catch this. We just need localhost access.

@bdraco
Copy link
Member Author

bdraco commented Oct 24, 2020

I wonder if we can configure a firewall on CI to block all external access so we do not require a bump to aiohttp to catch this. We just need localhost access.

..and all the things that the CI downloads from github and pypi

@bdraco
Copy link
Member Author

bdraco commented Oct 24, 2020

Hit a regression

aio-libs/aiohttp#5124

@bdraco bdraco mentioned this pull request Oct 25, 2020
21 tasks
@bdraco
Copy link
Member Author

bdraco commented Oct 25, 2020

Regression fixed and I've been running with it overnight without issues.

@frenck
Copy link
Member

frenck commented Oct 25, 2020

This is going to be an interesting change, as there is a fix in here, which Pascal and I have been chasing for over a year now. Nevertheless, this makes me scared for reverse proxy usage right now. Nevertheless, let's deploy this on dev and I will test this nightly with the various add-ons around.

@bdraco bdraco marked this pull request as ready for review October 25, 2020 12:52
@balloob
Copy link
Member

balloob commented Oct 25, 2020

I wonder if we can configure a firewall on CI to block all external access so we do not require a bump to aiohttp to catch this. We just need localhost access.

..and all the things that the CI downloads from github and pypi

We should be fine if we could block the internet while running the test suite. Not the steps prior (installing packages) or afterwards (uploading coverage). But yeah it will be tricky.

@balloob balloob merged commit 221bb5a into home-assistant:dev Oct 25, 2020
@balloob
Copy link
Member

balloob commented Oct 25, 2020

Alright let's merge this, play with it and see how it goes this week :)

@bdraco
Copy link
Member Author

bdraco commented Oct 25, 2020

I wonder if we can configure a firewall on CI to block all external access so we do not require a bump to aiohttp to catch this. We just need localhost access.

..and all the things that the CI downloads from github and pypi

We should be fine if we could block the internet while running the test suite. Not the steps prior (installing packages) or afterwards (uploading coverage). But yeah it will be tricky.

Good idea 👍

@bouwew
Copy link
Contributor

bouwew commented Oct 25, 2020

Liking this!

Hopefully this means we can skip the work-around: plugwise/python-plugwise#23
The fix we need was planned for v3.7.0

rajlaud pushed a commit to rajlaud/home-assistant that referenced this pull request Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants