-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
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
Allow async_integration_yaml_config to raise if config fails on reload #101037
Conversation
Hey there @emontnemery, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
except LOAD_EXCEPTIONS as ex: | ||
_raise_on_fail(ex, f"Platform error: {domain}") | ||
_LOGGER.exception("Platform error: %s", domain) | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code part did not have tests for the current code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very nice, thanks @jbouwh 👍
I'd like a second opinion on this in case the solution is not good for some reason. |
One concern is that while this gives a better explanation to the user in frontend about what went wrong, it also spams the log with an unneeded stack trace. A suggestion discussed on Discord is to add a parameter to |
Related: #101357 |
c7db8f1
to
9b0abdb
Compare
The concerns about logging are addressed with: #101762 |
Co-authored-by: Erik Montnemery <[email protected]>
787ee40
to
986c6f3
Compare
Super seeded by #102410 |
Proposed change
Allow async_integration_yaml_config to throw if config fails on reload. This way integrations no longer need to raise an exception if the config failed causing additional errors in the logs.
Before the change with raising in the MQTT integration logging and extra line:
After the change with more details in the UI:
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: