03582402fa
Add debug logging for when a chain of tasks blocks startup ( #38311 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev >
Co-authored-by: Martin Hjelmare <marhje52@gmail.com >
2020-07-28 18:24:29 +02:00
J. Nick Koston and GitHub
a7459b3126
Log which task is blocking startup when debug logging is on ( #38134 )
...
* Log which task is blocking startup when debug logging for homeassistant.core is on
* test needs to go one level deeper now
2020-07-23 20:03:42 -06:00
J. Nick Koston and GitHub
d7811a4adf
Avoid generating a Context() object every second ( #38085 )
...
Every second we were calling the getrandom() syscall to generate a uuid4
for a context that will never be looked:
* In most setups there are no more time_changed listeners
* The ones that do exist never care about context
* time_changed events are never saved in the database
2020-07-22 21:52:10 -07:00
Paulus Schoutsen and GitHub
8ed1a29c82
Drop white blacklist pt1 ( #37816 )
2020-07-13 17:43:11 +02:00
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
f49ce5d1b4
Protect loop set default executor ( #37438 )
...
Co-authored-by: J. Nick Koston <nick@koston.org >
2020-07-06 15:58:53 -07:00
7968cd650a
Add concept of allowed external URLs to config ( #36988 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io >
2020-06-24 17:37:01 -07:00
Paulus Schoutsen and GitHub
de12c21ce7
Fire config changed event during start ( #36812 )
2020-06-15 15:22:53 -07:00
J. Nick Koston and GitHub
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
Pascal Vizeli and GitHub
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
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
Franck Nijhof and GitHub
d3ae8a938c
Fix handling of additional data in core config storage ( #35660 )
2020-05-16 13:31:15 +02:00
Franck Nijhof and GitHub
e56dd8ed50
Detect use of deprecated base_url ( #35353 )
...
* Detect use of deprecated base_url
* Update get_url helper
* Update core migration
* Migrate all tests
2020-05-08 17:52:32 +02:00
Franck Nijhof and GitHub
2223592486
Add get_url helper, deprecate base_url ( #35224 )
2020-05-08 02:29:47 +02:00
Paulus Schoutsen and GitHub
ec47216388
Use built-in test helpers on 3.8 ( #34901 )
2020-04-30 13:29:50 -07:00
Franck Nijhof and GitHub
98a2efcbab
Collection of random (mainly) test improvements ( #33733 )
2020-04-06 12:51:48 +02:00
Franck Nijhof and GitHub
03dd92d51b
Use set literals in tests ( #33669 )
2020-04-05 02:20:09 +02:00
Phil Bruckner and GitHub
bf1b408038
Handle cancellation in ServiceRegistry.async_call ( #33644 )
2020-04-04 15:36:33 -07:00
David F. Mulcahey and GitHub
bcd1eb952c
RFC - Add a 3rd state to the HA shutdown sequence for writing… ( #33358 )
...
* add third stage to hass shutdown
* use 3rd stage in storage
* update core state
* add writing data to multi stop ignore
* update core test
* review comment
* update name based on feedback
2020-03-30 10:18:39 -07:00
07fa844c43
Speed up validate_entity_id ( #32137 )
...
* Speed up validate_entity_id
* Add some more invalid entity IDs
* Adjust regular expression
* Extend and sort test cases
* Update regular expression, more cases, faster
* Adjust tests, allow start with number, disallow double underscore
Co-authored-by: Franck Nijhof <frenck@frenck.nl >
2020-02-24 08:35:02 -08:00
Paulus Schoutsen and GitHub
beee1298c5
Extend safe mode ( #31927 )
...
* Extend safe mode
* Add safe mode boolean to config JSON output and default Lovelace
* Add safe mode to frontend
* Update accent color
2020-02-18 11:52:38 -08:00
Paulus Schoutsen and GitHub
12de3f1e47
Clean up frontend services and events ( #31654 )
...
* Clean up frontend services and events
* Fix bug in core instead
* Add test that core works correctly with callback marked async funcs
2020-02-09 19:47:16 -08:00
Ville Skyttä and GitHub
5e2ba2eb77
Enable some more bandit checks ( #30857 )
...
* Enable B108 (hardcoded tmp dir), address findings
* Enable B602 (subprocess popen with shell), address findings
* Enable B604 (start process with shell), address findings
* Enable B306 (mktemp), B307 (eval), and B325 (tempnam), no issues to address
2020-01-20 18:44:55 +02:00
Ville Skyttä and Paulus Schoutsen
fa4fa30461
Various string cleanups ( #30435 )
...
* Remove some unnecessary string concatenations
* Replace some simple str.formats with f-strings
* Replace some string concatenations with f-strings
2020-01-03 14:47:06 +01:00
Bas Nijholt and Franck Nijhof
f60125b5c9
Sort imports according to PEP8 for 'tests' ( #29791 )
2019-12-09 16:52:24 +01:00
Pascal Vizeli and GitHub
c1851a2d94
Cleanup coroutine threadsafe ( #27080 )
...
* Cleanup coroutine threadsafe
* fix lint
* Fix typing
* Fix tests
* Fix black
2019-10-01 16:59:06 +02:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Paulus Schoutsen and GitHub
b90636f640
Update home zone when core config updated ( #24237 )
...
* Update home zone when core config updated
* Lint
2019-05-31 23:03:45 -07:00
Paulus Schoutsen and GitHub
f995ab9d54
Don't pass in loop ( #23984 )
...
* Don't pass in loop
* Revert some changes
* Lint + Axis revert
* reinstate loop
* Fix a test
* Set loop
* Update camera.py
* Lint
2019-05-22 21:09:59 -07:00
Paulus Schoutsen and GitHub
9e96397e6a
Require core config detection to be triggerd manually ( #24019 )
...
* Detect core config
* Remove elevation
* Lint
* Lint
* Fix type
2019-05-22 17:24:46 -07:00
Erik Montnemery and GitHub
afe9fc221e
Fire event when core config is updated ( #23922 )
...
* Fire event when core config is updated
2019-05-20 20:02:36 +02:00
Erik Montnemery and Paulus Schoutsen
c2fc8a0d61
Load HA core config from storage ( #23872 )
...
* Load HA core config from storage
* Tweak
* Lint, review comments
* Fix test
* Add tests
* Lint
* Address comments
2019-05-16 16:27:53 +02:00
Andrew Sayre and Paulus Schoutsen
02d8731a61
Add HEOS sign-in/out services ( #23729 )
...
* Add HEOS sign-in/out services
* Fix typo in comment
2019-05-07 09:39:42 -07:00
Jason Hu and Paulus Schoutsen
f1b867dccb
Re-thrown exception occurred in the blocking service call ( #21573 )
...
* Rethrown exception occurred in the actual service call
* Fix lint and test
2019-03-01 23:09:31 -08:00
Paulus Schoutsen and GitHub
52f337ef00
Allow chaining contexts ( #21028 )
...
* Allow chaining contexts
* Add stubbed out migration
2019-03-01 10:08:38 -08:00
Paulus Schoutsen and Pascal Vizeli
cf3a8b60ff
Prevent invalid context from crashing ( #21231 )
...
* Prevent invalid context from crashing
* Lint
2019-02-20 08:02:56 +01:00
Paulus Schoutsen and GitHub
d2fea76fd7
Add context to service call event ( #21181 )
2019-02-18 13:07:44 -08:00
Jason Hu and Andrew Sayre
8137b0bb9e
Fix coroutine never awaited warning in test ( #20892 )
2019-02-09 15:13:12 -06:00
Andrew Sayre and Paulus Schoutsen
e73569c203
Added partial detection to async_add_job ( #20119 )
2019-01-14 15:08:44 -08:00
Paulus Schoutsen and GitHub
59581786d3
Add raw service data to event ( #19163 )
2018-12-10 12:58:51 +01:00
Paulus Schoutsen and Pascal Vizeli
df21dd21f2
RFC: Call services directly ( #18720 )
...
* Call services directly
* Simplify
* Type
* Lint
* Update name
* Fix tests
* Catch exceptions in HTTP view
* Lint
* Handle ServiceNotFound in API endpoints that call services
* Type
* Don't crash recorder on non-JSON serializable objects
2018-11-30 21:28:35 +01:00
Paulus Schoutsen and GitHub
08fe7c3ece
Pytest tests ( #17750 )
...
* Convert core tests
* Convert component tests to use pytest assert
* Lint 🤷♂️
* Fix test
* Fix 3 typos in docs
2018-10-24 12:10:05 +02:00
Anders Melchiorsen and Paulus Schoutsen
0bf10b0b09
Fire an event when timer gets out of sync ( #17398 )
2018-10-15 11:34:36 +02:00
Anders Melchiorsen and Paulus Schoutsen
3e0c6c176a
Rework timer delays ( #16650 )
...
* Calibrate timer for each tick
* Return of timer out of sync detection
2018-09-17 10:10:50 +02:00
Anders Melchiorsen and Paulus Schoutsen
e82e75baf3
Improve precision of timer ticks ( #16598 )
2018-09-14 12:28:09 +02:00
Paulus Schoutsen and GitHub
06af76404f
Fix invalid state ( #16558 )
...
* Fix invalid state
* Make slightly more efficient in unsubscribing
* Use uuid4"
2018-09-11 21:40:35 +02:00
Ville Skyttä and Fabian Affolter
dbd0763f83
Grammar and spelling fixes ( #16065 )
2018-08-19 22:29:08 +02:00
Paulus Schoutsen and GitHub
9512bb9587
Add and restore context in recorder ( #15859 )
2018-08-10 18:09:01 +02:00
Paulus Schoutsen and Jason Hu
c7f4bdafc0
Context ( #15674 )
...
* Add context
* Add context to switch/light services
* Test set_state API
* Lint
* Fix tests
* Do not include context yet in comparison
* Do not pass in loop
* Fix Z-Wave tests
* Add websocket test without user
2018-07-28 17:53:37 -07:00
Andrey and GitHub
c2fe0d0120
Make typing checks more strict ( #14429 )
...
## Description:
Make typing checks more strict: add `--strict-optional` flag that forbids implicit None return type. This flag will become default in the next version of mypy (0.600)
Add `homeassistant/util/` to checked dirs.
## Checklist:
- [x] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
2018-07-13 13:24:51 +03:00