Repository navigation
Add MD5 hash generate to the firmware for display and download - #2969
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2969 +/- ##
=======================================
Coverage 99.76% 99.77%
=======================================
Files 300 300
Lines 26499 26522 +23
=======================================
+ Hits 26438 26461 +23
Misses 61 61
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
|
ESPHome Bot (esphbot)
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
|
Addressed in 67e47eb:
ESPHome Bot (@esphbot) review |
Verified in 67e47eb. Docs match code now. No build-dir writes remain. Listed sidecars no longer duplicate. All three prior findings resolved. |
|
|
ESPHome Bot (esphbot)
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
|
Follow-up in 1106286, which supersedes 67e47eb: ESPHome Bot (@esphbot) review |
Verified in 1106286. No sidecar writes remain. Download path matches main. The |
|
|
ESPHome Bot (esphbot)
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
There was a problem hiding this comment.
🟡 Changes recommended
An artifact removed during listing can trigger an uncaught FileNotFoundError, causing firmware/get_binaries to return INTERNAL_ERROR instead of the remaining available artifacts.
1 open issue
What changed in this PR
Adds firmware MD5 digests to the backend artifact listing, supporting checksum display and download in companion frontend PR #2046 for http_request updates.
Changes:
- Computes and caches MD5 digests for downloadable artifacts, excluding ELF debug symbols.
- Updates tests to verify digests and rehashing after an artifact changes.
- Documents the optional
md5response field.
| File | Description |
|---|---|
tests/controllers/firmware/test_get_binaries.py |
Verifies artifact digests and cache invalidation after rebuilds. |
esphome_device_builder/controllers/firmware/download.py |
Adds cached MD5 calculation to artifact listings. |
docs/API.md |
Documents MD5 availability in firmware/get_binaries. |
Review effort: Balanced
|
d745318: a stat, read or path-escape failure on one artifact now leaves that row without ESPHome Bot (@esphbot) review |
Verified at download.py:180-185. |
|
|
Verified at download.py:184-187. FileNotFoundError and ValueError log at debug. Other OSErrors log a warning. Symlink case fixed too: download.py:291 names the file from the listed basename. Both findings resolved. |
Vanished-file test confirmed. It asserts no warning and that the row is kept without md5. Debug branch now covered. |
|
|
ESPHome Bot (esphbot)
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
|
ac0cf7d answers Copilot's vanished-artifact thread: an artifact removed between the existence filter and the hash now drops out of the listing. An escaping or unreadable one keeps its row without ESPHome Bot (@esphbot) review |
|
|
ESPHome Bot (esphbot)
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
ESPHome Bot (@esphbot) review |
|
af29ff4 merges main on top of 4561bb8. ESPHome Bot (@esphbot) review |
|
Verified both fixes. |
|
|
ESPHome Bot (esphbot)
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
|
95d16af (MEDIUM, silent field omission): docs/API.md now says ESPHome Bot (@esphbot) review |
Verified in docs/API.md. Missing |
PR Review — Add MD5 hash generate to the firmware for display and downloadReady to merge. Commit 95d16af fixes the last open finding (the missing What this PR does well:
What needs attention:
Checklist
Automated review by Kōan (Claude) |
ESPHome Bot (esphbot)
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.

What does this implement/fix?
Related issue or feature (if applicable):
Add MD5 hash generate for the firmware to allow for display and download—very useful for updates via http_request.
esphome/device-builder-frontend#2046
Types of changes
bugfixnew-featureenhancementbreaking-changerefactordocsmaintenancecidependenciesFrontend coordination
Checklist
ruff,codespell, yaml/json/python checks).tests/where applicable.components.index.json/definitions/components/*.jsonhave not been hand-edited (regenerate viascript/sync_components.pyif a sync is needed).docs/ARCHITECTURE.mdand/ordocs/API.md.