Skip to content

[BasicInformation] fetch data via a delegate#43569

Draft
andy31415 wants to merge 14 commits intoproject-chip:masterfrom
andy31415:basic_info_delegate
Draft

[BasicInformation] fetch data via a delegate#43569
andy31415 wants to merge 14 commits intoproject-chip:masterfrom
andy31415:basic_info_delegate

Conversation

@andy31415
Copy link
Contributor

Summary

This is similar to #43511 however it fetches data via a delegate instead of using templates.

This is to assess flash overhead of delegates.

Testing

CI will validate. I adjusted unit tests.

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 refactors the Basic Information cluster to fetch data via a delegate instead of directly accessing DeviceInstanceInfoProvider and ConfigurationManager. This is a good architectural improvement that decouples the cluster logic from the platform-specific data providers. The changes are well-implemented across the cluster, its tests, and example applications. I have a few suggestions for improvement, mainly regarding a test mock's behavior and some dead code removal.

@github-actions
Copy link

PR #43569: Size comparison from 3d6c065 to d8fb3aa

Full report (5 builds for cc32xx, realtek, stm32)
platform target config section 3d6c065 d8fb3aa change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558106 558346 240 0.0
RAM 204504 204520 16 0.0
lock CC3235SF_LAUNCHXL FLASH 591230 591470 240 0.0
RAM 204744 204760 16 0.0
realtek light-switch-app rtl8777g FLASH 720520 720704 184 0.0
RAM 113448 113464 16 0.0
lighting-app rtl8777g FLASH 767736 767928 192 0.0
RAM 114688 114704 16 0.0
stm32 light STM32WB5MM-DK FLASH 478820 479060 240 0.1
RAM 141324 141340 16 0.0

@github-actions
Copy link

PR #43569: Size comparison from 3d6c065 to ab56f8b

Full report (5 builds for cc32xx, realtek, stm32)
platform target config section 3d6c065 ab56f8b change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558106 558370 264 0.0
RAM 204504 204520 16 0.0
lock CC3235SF_LAUNCHXL FLASH 591230 591502 272 0.0
RAM 204744 204760 16 0.0
realtek light-switch-app rtl8777g FLASH 720520 720720 200 0.0
RAM 113448 113464 16 0.0
lighting-app rtl8777g FLASH 767736 767952 216 0.0
RAM 114688 114704 16 0.0
stm32 light STM32WB5MM-DK FLASH 478820 479092 272 0.1
RAM 141324 141340 16 0.0

@github-actions
Copy link

github-actions bot commented Mar 12, 2026

PR #43569: Size comparison from 3d6c065 to 43c85d5

Full report (12 builds for cc13x4_26x4, cc32xx, nrfconnect, qpg, realtek, stm32)
platform target config section 3d6c065 43c85d5 change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779164 779484 320 0.0
RAM 103324 103340 16 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786528 786832 304 0.0
RAM 108508 108524 16 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732724 733052 328 0.0
RAM 97316 97332 16 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716160 716488 328 0.0
RAM 97476 97492 16 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558106 558338 232 0.0
RAM 204504 204520 16 0.0
lock CC3235SF_LAUNCHXL FLASH 591230 591462 232 0.0
RAM 204744 204760 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 857588 857668 80 0.0
RAM 161999 162015 16 0.0
qpg lighting-app qpg6200+debug FLASH 840636 840948 312 0.0
RAM 127780 127796 16 0.0
lock-app qpg6200+debug FLASH 779312 779632 320 0.0
RAM 118728 118744 16 0.0
realtek light-switch-app rtl8777g FLASH 720520 720696 176 0.0
RAM 113448 113464 16 0.0
lighting-app rtl8777g FLASH 767736 767928 192 0.0
RAM 114688 114704 16 0.0
stm32 light STM32WB5MM-DK FLASH 478820 479124 304 0.1
RAM 141324 141340 16 0.0

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 32.81250% with 129 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.00%. Comparing base (e39dcc1) to head (4f50ce2).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
...nformation/DeviceLayerBasicInformationDelegate.cpp 11.94% 118 Missing ⚠️
...ters/basic-information/BasicInformationCluster.cpp 77.55% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #43569      +/-   ##
==========================================
- Coverage   54.07%   54.00%   -0.07%     
==========================================
  Files        1548     1551       +3     
  Lines      106701   106740      +39     
  Branches    13309    13321      +12     
==========================================
- Hits        57699    57650      -49     
- Misses      49002    49090      +88     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Mar 12, 2026

PR #43569: Size comparison from 3d6c065 to b1d462d

