Add backblaze b2 backup integration#149627
Conversation
There was a problem hiding this comment.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
emontnemery
left a comment
There was a problem hiding this comment.
A few comments. I want to understand how the file iteration is supposed to work before I continue the review.
|
@emontnemery Continuing some testing on my side. Will make each conversation as resolved when I have my final implementation in the branch for your review |
|
@ElCruncharino if you want to discuss something, feel free to message me on Discord |
emontnemery
left a comment
There was a problem hiding this comment.
Some follow-up questions and comments.
|
@ElCruncharino please confirm the domain you want to use for this integration, then mark the PR ready for review. |
Done! "backblaze_b2", for reasons stated in the resolved conversation. |
|
Tried finding another way to reach out. Just wanted to say I am impressed by your perseverance in bringing this integration to completion. @ElCruncharino Thank you. Looking forward to trying your work once completed. |
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
reduce test file from 808 to 649 lines, add agent fixture to eliminate repetitive setup, consolidate similar error tests using parametrize, simplify test patterns and remove line number references, maintain 100% coverage with all linting checks passing
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
… backup integration Co-authored-by: Erik Montnemery <erik@montnemery.com>
AsyncIteratorReader was moved from backup.util to util.async_iterator in PR home-assistant#153194. Add fallback import to support both locations.
The signature changed from (hass, stream) to (loop, stream) in PR home-assistant#153194. Add runtime check to use the correct signature based on which version is available.
- Made magic number 5 a constant (MAX_CONCURRENT_DOWNLOADS) - Added test_requests_pool_maxsize_assumption() to verify urllib assumptions - Parametrized test_semaphore_limits_concurrent_metadata_downloads to test both proper limiting and detection of pool exhaustion - Updated docstrings for 6 tests to explain why they need direct agent access
emontnemery
left a comment
There was a problem hiding this comment.
Very nice @ElCruncharino 👍
|
How can I tell which Home Assistant release this will be a part of? And great job @ElCruncharino :) |
Concur, excellent job @ElCruncharino and thank you. @jeroenleenarts, as 1st beta of 2025.11 just went out I would expect this to become part of 2025.12. |
|
Yes, this will be part of HA Core 2025.12 |
|
@hugo-vrijswijk and @ElCruncharino Can you send me a message on Discord? |
Proposed change
Adds a new core integration for Backblaze B2. Can be used as a backup source for HA Backups.
This PR builds upon the foundational work in #145508 by @hugo-vrijswijk and incorporates feedback received on that PR.
Type of change
Additional information
As @hugo-vrijswijk mentioned in their PR,
b2sdkis completely sync, so that needed some refactoring calls wrapped inasync_add_executor_job.Primary changes (based on ongoing discussions in that PR):
Tests were overhauled to get full coverage, but I'm relatively new to writing tests for these types of integrations, so that was a lot of trial and error.
I've also tested locally in the UI with large backups, small backups, and so on with a real B2 bucket, and concluded there were no major functional or performance issues with the code.
Much like @hugo-vrijswijk, this is my first time contributing to HA, so if
This PR fixes or closes issue: fixes #Link to developer documentation pull request:Link to frontend pull request: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: