-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
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
Include backup agent error in response to WS command backup/info #130884
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
|
|
||
|
||
class BackupAgentUnreachableError(BackupAgentError): | ||
"""Raised when the agent can't reach it's API.""" |
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.
"""Raised when the agent can't reach it's API.""" | |
"""Raised when the agent can't reach its API.""" |
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.
Fixed in #130890
agent_backups = await agent.async_list_backups() | ||
for agent_backup in agent_backups: | ||
agent_errors: dict[str, Exception] = {} | ||
agent_ids = list(self.backup_agents.keys()) |
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.
agent_ids = list(self.backup_agents.keys()) | |
agent_ids = list(self.backup_agents) |
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.
Fixed in #130890
async def async_get_backups(self, **kwargs: Any) -> dict[str, _BackupT]: | ||
async def async_get_backups( | ||
self, **kwargs: Any | ||
) -> tuple[dict[str, Backup], dict[str, Exception]]: |
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.
I'd return a dataclass instead of a tuple. That's more robust for changes.
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.
I don't think that's motivated when we only ever call this from the WS API
Test failures are unrelated |
Proposed change
Include backup agent error in response to WS command
backup/info
Type of change
Additional information
Checklist
ruff format 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
.To help with the load of incoming pull requests: