-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Add error handling to input_select integration #93940
Add error handling to input_select integration #93940
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Did you ran the tests in your local environment? Because you checked the checkbox, but the tests are failing. You can run the tests in your dev environment using pytest: It looks like you adjusted some code which was tested and did not work right now. Now an exception is thrown, which is not expected by the test. You would need to adjust the unit test to match the new behavior! |
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.
You could remove the log warning, because the raised Error should get logged anyways and thus the warning is redundant...
I did not test this, this is only an assumption, so you should test it before applying the change.
Thanks for your response! I probably missed running the corresponding tests for the
And also thanks for the clarification on the log message. I’ll make my changes soon 😉 |
I now added the exception handler to the failing tests and in my environment (GitHub Codespaces) all tests related to the |
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.
Thanks for your PR!
Looks good to me now...
@dgomes Thanks for reviewing my work! Just one little question: Right now, the CI pipeline ran successfully but skipped one step. The error message that GitHub Actions displays says that the maximum execution time has been exceeded. |
It can happen sometimes that not all parts of CI run successfully when e.g. a server is not responding. Usually closing and re-opening the PR should retrigger a CI run, but since this is your first PR you need to wait for someone with elevated rights to retrigger the CI run. |
it's related to codecov, just as @freeDom- mentioned: close -> open the PR for the CI to run again |
Closed and reopened PR to rerun ci |
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.
Proposed change
Added error handling to the
async_select_option
methon inInputSelect
. This fixes this issue by @frenck.Type of change
Additional information
input_select.select_option
service, swallows errors when an invalid option is set #92855Checklist
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: