-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add a timer to track whether we have received BDX init after a query on Darwin #24777
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nivi-apple
force-pushed
the
ota_fix_master
branch
from
February 1, 2023 05:17
fdefb80
to
a957601
Compare
pullapprove
bot
requested review from
amitnj,
andy31415,
anush-apple,
arkq,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
emargolis,
franck-apple,
gjc13,
harimau-qirex,
harsha-rajendran,
hawk248,
jelderton,
jepenven-silabs,
jmartinez-silabs,
jmeg-sfy,
jtung-apple,
ksperling-apple,
lazarkov,
lpbeliveau-silabs and
LuDuda
February 1, 2023 05:18
nivi-apple
force-pushed
the
ota_fix_master
branch
from
February 2, 2023 23:05
2f4baf2
to
f9a219c
Compare
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
bzbarsky-apple
approved these changes
Feb 2, 2023
PR #24777: Size comparison from db8a271 to 15c255e Increases (4 builds for bl702, linux, nrfconnect, telink)
Decreases (10 builds for bl602, cc13x2_26x2, nrfconnect, psoc6, telink)
Full report (53 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
…polling again - This covers the use case where we have an image available but the requestor rejects the transfer for some reason. On the next query image the requestor is able to continue with the BDX transfer. The provider state was not being reset for this scenario due to the polling flag not being reset. - Fixes project-chip#23573
bzbarsky-apple
approved these changes
Feb 3, 2023
andy31415
reviewed
Feb 3, 2023
andy31415
reviewed
Feb 3, 2023
andy31415
reviewed
Feb 3, 2023
andy31415
reviewed
Feb 3, 2023
nivi-apple
force-pushed
the
ota_fix_master
branch
from
February 3, 2023 21:03
42123d8
to
6dac649
Compare
nivi-apple
force-pushed
the
ota_fix_master
branch
from
February 3, 2023 21:08
6dac649
to
fb92d59
Compare
PR #24777: Size comparison from 1832750 to fb92d59 Decreases (4 builds for bl602, bl702, qpg)
Full report (15 builds for bl602, bl702, k32w, linux, mbed, nrfconnect, qpg)
|
…end the response as is - Log the error if the BDX timer fails to start
andy31415
approved these changes
Feb 3, 2023
PR #24777: Size comparison from 1832750 to db8dce1 Increases (5 builds for cc13x2_26x2, esp32, linux, telink)
Decreases (13 builds for bl602, bl702, esp32, nrfconnect, psoc6, qpg, telink)
Full report (53 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
It appears that the main change in this PR applies only to the Darwin platform. If so, please update the title and description to make this clear. |
bzbarsky-apple
changed the title
Add a timer to track whether we have received BDX init after a query …
Add a timer to track whether we have received BDX init after a query on Darwin
Feb 3, 2023
lecndav
pushed a commit
to lecndav/connectedhomeip
that referenced
this pull request
Mar 22, 2023
project-chip#24777) * Add a timer to track whether we have received BDX init after a query image was successful - Currently if an ota requester has a successful query image and an image it available but if for any reason, the ota requester doesn't send BDX init, the provider will be stuck until we reboot the resident. In order to have a fail safe, we are adding a timer that starts after query image returns image available and waits for a BDX init to come. In case BDX init doesn't come, it times out and resets state - Add code to reset state if any API fails on the provider once we prepare for BDX transfer - Stop polling when BDX transfer reset is called - Return QueryImageResponse status busy instead of general failure if the sdk is busy and gets a sexond query image so accessory can handle the error correctly and retry until the sdk is done - When we send a message, handle the case where if an error happens in sending the message close the exchange context and reset state. If the message is a status report and it succeeds, null out the exchange and reset state * Update src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm Co-authored-by: Boris Zbarsky <[email protected]> * Update src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm Co-authored-by: Boris Zbarsky <[email protected]> * Reset mStopPolling to false when we call PrepareForTransfer to start polling again - This covers the use case where we have an image available but the requestor rejects the transfer for some reason. On the next query image the requestor is able to continue with the BDX transfer. The provider state was not being reset for this scenario due to the polling flag not being reset. - Fixes project-chip#23573 * Addressed review comments * Fix the handling of the use case when hasUpdate is false we need to send the response as is - Log the error if the BDX timer fails to start --------- Co-authored-by: Boris Zbarsky <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…image was successful
Currently if an ota requester has a successful query image and an image it available but if for any reason, the ota requester doesn't send BDX init, the provider will be stuck until we reboot the resident. In order to have a fail safe, we are adding a timer that starts after query image returns image available and waits for a BDX init to come. In case BDX init doesn't come, it times out and resets state
Add code to reset state if any API fails on the provider once we prepare for BDX transfer
Stop polling when BDX transfer reset is called
Return QueryImageResponse status busy instead of general failure if the sdk is busy and gets a sexond query image so accessory can handle the error correctly and retry until the sdk is done
Fixes #24679