Skip to content
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

Change CLI option behavior for OTA-R and OTA-P to revert back to the success case after using the CLI supplied values #16095

Merged
merged 11 commits into from
Mar 14, 2022

Conversation

isiu-apple
Copy link
Contributor

@isiu-apple isiu-apple commented Mar 11, 2022

Problem

Currently the values supplied in CLI options for OTA-P and OTA-R remain the same for the duration of its runtime. Therefore real world scenarios where Provider replies Busy, and then on subsequent tries UpdateAvailable is not possible.

Fixes: #15656

Change overview

Change the behavior of the following CLI supplied values to use the supplied value only once, and then revert back to the success value on subsequent request/responses.

Provider:

-q/--queryImageStatus <updateAvailable | busy | updateNotAvailable> 
-a/--applyUpdateAction <proceed | awaitNextAction | discontinue>
-t/--delayedQueryActionTimeSec <time>
-p/--delayedApplyActionTimeSec <time>
-u/--userConsentState <granted | denied | deferred>

Requestor:

-u/--userConsentState <granted | denied | deferred>

Testing

Tested various combinations of the above CLI options and ensured that subsequent QueryImage commands succeed and default to the success path. Also ensured that the delayedQueryActionTimeSec and delayedApplyActionTimeSec values supplied is applied to the first QueryImageResponse and ApplyUpdateResponses only respectively and reverts back to 0 on subsequent QueryImageResponse and ApplyUpdateResponses respectively.

…QueryImageResponse and ApplyImageResponse commands

- For OTA-P, make -q, -a, and -u be applied just once and then revert back to the success case.
- Remove counters and just revert behavior to success case after first use
- Fix userConsentState ignore once case
- Remove count variables.
- Update comments.
- Split -t command line arg into -t and -p.
@github-actions
Copy link

github-actions bot commented Mar 14, 2022

PR #16095: Size comparison from 6e76729 to b8a1945

Full report (16 builds for cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 6e76729 b8a1945 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 602466 602466 0 0.0
.app_xip_area 509644 509644 0 0.0
.bss 75576 75576 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 560326 560326 0 0.0
.app_xip_area 469032 469032 0 0.0
.bss 74080 74080 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 570426 570426 0 0.0
.app_xip_area 469484 469484 0 0.0
.bss 83384 83384 0 0.0
.data 520 520 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 918452 918452 0 0.0
(read/write) 128656 128656 0 0.0
.bss 126648 126648 0 0.0
.data 2008 2008 0 0.0
.text 918444 918444 0 0.0
BRD4161A+rpc (read only) 947272 947272 0 0.0
(read/write) 144616 144616 0 0.0
.bss 142424 142424 0 0.0
.data 2188 2188 0 0.0
.text 947264 947264 0 0.0
window-app BRD4161A (read only) 850328 850328 0 0.0
(read/write) 126632 126632 0 0.0
.bss 124768 124768 0 0.0
.data 1864 1864 0 0.0
.text 850320 850320 0 0.0
k32w light k32w061+release (read/write) 699324 699324 0 0.0
.bss 77560 77560 0 0.0
.data 1888 1888 0 0.0
.text 614076 614076 0 0.0
lock k32w061+release (read/write) 699596 699596 0 0.0
.bss 77552 77552 0 0.0
.data 1908 1908 0 0.0
.text 614336 614336 0 0.0
linux chip-tool-ipv6only arm64 (read only) 9727740 9727740 0 0.0
(read/write) 475425 475425 0 0.0
.bss 44017 44017 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371232 371232 0 0.0
.dynamic 560 560 0 0.0
.got 55256 55256 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 492244 492244 0 0.0
.text 8185652 8185652 0 0.0
thermostat-no-ble arm64 (read only) 2206900 2206900 0 0.0
(read/write) 149377 149377 0 0.0
.bss 65649 65649 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 75368 75368 0 0.0
.dynamic 560 560 0 0.0
.got 4352 4352 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 136756 136756 0 0.0
.text 1850832 1850832 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2352692 2352692 0 0.0
.bss 186652 186652 0 0.0
.data 5752 5752 0 0.0
.text 1315292 1315292 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1153995 1153995 0 0.0
bss 146644 146644 0 0.0
rodata 145276 145276 0 0.0
text 786960 786960 0 0.0
p6 all-clusters-app default (read/write) 2492072 2492072 0 0.0
.bss 120080 120080 0 0.0
.data 2632 2632 0 0.0
.text 1450336 1450336 0 0.0
light-app default (read/write) 2395920 2395920 0 0.0
.bss 113544 113544 0 0.0
.data 2488 2488 0 0.0
.text 1354184 1354184 0 0.0
lock-app default (read/write) 2359464 2359464 0 0.0
.bss 113288 113288 0 0.0
.data 2448 2448 0 0.0
.text 1317728 1317728 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 893706 893706 0 0.0
bss 87432 87432 0 0.0
noinit 37160 37160 0 0.0
text 631808 631808 0 0.0

.github/.wordlist.txt Outdated Show resolved Hide resolved
- Update readme and CLI info texts.
@github-actions
Copy link

github-actions bot commented Mar 14, 2022

PR #16095: Size comparison from 6e76729 to 6c532ab

Increases (18 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 6e76729 6c532ab change % change
cyw30739 light cyw930739m2evb_01 (read/write) 602466 602578 112 0.0
.app_xip_area 509644 509756 112 0.0
lock cyw930739m2evb_01 (read/write) 560326 560430 104 0.0
.app_xip_area 469032 469136 104 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 570426 570538 112 0.0
.app_xip_area 469484 469596 112 0.0
efr32 lighting-app BRD4161A (read only) 918452 918532 80 0.0
.text 918444 918524 80 0.0
BRD4161A+rpc (read only) 947272 947336 64 0.0
.text 947264 947328 64 0.0
window-app BRD4161A (read only) 850328 850392 64 0.0
.text 850320 850384 64 0.0
esp32 all-clusters-app c3devkit (read only) 961328 961388 60 0.0
.flash.text 961328 961388 60 0.0
m5stack (read only) 1016939 1017011 72 0.0
.flash.text 1011555 1011627 72 0.0
k32w light k32w061+release (read/write) 699324 699388 64 0.0
.text 614076 614140 64 0.0
lock k32w061+release (read/write) 699596 699644 48 0.0
.text 614336 614384 48 0.0
linux chip-tool-ipv6only arm64 (read only) 9727740 9727964 224 0.0
.text 8185652 8185876 224 0.0
thermostat-no-ble arm64 (read only) 2206900 2207236 336 0.0
.text 1850832 1851168 336 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2352692 2352756 64 0.0
.text 1315292 1315356 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1153995 1154043 48 0.0
text 786960 787016 56 0.0
p6 all-clusters-app default (read/write) 2492072 2492152 80 0.0
.text 1450336 1450416 80 0.0
light-app default (read/write) 2395920 2396000 80 0.0
.text 1354184 1354264 80 0.0
lock-app default (read/write) 2359464 2359544 80 0.0
.text 1317728 1317808 80 0.0
telink lighting-app tlsr9518adk80d (read/write) 893706 893770 64 0.0
text 631808 631868 60 0.0
Full report (18 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 6e76729 6c532ab change % change
cyw30739 light cyw930739m2evb_01 (read/write) 602466 602578 112 0.0
.app_xip_area 509644 509756 112 0.0
.bss 75576 75576 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 560326 560430 104 0.0
.app_xip_area 469032 469136 104 0.0
.bss 74080 74080 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 570426 570538 112 0.0
.app_xip_area 469484 469596 112 0.0
.bss 83384 83384 0 0.0
.data 520 520 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 918452 918532 80 0.0
(read/write) 128656 128656 0 0.0
.bss 126648 126648 0 0.0
.data 2008 2008 0 0.0
.text 918444 918524 80 0.0
BRD4161A+rpc (read only) 947272 947336 64 0.0
(read/write) 144616 144616 0 0.0
.bss 142424 142424 0 0.0
.data 2188 2188 0 0.0
.text 947264 947328 64 0.0
window-app BRD4161A (read only) 850328 850392 64 0.0
(read/write) 126632 126632 0 0.0
.bss 124768 124768 0 0.0
.data 1864 1864 0 0.0
.text 850320 850384 64 0.0
esp32 all-clusters-app c3devkit (read only) 961328 961388 60 0.0
(read/write) 1394938 1394938 0 0.0
.dram0.bss 64056 64056 0 0.0
.dram0.data 14188 14188 0 0.0
.flash.rodata 197776 197776 0 0.0
.flash.text 961328 961388 60 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1016939 1017011 72 0.0
(read/write) 462148 462148 0 0.0
.dram0.bss 69576 69576 0 0.0
.dram0.data 34016 34016 0 0.0
.flash.rodata 226720 226720 0 0.0
.flash.text 1011555 1011627 72 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 699324 699388 64 0.0
.bss 77560 77560 0 0.0
.data 1888 1888 0 0.0
.text 614076 614140 64 0.0
lock k32w061+release (read/write) 699596 699644 48 0.0
.bss 77552 77552 0 0.0
.data 1908 1908 0 0.0
.text 614336 614384 48 0.0
linux chip-tool-ipv6only arm64 (read only) 9727740 9727964 224 0.0
(read/write) 475425 475425 0 0.0
.bss 44017 44017 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371232 371232 0 0.0
.dynamic 560 560 0 0.0
.got 55256 55256 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 492244 492244 0 0.0
.text 8185652 8185876 224 0.0
thermostat-no-ble arm64 (read only) 2206900 2207236 336 0.0
(read/write) 149377 149377 0 0.0
.bss 65649 65649 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 75368 75368 0 0.0
.dynamic 560 560 0 0.0
.got 4352 4352 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 136756 136756 0 0.0
.text 1850832 1851168 336 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2352692 2352756 64 0.0
.bss 186652 186652 0 0.0
.data 5752 5752 0 0.0
.text 1315292 1315356 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1153995 1154043 48 0.0
bss 146644 146644 0 0.0
rodata 145276 145276 0 0.0
text 786960 787016 56 0.0
p6 all-clusters-app default (read/write) 2492072 2492152 80 0.0
.bss 120080 120080 0 0.0
.data 2632 2632 0 0.0
.text 1450336 1450416 80 0.0
light-app default (read/write) 2395920 2396000 80 0.0
.bss 113544 113544 0 0.0
.data 2488 2488 0 0.0
.text 1354184 1354264 80 0.0
lock-app default (read/write) 2359464 2359544 80 0.0
.bss 113288 113288 0 0.0
.data 2448 2448 0 0.0
.text 1317728 1317808 80 0.0
telink lighting-app tlsr9518adk80d (read/write) 893706 893770 64 0.0
bss 87432 87432 0 0.0
noinit 37160 37160 0 0.0
text 631808 631868 60 0.0

@carol-apple carol-apple merged commit 7c5c705 into project-chip:master Mar 14, 2022
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
…success case after using the CLI supplied values (project-chip#16095)

* Issue project-chip#15656 [ota-provider-app] Add counters for various QueryImageResponse and ApplyImageResponse commands

- For OTA-P, make -q, -a, and -u be applied just once and then revert back to the success case.

* - Remove debug logs
- Remove counters and just revert behavior to success case after first use
- Fix userConsentState ignore once case

* - Update ReadMes and CLI comments.

* - Remove debug code.
- Remove count variables.

* scripts/helpers/restyle-diff.sh

* Resolve spellcheck errors.

* Code review changes.

- Update comments.

* scripts/helpers/restyle-diff.sh

* Code review changes.

- Split -t command line arg into -t and -p.

* scripts/helpers/restyle-diff.sh

* Code review changes.

- Update readme and CLI info texts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ota-provider-app] Add counters for various QueryImageResponse and ApplyImageResponse commands
4 participants