Skip to content

fix(update): Check that there is a free OTA partition before writing#12264

Merged
me-no-dev merged 1 commit intoespressif:masterfrom
lbernstone:updater_20260119
Jan 21, 2026
Merged

fix(update): Check that there is a free OTA partition before writing#12264
me-no-dev merged 1 commit intoespressif:masterfrom
lbernstone:updater_20260119

Conversation

@lbernstone
Copy link
Contributor

Description of Change

Added a check to see that next OTA partition is not the running partition. Writing to the active partition causes an immediate crash.

Test Scenarios

Tested on an ESP32, but should be quite universal

Related links

Brought up in #12252, but that user is not expecting a fix.

@lbernstone lbernstone requested a review from me-no-dev as a code owner January 19, 2026 23:34
@github-actions
Copy link
Contributor

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello lbernstone, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against bc54f3f

@github-actions
Copy link
Contributor

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP320⚠️ +160.000.00000.000.00
ESP32C30⚠️ +160.000.00000.000.00
ESP32C50⚠️ +160.000.00000.000.00
ESP32C60⚠️ +160.000.00000.000.00
ESP32H20⚠️ +160.000.00000.000.00
ESP32P40⚠️ +180.000.00000.000.00
ESP32S20⚠️ +200.00⚠️ +0.01000.000.00
ESP32S30⚠️ +200.000.00000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32ESP32C3ESP32C5ESP32C6ESP32H2ESP32P4ESP32S2ESP32S3
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/ArduinoOTA/examples/BasicOTA⚠️ +120⚠️ +160⚠️ +160⚠️ +160--⚠️ +160⚠️ +160⚠️ +200
libraries/ArduinoOTA/examples/SignedOTA⚠️ +160⚠️ +140⚠️ +140⚠️ +140--⚠️ +140⚠️ +120⚠️ +120
libraries/HTTPUpdate/examples/httpUpdate⚠️ +120⚠️ +160------⚠️ +160⚠️ +160--
libraries/HTTPUpdate/examples/httpUpdateSPIFFS⚠️ +120⚠️ +160------⚠️ +160⚠️ +160--
libraries/HTTPUpdate/examples/httpUpdateSecure⚠️ +120⚠️ +160------⚠️ +16000--
libraries/HTTPUpdateServer/examples/WebUpdater⚠️ +120⚠️ +160------⚠️ +160⚠️ +160--
libraries/Update/examples/AWS_S3_OTA_Update⚠️ +120⚠️ +160------⚠️ +160⚠️ +160--
libraries/Update/examples/HTTP_Client_AES_OTA_Update⚠️ +120⚠️ +160------⚠️ +160⚠️ +160--
libraries/Update/examples/HTTP_Server_AES_OTA_Update⚠️ +120⚠️ +160------⚠️ +160⚠️ +160--
libraries/Update/examples/OTAWebUpdater⚠️ +120⚠️ +160------⚠️ +160⚠️ +160--
libraries/Update/examples/SD_Update⚠️ +160⚠️ +160----⚠️ +160⚠️ +180⚠️ +200--
libraries/Update/examples/Signed_OTA_Update⚠️ +160⚠️ +120------⚠️ +120⚠️ +120--
libraries/WebServer/examples/HttpAdvancedAuth⚠️ +160⚠️ +160------⚠️ +160⚠️ +160--
libraries/WebServer/examples/HttpAuthCallback⚠️ +120⚠️ +160------⚠️ +160⚠️ +160--
libraries/WebServer/examples/HttpAuthCallbackInline⚠️ +120⚠️ +160------⚠️ +160⚠️ +200--
libraries/WebServer/examples/HttpBasicAuth⚠️ +120⚠️ +160------⚠️ +160⚠️ +160--
libraries/WebServer/examples/HttpBasicAuthSHA1⚠️ +120⚠️ +160------⚠️ +160⚠️ +160--
libraries/WebServer/examples/HttpBasicAuthSHA1orBearerToken⚠️ +120⚠️ +160------⚠️ +160⚠️ +160--
libraries/WebServer/examples/WebUpdate⚠️ +120⚠️ +160------⚠️ +160⚠️ +160--

@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2026

Test Results

 90 files   90 suites   31m 49s ⏱️
 67 tests  67 ✅ 0 💤 0 ❌
683 runs  683 ✅ 0 💤 0 ❌

Results for commit bc54f3fd.

♻️ This comment has been updated with latest results.

@me-no-dev me-no-dev added the Status: Pending Merge Pull Request is ready to be merged label Jan 21, 2026
@me-no-dev me-no-dev merged commit 8e3993f into espressif:master Jan 21, 2026
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Pending Merge Pull Request is ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants