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

Update aioairzone-cloud to v0.3.5 #103315

Merged
merged 7 commits into from
Nov 5, 2023

Conversation

Noltari
Copy link
Contributor

@Noltari Noltari commented Nov 3, 2023

Proposed change

Update aioairzone-cloud to v0.3.5, which adds a Semaphore that limits the number of API requests performed concurrently.

Update aioairzone-cloud to v0.3.5, which adds support for disabling the use of a shared aiohttp ClientSession.
This PR also removes the usage of async_get_clientsession and forces the library to create separate aiohttp client sessions on each request, which fixes the issue for users that have connection hangs when more than 4-5 parallel requests are made to the same host with a shared aiohttp ClientSession.
I know this isn't ideal but it's the only solution I can think of besides limiting the number of concurrent connections to 4.

More context:

Releases:

Git compare: Noltari/aioairzone-cloud@0.3.2...0.3.5

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)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

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
  • I have followed the perfect PR recommendations
  • 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.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reverts accidental TaskGroup changes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
@Noltari Noltari changed the title Update aioairzone-cloud to v0.3.3 Update aioairzone-cloud to v0.3.4 Nov 3, 2023
@Noltari Noltari marked this pull request as ready for review November 3, 2023 21:00
@bdraco
Copy link
Member

bdraco commented Nov 4, 2023

@Noltari
Copy link
Contributor Author

Noltari commented Nov 4, 2023

Have you tried setting PARALLEL_UPDATES ?

https://developers.home-assistant.io/docs/integration_fetching_data/?_highlight=PARALLEL_UPDATES#request-parallelism

No, I haven't tried that.
I will try but I don't think it's going to work since my integration updates all the devices with the same coordinator...

@bdraco
Copy link
Member

bdraco commented Nov 4, 2023

Have you tried a semaphore lock in the library to limit the number of requests at the same time instead?

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
@Noltari
Copy link
Contributor Author

Noltari commented Nov 4, 2023

Have you tried a semaphore lock in the library to limit the number of requests at the same time instead?

Done in v0.3.5:
Noltari/aioairzone-cloud@47ac331
68cc9ca

Thanks for the suggestion @bdraco
We might not be fixing the root cause, but at least those users with aiohttp hang issues will be able to use the Airzone Cloud integration.
Any chance this could be added to 2023.11 milestone?

@Noltari Noltari changed the title Update aioairzone-cloud to v0.3.4 Update aioairzone-cloud to v0.3.5 Nov 4, 2023
@bdraco bdraco added this to the 2023.11.2 milestone Nov 4, 2023
@bdraco
Copy link
Member

bdraco commented Nov 4, 2023

might be a new package publish unrelated

venv/lib/python3.12/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
tests/components/abode/conftest.py:5: in <module>
    from jaraco.abode.helpers import urls as URL
venv/lib/python3.12/site-packages/jaraco/abode/__init__.py:5: in <module>
    from .client import Client
venv/lib/python3.12/site-packages/jaraco/abode/client.py:18: in <module>
    from .event_controller import EventController
venv/lib/python3.12/site-packages/jaraco/abode/event_controller.py:13: in <module>
    from .helpers import timeline as TIMELINE
venv/lib/python3.12/site-packages/jaraco/abode/helpers/timeline.py:6: in <module>
    from jaraco.functools import call_aside
E   ImportError: cannot import name 'call_aside' from 'jaraco.functools' (/home/runner/work/core/core/venv/lib/python3.12/site-packages/jaraco/functools/__init__.py)

@bdraco
Copy link
Member

bdraco commented Nov 4, 2023

published 4 hours ago https://pypi.org/project/jaraco.functools/

@Noltari
Copy link
Contributor Author

Noltari commented Nov 4, 2023

https://pypi.org/project/jaraco.functools/

Yes, dev is failing too...
c04db6a

@bdraco
Copy link
Member

bdraco commented Nov 4, 2023

#103406

@Noltari
Copy link
Contributor Author

Noltari commented Nov 5, 2023

@bdraco
Copy link
Member

bdraco commented Nov 5, 2023

Definitely unrelated. It's likely due to the dst change.

@bdraco bdraco merged commit fefea89 into home-assistant:dev Nov 5, 2023
44 of 46 checks passed
@bdraco
Copy link
Member

bdraco commented Nov 5, 2023

Thanks @Noltari

@Noltari Noltari deleted the airzone-cloud-v0.3.3 branch November 5, 2023 18:59
frenck pushed a commit that referenced this pull request Nov 6, 2023
* Update aioairzone-cloud to v0.3.3

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update aioairzone-cloud to v0.3.4

Reverts accidental TaskGroup changes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update aioairzone-cloud to v0.3.5

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Trigger Github CI

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AirzoneCloud integration after login not load entities.
3 participants