-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
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
Fix Azure data explorer #119089
Merged
Merged
Fix Azure data explorer #119089
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
58f3a71
chore: Refactor Azure Data Explorer client initialization
kaareseras 5990240
Refactor Azure Data Explorer client initialization
kaareseras e47c458
Merge branch 'dev' into adx-bug
kaareseras f55cf36
fixed filter
kaareseras b9edda6
fixed data bug
kaareseras 0cd5999
Merge branch 'dev' into adx-bug
kaareseras af7378c
chore: Fix typos and improve consistency in Azure Data Explorer clien…
kaareseras 53d194e
refactoring client
kaareseras f39c922
Use Booleanselector
edenhaus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.
Im not sure why, but this change will cause many test to fail
FAILED tests/components/azure_data_explorer/test_init.py::test_connection[Exception] - AssertionError: assert <ConfigEntryState.NOT_LOADED: 'not_loaded'> == <ConfigEntryState.SETUP_ERROR: 'setup_error'>
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.
The tests are running successfully on my machine with the above change. Can you please recheck?
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.
Sure thing :-)
Results (3.27s):
11 passed
8 failed
- tests/components/azure_data_explorer/test_config_flow.py:15 test_config_flow
- tests/components/azure_data_explorer/test_init.py:153 test_filter[allowlist]
- tests/components/azure_data_explorer/test_init.py:153 test_filter[denylist]
- tests/components/azure_data_explorer/test_init.py:153 test_filter[filtered_allowlist]
- tests/components/azure_data_explorer/test_init.py:153 test_filter[filtered_denylist]
- tests/components/azure_data_explorer/test_init.py:268 test_connection[KustoServiceError]
- tests/components/azure_data_explorer/test_init.py:268 test_connection[KustoAuthenticationError]
- tests/components/azure_data_explorer/test_init.py:268 test_connection[Exception]
and when debugging the code, I get this error:
2024-06-10 16:45:40.022 ERROR (MainThread) [homeassistant.setup] Error during setup of component azure_data_explorer
Traceback (most recent call last):
File "/workspaces/core/homeassistant/setup.py", line 404, in _async_setup_component
result = await task
^^^^^^^^^^
File "/workspaces/core/homeassistant/components/azure_data_explorer/init.py", line 69, in async_setup
hass.data[DOMAIN][DATA_FILTER] = yaml_config[DOMAIN].pop(CONF_FILTER)
~~~~~~~~~~~^^^^^^^^
KeyError: 'azure_data_explorer'
And the integration does not load
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.
There is something wrong with your dev environment. Can you please check that your are using the latest version of all requirements