Full report (34 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 3d6c065 b1d462d change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1089396 1089822 426 0.0
RAM 144762 144778 16 0.0
bl616 lighting-app bl616+thread FLASH 1100324 1100588 264 0.0
RAM 104184 104216 32 0.0
bl616+wifi+shell FLASH 1586916 1587364 448 0.0
RAM 98080 98080 0 0.0
bl702 lighting-app bl702+eth FLASH 1052752 1052996 244 0.0
RAM 108357 108373 16 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 890764 891008 244 0.0
RAM 105748 105772 24 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779164 779452 288 0.0
RAM 103324 103340 16 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786528 786800 272 0.0
RAM 108508 108524 16 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732724 733020 296 0.0
RAM 97316 97332 16 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716160 716456 296 0.0
RAM 97476 97492 16 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558106 558306 200 0.0
RAM 204504 204520 16 0.0
lock CC3235SF_LAUNCHXL FLASH 591230 591438 208 0.0
RAM 204744 204760 16 0.0
efr32 lock-app BRD4187C FLASH 971196 971468 272 0.0
RAM 125796 125828 32 0.0
BRD4338a FLASH 769268 769252 -16 -0.0
RAM 236544 236560 16 0.0
window-app BRD4187C FLASH 1074656 1074624 -32 -0.0
RAM 126440 126440 0 0.0
esp32 all-clusters-app c3devkit DRAM 98356 98380 24 0.0
FLASH 1596564 1596686 122 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 857588 857660 72 0.0
RAM 161999 162015 16 0.0
nxp contact mcxw71+release FLASH 735808 736016 208 0.0
RAM 66936 66952 16 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1708508 1708436 -72 -0.0
RAM 213940 213956 16 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1607180 1607108 -72 -0.0
RAM 210812 210828 16 0.0
light cy8ckit_062s2_43012 FLASH 1470412 1470380 -32 -0.0
RAM 196988 197004 16 0.0
lock cy8ckit_062s2_43012 FLASH 1497092 1497076 -16 -0.0
RAM 224732 224748 16 0.0
qpg lighting-app qpg6200+debug FLASH 840636 840924 288 0.0
RAM 127780 127796 16 0.0
lock-app qpg6200+debug FLASH 779312 779608 296 0.0
RAM 118728 118744 16 0.0
realtek light-switch-app rtl8777g FLASH 720520 720416 -104 -0.0
RAM 113448 113464 16 0.0
lighting-app rtl8777g FLASH 767736 767640 -96 -0.0
RAM 114688 114704 16 0.0
stm32 light STM32WB5MM-DK FLASH 478820 479100 280 0.1
RAM 141324 141340 16 0.0
telink bridge-app tl7218x FLASH 728648 728784 136 0.0
RAM 95760 95780 20 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 852792 852992 200 0.0
RAM 44176 44196 20 0.0
tl7218x FLASH 844196 844396 200 0.0
RAM 99564 99584 20 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 725462 725662 200 0.0
RAM 55740 55760 20 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 788030 788230 200 0.0
RAM 74916 74936 20 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725458 725658 200 0.0
RAM 33220 33240 20 0.1
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 616200 616330 130 0.0
RAM 118232 118252 20 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 842966 843170 204 0.0
RAM 97272 97292 20 0.0

@github-actions
Copy link

github-actions bot commented Mar 13, 2026

PR #43569: Size comparison from 3d6c065 to 4f50ce2

Full report (34 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 3d6c065 4f50ce2 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1089396 1089804 408 0.0
RAM 144762 144778 16 0.0
bl616 lighting-app bl616+thread FLASH 1100324 1100564 240 0.0
RAM 104184 104216 32 0.0
bl616+wifi+shell FLASH 1586916 1587348 432 0.0
RAM 98080 98080 0 0.0
bl702 lighting-app bl702+eth FLASH 1052752 1052978 226 0.0
RAM 108357 108373 16 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 890764 890990 226 0.0
RAM 105748 105772 24 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779164 779436 272 0.0
RAM 103324 103340 16 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786528 786784 256 0.0
RAM 108508 108524 16 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732724 733004 280 0.0
RAM 97316 97332 16 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716160 716440 280 0.0
RAM 97476 97492 16 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558106 558290 184 0.0
RAM 204504 204520 16 0.0
lock CC3235SF_LAUNCHXL FLASH 591230 591422 192 0.0
RAM 204744 204760 16 0.0
efr32 lock-app BRD4187C FLASH 971196 971436 240 0.0
RAM 125796 125828 32 0.0
BRD4338a FLASH 769268 769236 -32 -0.0
RAM 236544 236560 16 0.0
window-app BRD4187C FLASH 1074656 1074624 -32 -0.0
RAM 126440 126440 0 0.0
esp32 all-clusters-app c3devkit DRAM 98356 98380 24 0.0
FLASH 1596564 1596668 104 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 857588 857660 72 0.0
RAM 161999 162015 16 0.0
nxp contact mcxw71+release FLASH 735808 736008 200 0.0
RAM 66936 66952 16 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1708508 1708420 -88 -0.0
RAM 213940 213956 16 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1607180 1607108 -72 -0.0
RAM 210812 210828 16 0.0
light cy8ckit_062s2_43012 FLASH 1470412 1470364 -48 -0.0
RAM 196988 197004 16 0.0
lock cy8ckit_062s2_43012 FLASH 1497092 1497060 -32 -0.0
RAM 224732 224748 16 0.0
qpg lighting-app qpg6200+debug FLASH 840636 840908 272 0.0
RAM 127780 127796 16 0.0
lock-app qpg6200+debug FLASH 779312 779592 280 0.0
RAM 118728 118744 16 0.0
realtek light-switch-app rtl8777g FLASH 720520 720400 -120 -0.0
RAM 113448 113464 16 0.0
lighting-app rtl8777g FLASH 767736 767632 -104 -0.0
RAM 114688 114704 16 0.0
stm32 light STM32WB5MM-DK FLASH 478820 479084 264 0.1
RAM 141324 141340 16 0.0
telink bridge-app tl7218x FLASH 728648 728764 116 0.0
RAM 95760 95780 20 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 852792 852972 180 0.0
RAM 44176 44196 20 0.0
tl7218x FLASH 844196 844376 180 0.0
RAM 99564 99584 20 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 725462 725642 180 0.0
RAM 55740 55760 20 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 788030 788210 180 0.0
RAM 74916 74936 20 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725458 725638 180 0.0
RAM 33220 33240 20 0.1
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 616200 616310 110 0.0
RAM 118232 118252 20 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 842966 843150 184 0.0
RAM 97272 97292 20 0.0

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.

1 participant