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

Fix Plex startup race condition #28934

Merged
merged 1 commit into from Nov 21, 2019
Merged

Conversation

@jjlawren
Copy link
Contributor

jjlawren commented Nov 21, 2019

Description:

When starting up, there was a potential race condition where we would attempt to create new media_player entities before the listening dispatcher was set up. This delays the connection of the websocket connection until HA is fully started. This ensures the dispatch listener for new media_player entities is available when new Plex clients are found during the initial scan.

Related issues: fixes #28928 fixes #28491
Possibly a fix for #28485

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
@project-bot project-bot bot added this to Needs review in Dev Nov 21, 2019
@project-bot project-bot bot moved this from Needs review to By Code Owner in Dev Nov 21, 2019
@balloob balloob merged commit a62bd97 into home-assistant:dev Nov 21, 2019
8 of 9 checks passed
8 of 9 checks passed
CI in progress
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
cla-bot Everyone involved has signed the CLA
docs-missing Documentation ok.
Dev automation moved this from By Code Owner to Done Nov 21, 2019
balloob added a commit that referenced this pull request Nov 21, 2019
@jjlawren jjlawren deleted the jjlawren:plex_startup_race branch Nov 21, 2019
@jimmyeao

This comment has been minimized.

Copy link

jimmyeao commented Nov 21, 2019

Now all of my plex media players show as unavailable?

@jjlawren

This comment has been minimized.

Copy link
Contributor Author

jjlawren commented Nov 21, 2019

@jimmyeao this is a merged PR that has not been released yet. Please open an issue if you're encountering a new problem.

@jimmyeao

This comment has been minimized.

Copy link

jimmyeao commented Nov 21, 2019

Ah, now I feel stupid! How would i go about testing this?

@jjlawren

This comment has been minimized.

Copy link
Contributor Author

jjlawren commented Nov 21, 2019

It'll be in 0.102.1 which should be released shortly.

@balloob balloob mentioned this pull request Nov 21, 2019
@jjlawren jjlawren mentioned this pull request Nov 22, 2019
4 of 4 tasks complete
@lock lock bot locked and limited conversation to collaborators Nov 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
4 participants
You can’t perform that action at this time.