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

Handle starting the frontend before finished loading integrations #6068

Merged
merged 12 commits into from May 29, 2020

Conversation

bramkragten
Copy link
Member

@bramkragten bramkragten commented May 28, 2020

Proposed change

For home-assistant/core#36093

Needs home-assistant/home-assistant-js-websocket#117

Type of change

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

Example configuration

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.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

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

@bramkragten bramkragten changed the title WIP handle starting the frontend before finished loading integrations Handle starting the frontend before finished loading integrations May 28, 2020
@bramkragten bramkragten marked this pull request as ready for review May 28, 2020 20:53
src/translations/en.json Outdated Show resolved Hide resolved
@bdraco
Copy link
Member

bdraco commented May 28, 2020

Looking good, code is now catching the start

Co-authored-by: J. Nick Koston <nick@koston.org>
Comment on lines +148 to +150
<hui-warning>
${createEntityNotFoundWarning(this.hass, this._config.entity)}
</hui-warning>
Copy link
Member

Choose a reason for hiding this comment

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

Why actually expect caller to still wrap it in hui-warning and not just return a template from createEntityNotFoundWarning ?

@balloob
Copy link
Member

balloob commented May 28, 2020

I wonder if we can split the backend PR to already add state, so we can unblock this PR?

@bdraco
Copy link
Member

bdraco commented May 29, 2020

I wonder if we can split the backend PR to already add state, so we can unblock this PR?

If I delete

    startup_listeners.append(
        hass.bus.async_listen(EVENT_COMPONENT_LOADED, async_wait_frontend_load)
    )

from the backend PR, it should be mergeable asis. Then we can add it back in later when supervisor is ready.

@balloob balloob merged commit d0a53d1 into dev May 29, 2020
@balloob balloob deleted the start-frontend-sooner branch May 29, 2020 04:09
bdraco added a commit to bdraco/home-assistant that referenced this pull request May 29, 2020
When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

Frontend Changes (home-assistant/frontend#6068)
bdraco added a commit to home-assistant/core that referenced this pull request Jun 2, 2020
* Part 1 of 2 (no breaking changes in part 1).

When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

Frontend Changes (home-assistant/frontend#6068)

* Address review comments

* bump timeout to 1800s, adjust comment

* bump timeout to 4h

* remove timeout failsafe

* and the test
bdraco added a commit to bdraco/home-assistant that referenced this pull request Jun 2, 2020
When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

Frontend Changes (home-assistant/frontend#6068)
bdraco added a commit to bdraco/home-assistant that referenced this pull request Jun 2, 2020
When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

Frontend Changes (home-assistant/frontend#6068)
bdraco added a commit to home-assistant/core that referenced this pull request Jun 2, 2020
* Part 1 of 2 (no breaking changes in part 1).

When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

Frontend Changes (home-assistant/frontend#6068)

* Part 1 of 2 (no breaking changes in part 1).

When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

Frontend Changes (home-assistant/frontend#6068)

* Part 2 of 2 (breaking changes in part 2).

When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

* bump timeout to 1800s, adjust comment

* bump timeout to 1800s, adjust comment

* bump timeout to 4h

* bump timeout to 4h

* remove timeout failsafe

* remove timeout failsafe

* and the test

* and the test

* find the test that needs mocking

* find the test that needs mocking

* Revert "find the test that needs mocking"

This reverts commit 064e7787a8e9bc65df965530726fa1c41f8bcd36.

* Revert "find the test that needs mocking"

This reverts commit 064e7787a8e9bc65df965530726fa1c41f8bcd36.

* fix the one that was missed due to the conflict
@bramkragten bramkragten mentioned this pull request Jun 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2022
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.

None yet

4 participants