refactor(core): backup success after I/O-related errors#6856
Conversation
In case the host is unavailable, #6651 will stop sending ButtonRequests. This PR makes sure that `show_backup_success()` won't fail if there was an error during the backup process - so the success screen will be shown to the user. Currently THP debug builds fail with an assertion if the FW tries to write again before the previous write was ACKed, so this PR makes sure that after an error no ButtonRequest will be sent after #6651 is merged. Note: writing the secret to storage is not affected by this change (since it doesn't access the active context / button request handler). [no changelog]
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe change modifies error-handling scope in a backup process by expanding the Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
|
| model | device_test | click_test | persistence_test |
|---|---|---|---|
| T2T1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
| T3B1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
| T3T1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
| T3W1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
Latest CI run: 25156240778
obrusvit
left a comment
There was a problem hiding this comment.
utACK
The with continue_on_error(..) context extended to the whole perform_backup + show_backup_success interaction with writing to storage in between.




































In case the host is unavailable, #6651 will stop sending ButtonRequests.
This PR makes sure that
show_backup_success()won't fail if there was an error during the backup process - so the success screen will be shown to the user.Currently THP debug builds fail with an assertion if the FW tries to write again before the previous write was ACKed, so this PR makes sure that after an error no ButtonRequest will be sent after #6651 is merged.
Note: writing the secret to storage is not affected by this change, since it doesn't access the active context / button request handler.