Commit Graph

307 Commits (15348965f311d07ec5f374c37f41eea9be596b28)

Author SHA1 Message Date
Franck Nijhof 3afadf8adb
Revert "Block peer certs on supervisor" (#67104) 2022-02-23 12:32:07 +01:00
Paulus Schoutsen 938b64081b
Block peer certs on supervisor (#66837)
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
2022-02-22 13:59:40 -08:00
J. Nick Koston 3bf2be1765
Startup with an emergency self signed cert if the ssl certificate cannot be loaded (#66707) 2022-02-18 16:08:26 -08:00
Marc Mueller 8d2fb72cc3
Add type ignore error codes [core] (#66773) 2022-02-17 23:09:22 -08:00
J. Nick Koston 9691128e96
Fix ImportError when discovery deps change (#66518) 2022-02-14 17:12:24 +01:00
Marc Mueller b2ee7cebc9
Improve setup_time typing (#66509) 2022-02-14 14:24:58 +01:00
Erik Montnemery 8d6e2ae354
Import persistent notification part 1 (#63898) 2022-01-11 17:24:59 +01:00
Ruslan Sayfutdinov 55f4962c06
Fix pylint plugin which checks relative imports (#62693) 2021-12-23 11:14:47 -08:00
Robert Blomqvist ea58778a5c
Rephrase upgrade notification message to avoid installing Python 3.10 (#61181) 2021-12-07 17:19:23 -08:00
Paulus Schoutsen b024d88b36
Deprecate Python 3.8 (#57079) 2021-10-05 08:58:20 +02:00
Marc Mueller 7af67d34cf
Use assignment expressions 01 (#56394) 2021-09-18 13:31:35 -10:00
J. Nick Koston 5709640453
Report integrations that block startup wrap up (#56003) 2021-09-09 20:39:22 -07:00
Paulus Schoutsen e0f640c0f8
Guard for doRollover failing (#55669) 2021-09-03 09:53:47 -07:00
jan iversen 3a0a8da648
Change logging to do rollover() instead of rotate() (#55177)
* Change to rollover from rotate.

* Remove test log files.
2021-08-25 17:32:48 +02:00
jan iversen 1e3452496a
Make log rollover at startup (#54865)
* Secure log rollover at startup.

* Review comments.

* Please CI.
2021-08-20 17:59:10 +02:00
J. Nick Koston 564e7fa53c
Avoid sending empty integration list multiple times during subscribe_bootstrap_integrations (#49181) 2021-04-15 23:16:17 -07:00
J. Nick Koston 1f80c756ab
Fix subscribe_bootstrap_integrations to send events (#48754) 2021-04-08 07:30:33 -10:00
J. Nick Koston 12e3bc8101
Provide api to see which integrations are being loaded (#48274)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-04 22:11:44 -10:00
Marc Mueller 4cb7718192
Update typing 16 (#48087) 2021-03-18 22:58:19 +01:00
Marc Mueller e55702d635
Update typing 01 (#48013) 2021-03-17 17:34:55 +01:00
Paulus Schoutsen 2df644c6cc
Clean up secret loading (#47034) 2021-03-02 12:58:53 -08:00
Erik Montnemery ed31cc363b
Wait for registries to load at startup (#46265)
* Wait for registries to load at startup

* Don't decorate new functions with @bind_hass

* Fix typing errors in zwave_js

* Load registries in async_test_home_assistant

* Tweak

* Typo

* Tweak

* Explicitly silence mypy errors

* Fix tests

* Fix more tests

* Fix test

* Improve docstring

* Wait for registries to load
2021-02-11 17:36:19 +01:00
Pascal Vizeli a7a4875f52
Add more debug details to running timeouts (#43644)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-04 13:10:39 +01:00
Ville Skyttä 43474762b2
Drop remaining Python < 3.8 support (#44743)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-04 11:47:29 +01:00
Franck Nijhof 508d33a220
Remove deprecated PTVSD integration (#44748) 2021-01-01 23:36:15 +01:00
Pascal Vizeli d4f9c1979f
Fix deadlock if an integration from stage_1 fails (#43657) 2020-11-26 11:38:30 +01:00
Paulus Schoutsen 819dd27925
Automatically clean up executor as part of closing loop (#43284) 2020-11-16 15:43:48 +01:00
J. Nick Koston 94bf55e29b
Limit concurrency of async_get_integration to avoid creating extra threads (#43085)
* Limit concurrency of async_get_integration to avoid creating extra threads

Since async_get_integration is waiting on the disk most of the time
it would end up creating many new threads because the disk could
not deliver the data in time.

* pylint
2020-11-10 21:34:54 -10:00
springstan a967f689c7
Remove unnecessary instances of dict.keys() (#42518) 2020-10-28 20:43:48 +01:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
J. Nick Koston 0d51d8660e
Install a threading.excepthook on python 3.8 and later (#38741)
Exceptions in threads were being silently discarded and never
logged as the new in python 3.8 threading.excepthook was not
being set.
2020-08-11 09:45:36 +02:00
Pascal Vizeli c291d4aa7d
Intelligent timeout handler for setup/bootstrap (#38329)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-05 14:58:19 +02:00
Joakim Plate bcd604eec2
Detect lingering threads after tests (#37270)
* Detect lingering threads after tests

* Make sure cast is setup before checking state

* Make sure we ask executors of old hass to shutdown

We are not waiting here, just hoping for the best

* Make sure all instances of hass and executors is stopped.

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Also apply hass stopping to scripts

* Adjust to changes how we set up executor

* Add new CoreState.stopped

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-07-09 16:15:14 +02:00
J. Nick Koston 4343e84ecf
Increase slow setup logging to warning level (#37635)
When I fixed verbose logging in #36444, I did not
realize this would mean almost nobody would
see this now.
2020-07-08 15:57:07 +02:00
Paulus Schoutsen f49ce5d1b4
Protect loop set default executor (#37438)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-07-06 15:58:53 -07:00
Franck Nijhof b47be05efc
Add new Remote Python Debugger integration (#36960) 2020-06-22 15:17:59 +02:00
Paulus Schoutsen 5642027ffb
Improve after_dependencies handling (#36898) 2020-06-19 17:24:33 -07:00
Paulus Schoutsen 94132e5572
Add internal/external url to safe mode (#36894) 2020-06-17 17:14:48 -07:00
Paulus Schoutsen 8f3c84b349
Mark config dependency of frontend (#36587) 2020-06-09 23:27:47 -07:00
J. Nick Koston 36b157b85a
Ensure verbose logging flag is respected. (#36444) 2020-06-04 09:51:06 -07:00
Ville Skyttä fc395de511
Upgrade mypy to 0.780 (#36416)
http://mypy-lang.blogspot.com/2020/06/mypy-0780-released.html
2020-06-03 22:51:44 +02:00
J. Nick Koston 578d4a9b6a
Make the frontend available sooner (Part 1 of 2) (#36263)
* 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
2020-06-02 13:54:11 -05:00
J. Nick Koston fa00f3e49b
s/hass.loop.create_task/asyncio.create_task/g (#36262) 2020-05-29 17:13:58 -05:00
Pascal Vizeli ed014e3c96
Revert "Ensure frontend is available if integrations fail to start - Part 1 of 2 (#36093)" (#36251)
This reverts commit fbe7b4ddfa.
2020-05-29 10:18:39 +02:00
J. Nick Koston fbe7b4ddfa
Ensure frontend is available if integrations fail to start - Part 1 of 2 (#36093)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-28 21:09:07 -07:00
J. Nick Koston 5183c40b23
Periodically log when integrations are taking a while to setup (#36208)
* Periodicly log when intergrations are taking a while to setup

When one or more intergrations are taking a while to setup
it is hard to determine which one is the cause.  We can
help narrow this down for the user with a periodic log
message about which domains are still waiting to be setup
every 30s.

* 30 -> 60 per discussion

* only log when the integration is actually doing setup

* reduce, fix race in test
2020-05-28 18:48:42 -05:00
J. Nick Koston f626129e2b
Proceed with startup if an integration setup blocks for more than 30m (#36082)
* Proceed with startup if an integration setup blocks for more than 30m

* Fix test location

* Fix log call

* naming

* revert

* do not shield from cancelation

* Adjust test since we now cancel when we hit the timeout
2020-05-27 13:43:05 -05:00
J. Nick Koston 73616520c0
Use built in queue log handlers to avoid formatting logs in the event loop (#35633)
* Use built in queue log handlers to avoid formatting logs in the event loop

Logging is now formatted and written in another thread to
ensure there is minimal impact on the event loop when
a log message is processed.

This change replaces the existing AsyncHandler log handler
as python 3.7+ now offers an off the shelf solution

* add a simple test

* s/async_migrate_log_handlers_to_queue/async_activate_log_queue_handler/g
2020-05-16 09:29:58 -05:00
Paulus Schoutsen 0246761f94
Log threading exceptions properly (#34789) 2020-04-28 14:31:35 -07:00
Franck Nijhof 7d3c974747
Use set & dict literals (#33636)
Co-authored-by: Daniel Høyer Iversen <mail@dahoiv.net>
2020-04-04 20:05:15 +02:00