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

Check if requirements are installed in the executor #71611

Merged
merged 8 commits into from Jun 13, 2022

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented May 9, 2022

Proposed change

May help with #71575

pkg_util.is_installed does I/O, it should run in the executor

This got rid of many more asyncio warnings when a component was discovered or startup was happening on a slow disk

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

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.
  • 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.

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:

@github-actions
Copy link

github-actions bot commented Jun 9, 2022

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 9, 2022
@bdraco
Copy link
Member Author

bdraco commented Jun 9, 2022

Still need to get back to this

@github-actions github-actions bot removed the stale label Jun 9, 2022
@bdraco
Copy link
Member Author

bdraco commented Jun 9, 2022

Too many irons in the fire this month

@bdraco
Copy link
Member Author

bdraco commented Jun 9, 2022

Retest looks good. Less I/O starvation at startup. This won't address the CPU being bound on the GIL issues at startup, but making all that better is slow grinding incremental process. We will never be able to fix the problem where we have to load python files from disk in the event loop though as there are so many packages that make assumptions that they are loaded in the thread the event loop is running. We could make that better with a limit to how many we load at the same time but the tradeoff is slower startup

@bdraco bdraco marked this pull request as ready for review June 9, 2022 19:04
@bdraco bdraco requested a review from a team as a code owner June 9, 2022 19:04
@bdraco bdraco marked this pull request as draft June 10, 2022 03:57
@bdraco bdraco marked this pull request as ready for review June 13, 2022 19:09
@balloob balloob merged commit 0ffeb6c into home-assistant:dev Jun 13, 2022
bdraco added a commit to bdraco/home-assistant that referenced this pull request Jun 13, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2022
@bdraco bdraco added the noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) label Jun 28, 2022
@bdraco bdraco added the reliable-startup Improve or fix a reliability issue with startup label Jun 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed core noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) reliable-startup Improve or fix a reliability issue with startup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants