Skip to content

Conversation

@khodya
Copy link
Contributor

@khodya khodya commented Dec 5, 2025

Summary

This pull request introduces a cancel method for EventSubscriptionHandler and updates the existing cancel method in AttributeSubscriptionHandler to allow parameterizing the timeout. This is a useful addition for integration tests.

Catching and swallowing the asyncio.CancelledError is incorrect, thus, a test might continue working when it is supposed to be cancelled (for example, when exceeding the Mobly test timeout. This is the reason why the 200 seconds timeout was added to the TC_CADMIN_1_3 test.

Related issues

Fixes project-chip/matter-test-scripts#735

Testing

Tested manually with TC_SC_2_2.py + REPL tests passing

Copilot AI review requested due to automatic review settings December 5, 2025 00:09
@github-actions github-actions bot added the tests label Dec 5, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds subscription cancellation support to the integration testing infrastructure by implementing a cancel method for EventSubscriptionHandler and adding a configurable timeout parameter to the existing cancel method in AttributeSubscriptionHandler. This enables proper cleanup of subscriptions in Software Update (OTA) integration tests.

Key Changes:

  • Added new cancel method to EventSubscriptionHandler class for canceling event subscriptions
  • Made the timeout parameter configurable in AttributeSubscriptionHandler.cancel method

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a cancel method for EventSubscriptionHandler and updates the existing cancel method in AttributeSubscriptionHandler to allow parameterizing the timeout. This is a useful addition for integration tests.

My review focuses on an issue in the implementation of both cancel methods. They currently catch and swallow asyncio.CancelledError, which is generally incorrect for asyncio programming as it prevents tasks from being properly cancelled. I've suggested removing this exception handling to ensure correct cancellation behavior and also proposed updating the associated comments for clarity.

…g/event_attribute_reporting.py

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings December 5, 2025 00:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

PR #42298: Size comparison from d85e161 to 26a97e8

Full report (8 builds for cc13x4_26x4, nrfconnect, realtek, stm32)
platform target config section d85e161 26a97e8 change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770768 770768 0 0.0
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 783588 783588 0 0.0
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728608 728608 0 0.0
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713064 713064 0 0.0
RAM 97660 97660 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 936404 936404 0 0.0
RAM 161720 161720 0 0.0
realtek light-switch-app rtl8777g FLASH 708688 708688 0 0.0
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 757384 757384 0 0.0
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470236 470236 0 0.0
RAM 141392 141392 0 0.0

Copilot AI review requested due to automatic review settings December 5, 2025 00:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

…g/event_attribute_reporting.py

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings December 5, 2025 00:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

…g/event_attribute_reporting.py

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings December 5, 2025 00:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

PR #42298: Size comparison from d85e161 to 73edc2a

Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section d85e161 73edc2a change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1105860 1105860 0 0.0
RAM 178954 178954 0 0.0
bl702 lighting-app bl702+eth FLASH 660680 660680 0 0.0
RAM 135025 135025 0 0.0
bl702+wifi FLASH 836530 836530 0 0.0
RAM 124485 124485 0 0.0
bl706+mfd+rpc+littlefs FLASH 1070174 1070174 0 0.0
RAM 117341 117341 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 902384 902384 0 0.0
RAM 105932 105932 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 982920 982920 0 0.0
RAM 109844 109844 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770768 770768 0 0.0
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 783588 783588 0 0.0
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728608 728608 0 0.0
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713064 713064 0 0.0
RAM 97660 97660 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554588 554588 0 0.0
RAM 205472 205472 0 0.0
lock CC3235SF_LAUNCHXL FLASH 588528 588528 0 0.0
RAM 205720 205720 0 0.0
efr32 lock-app BRD4187C FLASH 964748 964748 0 0.0
RAM 123776 123776 0 0.0
BRD4338a FLASH 759072 759072 0 0.0
RAM 254388 254388 0 0.0
window-app BRD4187C FLASH 1059888 1059888 0 0.0
RAM 120004 120004 0 0.0
esp32 all-clusters-app c3devkit DRAM 102804 102804 0 0.0
FLASH 1831058 1831058 0 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 936404 936404 0 0.0
RAM 161720 161720 0 0.0
nxp contact mcxw71+release FLASH 695104 695104 0 0.0
RAM 61744 61744 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1681188 1681188 0 0.0
RAM 214188 214188 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1595684 1595684 0 0.0
RAM 211356 211356 0 0.0
light cy8ckit_062s2_43012 FLASH 1460052 1460052 0 0.0
RAM 197800 197800 0 0.0
lock cy8ckit_062s2_43012 FLASH 1494004 1494004 0 0.0
RAM 225672 225672 0 0.0
qpg lighting-app qpg6200+debug FLASH 838368 838368 0 0.0
RAM 127976 127976 0 0.0
lock-app qpg6200+debug FLASH 775984 775984 0 0.0
RAM 118920 118920 0 0.0
realtek light-switch-app rtl8777g FLASH 708688 708688 0 0.0
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 757384 757384 0 0.0
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470236 470236 0 0.0
RAM 141392 141392 0 0.0
telink bridge-app tl7218x FLASH 703898 703898 0 0.0
RAM 90760 90760 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 790246 790246 0 0.0
RAM 41176 41176 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 781558 781558 0 0.0
RAM 93860 93860 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 710042 710042 0 0.0
RAM 52232 52232 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 745874 745874 0 0.0
RAM 71256 71256 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 720554 720554 0 0.0
RAM 34956 34956 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602456 602456 0 0.0
RAM 117320 117320 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 815066 815070 4 0.0
RAM 92248 92248 0 0.0

Copilot AI review requested due to automatic review settings December 7, 2025 04:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@github-actions
Copy link

github-actions bot commented Dec 7, 2025

PR #42298: Size comparison from d85e161 to 0991a7e

Increases above 0.2%:

platform target config section d85e161 0991a7e change % change
telink lighting-app-ota-factory-data tlsr9118bdk40d RAM 117320 117736 416 0.4
Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section d85e161 0991a7e change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1105860 1105860 0 0.0
RAM 178954 178954 0 0.0
bl702 lighting-app bl702+eth FLASH 660680 660680 0 0.0
RAM 135025 135025 0 0.0
bl702+wifi FLASH 836530 836530 0 0.0
RAM 124485 124485 0 0.0
bl706+mfd+rpc+littlefs FLASH 1070174 1070174 0 0.0
RAM 117341 117341 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 902384 902384 0 0.0
RAM 105932 105932 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 982920 982920 0 0.0
RAM 109844 109844 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770768 770776 8 0.0
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 783588 783588 0 0.0
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728608 728616 8 0.0
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713064 713064 0 0.0
RAM 97660 97660 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554588 554588 0 0.0
RAM 205472 205472 0 0.0
lock CC3235SF_LAUNCHXL FLASH 588528 588528 0 0.0
RAM 205720 205720 0 0.0
efr32 lock-app BRD4187C FLASH 964748 964748 0 0.0
RAM 123776 123776 0 0.0
BRD4338a FLASH 759072 759072 0 0.0
RAM 254388 254388 0 0.0
window-app BRD4187C FLASH 1059888 1059888 0 0.0
RAM 120004 120004 0 0.0
esp32 all-clusters-app c3devkit DRAM 102804 102812 8 0.0
FLASH 1831058 1830854 -204 -0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 936404 936264 -140 -0.0
RAM 161720 161724 4 0.0
nxp contact mcxw71+release FLASH 695104 695104 0 0.0
RAM 61744 61744 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1681188 1680956 -232 -0.0
RAM 214188 214188 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1595684 1595436 -248 -0.0
RAM 211356 211364 8 0.0
light cy8ckit_062s2_43012 FLASH 1460052 1460060 8 0.0
RAM 197800 197800 0 0.0
lock cy8ckit_062s2_43012 FLASH 1494004 1494004 0 0.0
RAM 225672 225672 0 0.0
qpg lighting-app qpg6200+debug FLASH 838368 838248 -120 -0.0
RAM 127976 127984 8 0.0
lock-app qpg6200+debug FLASH 775984 775984 0 0.0
RAM 118920 118920 0 0.0
realtek light-switch-app rtl8777g FLASH 708688 708688 0 0.0
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 757384 757392 8 0.0
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470236 470244 8 0.0
RAM 141392 141392 0 0.0
telink bridge-app tl7218x FLASH 703898 703898 0 0.0
RAM 90760 90760 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 790246 790246 0 0.0
RAM 41176 41176 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 781558 781558 0 0.0
RAM 93860 93860 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 710042 710042 0 0.0
RAM 52232 52232 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 745874 745874 0 0.0
RAM 71256 71256 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 720554 720554 0 0.0
RAM 34956 34956 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602456 602362 -94 -0.0
RAM 117320 117736 416 0.4
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 815066 815070 4 0.0
RAM 92248 92248 0 0.0

@khodya khodya changed the title [SU] Add possibility to cancel subscriptions in integration tests [SU] Add method that cancel subscriptions in the integration tests Dec 7, 2025
@khodya khodya changed the title [SU] Add method that cancel subscriptions in the integration tests [SU] Add method that cancels subscriptions in integration tests Dec 7, 2025
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 SU] Software Update base class updates

1 participant