-
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
ReadClient: Truncate data version list during encoding if necessary #34111
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
pullapprove
bot
requested review from
andy31415,
andyg-apple,
anush-apple,
arkq,
bauerschwan,
bzbarsky-apple,
carol-apple,
cecille,
chrisdecenzo,
chshu,
chulspro,
cliffamzn,
Damian-Nordic,
dhrishi,
fessehaeve,
harsha-rajendran,
hawk248,
hicklin,
jepenven-silabs,
jmartinez-silabs,
jmeg-sfy,
joonhaengHeo,
jtung-apple,
kiel-apple,
kkasperczyk-no,
kpschoedel,
lazarkov,
lpbeliveau-silabs and
LuDuda
June 27, 2024 12:21
ksperling-apple
force-pushed
the
readclient-dvs
branch
from
July 1, 2024 04:35
14ebff9
to
79882d0
Compare
PR #34111: Size comparison from cde0b92 to 79882d0 Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
woody-apple
force-pushed
the
readclient-dvs
branch
from
July 1, 2024 18:36
79882d0
to
005d220
Compare
PR #34111: Size comparison from 176896a to 005d220 Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
ksperling-apple
force-pushed
the
readclient-dvs
branch
from
July 2, 2024 00:17
005d220
to
1fa9600
Compare
PR #34111: Size comparison from 1919112 to 3ab02a6 Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
The existing code made the assumption that if a list of versions was able to fit into the request packet when generating the first subscribe request, then any resubscribe containing data versions for the same clusters would also fit. However the data version numbers themselves can be updated when we receive reports, and this can cause the list to no longer fit the request packet, leaving us in a state where every resubscribe attempt would fail. Note that this change means even an initial subscribe request with a data version list that is too long will no longer fail; ReadClient will simply truncate the list as needed in all cases.
Co-authored-by: Boris Zbarsky <[email protected]>
ksperling-apple
force-pushed
the
readclient-dvs
branch
from
July 2, 2024 10:24
3ab02a6
to
4d8ea7f
Compare
PR #34111: Size comparison from 247f05d to 4d8ea7f Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
bzbarsky-apple
added a commit
to bzbarsky-apple/connectedhomeip
that referenced
this pull request
Jul 3, 2024
After project-chip#34111, ReadClient handles this logic itself, so the attempted truncation in MTRDevice was now dead code.
austina-csa
pushed a commit
to austina-csa/connectedhomeip
that referenced
this pull request
Jul 10, 2024
…roject-chip#34111) * ReadClient: Truncate data version list during encoding if necessary The existing code made the assumption that if a list of versions was able to fit into the request packet when generating the first subscribe request, then any resubscribe containing data versions for the same clusters would also fit. However the data version numbers themselves can be updated when we receive reports, and this can cause the list to no longer fit the request packet, leaving us in a state where every resubscribe attempt would fail. Note that this change means even an initial subscribe request with a data version list that is too long will no longer fail; ReadClient will simply truncate the list as needed in all cases. * Apply comment suggestions from code review Co-authored-by: Boris Zbarsky <[email protected]> * Treat CHIP_ERROR_BUFFER_TOO_SMALL the same * Switch data_model tests to pw_unit_test * Add WillSendMessage to loopback delegate and make source addresses more plausible * Add test for ReadClient data version truncation * Make the linter happy --------- Co-authored-by: Boris Zbarsky <[email protected]>
bzbarsky-apple
added a commit
to bzbarsky-apple/connectedhomeip
that referenced
this pull request
Jul 23, 2024
After project-chip#34111, ReadClient handles this logic itself, so the attempted truncation in MTRDevice was now dead code.
mergify bot
pushed a commit
that referenced
this pull request
Jul 25, 2024
…ts (#34183) * Remove no-longer-used MTRDevice logic for truncating data version lists After #34111, ReadClient handles this logic itself, so the attempted truncation in MTRDevice was now dead code. * Address review comment. * Fix compile issues. * Address another review comment. * Address review comment.
PeterC1965
pushed a commit
to PeterC1965/connectedhomeip
that referenced
this pull request
Jul 26, 2024
…ts (project-chip#34183) * Remove no-longer-used MTRDevice logic for truncating data version lists After project-chip#34111, ReadClient handles this logic itself, so the attempted truncation in MTRDevice was now dead code. * Address review comment. * Fix compile issues. * Address another review comment. * Address review comment.
mergify bot
pushed a commit
that referenced
this pull request
Jul 29, 2024
* Add WHM to the all clusters app * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Fix CI test * Address review comments from JamesH * Address review comments from JamesH * Address review comments from JamesH * Restyled by clang-format * Get tests passing again * Restyled by clang-format * Declare some global items for future testing (#34509) Co-authored-by: Andrei Litvin <[email protected]> * [LevelControl] Implemented the Q quality logic for the CurrentLevel a… (#34488) * Implemented the Quiete reporting quality logic for the CurrentLevel and RemainingTime attributes * Restyled by clang-format * use c++ struct rather than c struct format * add cluster-building-blocks to the data model public dep --------- Co-authored-by: Restyled.io <[email protected]> * Revert thermostat stuff breaking tot (#34518) * Revert "update tests and thermostat server cluster for new constraints for LocalTemperatureCalibration and MinSetpointDeadBand (#34474)" This reverts commit 335ac96. * Revert "update constraints for LocalTemperatureCalibration and MinSetpointDeadBand attributes (#34473)" This reverts commit 21a5bd6. * [Telink] Update Docker image (Zephyr update) (#34503) * Add TransportPayloadCapability flag for GetConnectedDevices and bubble (#34450) up the flag to the wrapper IM Python APIs. Add python script binding methods for LargePayload tests --to check if session allows large payload. --to close the underlying TCP connection. --to check if the session is active. * Remove no-longer-used MTRDevice logic for truncating data version lists (#34183) * Remove no-longer-used MTRDevice logic for truncating data version lists After #34111, ReadClient handles this logic itself, so the attempted truncation in MTRDevice was now dead code. * Address review comment. * Fix compile issues. * Address another review comment. * Address review comment. * Address review comments by JamesH * Remove unnecessary include file * Address further review comments from JamhesH * Restyled by whitespace * Restyled by clang-format * Address further review comments from JamesH * Address further review comments from JamesH * Update examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Undo suggested change from Boris as idx needed in the loop * Update examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp Co-authored-by: lpbeliveau-silabs <[email protected]> * Address review comments --------- Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Junior Martinez <[email protected]> Co-authored-by: C Freeman <[email protected]> Co-authored-by: Alex Tsitsiura <[email protected]> Co-authored-by: Pradip De <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: jamesharrow <[email protected]> Co-authored-by: lpbeliveau-silabs <[email protected]>
j-ororke
pushed a commit
to j-ororke/connectedhomeip
that referenced
this pull request
Jul 31, 2024
…ts (project-chip#34183) * Remove no-longer-used MTRDevice logic for truncating data version lists After project-chip#34111, ReadClient handles this logic itself, so the attempted truncation in MTRDevice was now dead code. * Address review comment. * Fix compile issues. * Address another review comment. * Address review comment.
j-ororke
pushed a commit
to j-ororke/connectedhomeip
that referenced
this pull request
Jul 31, 2024
* Add WHM to the all clusters app * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Fix CI test * Address review comments from JamesH * Address review comments from JamesH * Address review comments from JamesH * Restyled by clang-format * Get tests passing again * Restyled by clang-format * Declare some global items for future testing (project-chip#34509) Co-authored-by: Andrei Litvin <[email protected]> * [LevelControl] Implemented the Q quality logic for the CurrentLevel a… (project-chip#34488) * Implemented the Quiete reporting quality logic for the CurrentLevel and RemainingTime attributes * Restyled by clang-format * use c++ struct rather than c struct format * add cluster-building-blocks to the data model public dep --------- Co-authored-by: Restyled.io <[email protected]> * Revert thermostat stuff breaking tot (project-chip#34518) * Revert "update tests and thermostat server cluster for new constraints for LocalTemperatureCalibration and MinSetpointDeadBand (project-chip#34474)" This reverts commit 335ac96. * Revert "update constraints for LocalTemperatureCalibration and MinSetpointDeadBand attributes (project-chip#34473)" This reverts commit 21a5bd6. * [Telink] Update Docker image (Zephyr update) (project-chip#34503) * Add TransportPayloadCapability flag for GetConnectedDevices and bubble (project-chip#34450) up the flag to the wrapper IM Python APIs. Add python script binding methods for LargePayload tests --to check if session allows large payload. --to close the underlying TCP connection. --to check if the session is active. * Remove no-longer-used MTRDevice logic for truncating data version lists (project-chip#34183) * Remove no-longer-used MTRDevice logic for truncating data version lists After project-chip#34111, ReadClient handles this logic itself, so the attempted truncation in MTRDevice was now dead code. * Address review comment. * Fix compile issues. * Address another review comment. * Address review comment. * Address review comments by JamesH * Remove unnecessary include file * Address further review comments from JamhesH * Restyled by whitespace * Restyled by clang-format * Address further review comments from JamesH * Address further review comments from JamesH * Update examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Undo suggested change from Boris as idx needed in the loop * Update examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp Co-authored-by: lpbeliveau-silabs <[email protected]> * Address review comments --------- Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Junior Martinez <[email protected]> Co-authored-by: C Freeman <[email protected]> Co-authored-by: Alex Tsitsiura <[email protected]> Co-authored-by: Pradip De <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: jamesharrow <[email protected]> Co-authored-by: lpbeliveau-silabs <[email protected]>
rochaferraz
pushed a commit
to rochaferraz/connectedhomeip
that referenced
this pull request
Jul 31, 2024
…ts (project-chip#34183) * Remove no-longer-used MTRDevice logic for truncating data version lists After project-chip#34111, ReadClient handles this logic itself, so the attempted truncation in MTRDevice was now dead code. * Address review comment. * Fix compile issues. * Address another review comment. * Address review comment.
rochaferraz
pushed a commit
to rochaferraz/connectedhomeip
that referenced
this pull request
Jul 31, 2024
* Add WHM to the all clusters app * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Fix CI test * Address review comments from JamesH * Address review comments from JamesH * Address review comments from JamesH * Restyled by clang-format * Get tests passing again * Restyled by clang-format * Declare some global items for future testing (project-chip#34509) Co-authored-by: Andrei Litvin <[email protected]> * [LevelControl] Implemented the Q quality logic for the CurrentLevel a… (project-chip#34488) * Implemented the Quiete reporting quality logic for the CurrentLevel and RemainingTime attributes * Restyled by clang-format * use c++ struct rather than c struct format * add cluster-building-blocks to the data model public dep --------- Co-authored-by: Restyled.io <[email protected]> * Revert thermostat stuff breaking tot (project-chip#34518) * Revert "update tests and thermostat server cluster for new constraints for LocalTemperatureCalibration and MinSetpointDeadBand (project-chip#34474)" This reverts commit 335ac96. * Revert "update constraints for LocalTemperatureCalibration and MinSetpointDeadBand attributes (project-chip#34473)" This reverts commit 21a5bd6. * [Telink] Update Docker image (Zephyr update) (project-chip#34503) * Add TransportPayloadCapability flag for GetConnectedDevices and bubble (project-chip#34450) up the flag to the wrapper IM Python APIs. Add python script binding methods for LargePayload tests --to check if session allows large payload. --to close the underlying TCP connection. --to check if the session is active. * Remove no-longer-used MTRDevice logic for truncating data version lists (project-chip#34183) * Remove no-longer-used MTRDevice logic for truncating data version lists After project-chip#34111, ReadClient handles this logic itself, so the attempted truncation in MTRDevice was now dead code. * Address review comment. * Fix compile issues. * Address another review comment. * Address review comment. * Address review comments by JamesH * Remove unnecessary include file * Address further review comments from JamhesH * Restyled by whitespace * Restyled by clang-format * Address further review comments from JamesH * Address further review comments from JamesH * Update examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Undo suggested change from Boris as idx needed in the loop * Update examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp Co-authored-by: lpbeliveau-silabs <[email protected]> * Address review comments --------- Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Junior Martinez <[email protected]> Co-authored-by: C Freeman <[email protected]> Co-authored-by: Alex Tsitsiura <[email protected]> Co-authored-by: Pradip De <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: jamesharrow <[email protected]> Co-authored-by: lpbeliveau-silabs <[email protected]>
ArekBalysNordic
pushed a commit
to ArekBalysNordic/sdk-connectedhomeip
that referenced
this pull request
Nov 28, 2024
* Add WHM to the all clusters app * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Fix CI test * Address review comments from JamesH * Address review comments from JamesH * Address review comments from JamesH * Restyled by clang-format * Get tests passing again * Restyled by clang-format * Declare some global items for future testing (#34509) Co-authored-by: Andrei Litvin <[email protected]> * [LevelControl] Implemented the Q quality logic for the CurrentLevel a… (#34488) * Implemented the Quiete reporting quality logic for the CurrentLevel and RemainingTime attributes * Restyled by clang-format * use c++ struct rather than c struct format * add cluster-building-blocks to the data model public dep --------- Co-authored-by: Restyled.io <[email protected]> * Revert thermostat stuff breaking tot (#34518) * Revert "update tests and thermostat server cluster for new constraints for LocalTemperatureCalibration and MinSetpointDeadBand (#34474)" This reverts commit 335ac96. * Revert "update constraints for LocalTemperatureCalibration and MinSetpointDeadBand attributes (#34473)" This reverts commit 21a5bd6. * [Telink] Update Docker image (Zephyr update) (#34503) * Add TransportPayloadCapability flag for GetConnectedDevices and bubble (#34450) up the flag to the wrapper IM Python APIs. Add python script binding methods for LargePayload tests --to check if session allows large payload. --to close the underlying TCP connection. --to check if the session is active. * Remove no-longer-used MTRDevice logic for truncating data version lists (#34183) * Remove no-longer-used MTRDevice logic for truncating data version lists After project-chip/connectedhomeip#34111, ReadClient handles this logic itself, so the attempted truncation in MTRDevice was now dead code. * Address review comment. * Fix compile issues. * Address another review comment. * Address review comment. * Address review comments by JamesH * Remove unnecessary include file * Address further review comments from JamhesH * Restyled by whitespace * Restyled by clang-format * Address further review comments from JamesH * Address further review comments from JamesH * Update examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Undo suggested change from Boris as idx needed in the loop * Update examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp Co-authored-by: lpbeliveau-silabs <[email protected]> * Address review comments --------- Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Junior Martinez <[email protected]> Co-authored-by: C Freeman <[email protected]> Co-authored-by: Alex Tsitsiura <[email protected]> Co-authored-by: Pradip De <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: jamesharrow <[email protected]> Co-authored-by: lpbeliveau-silabs <[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.
The existing code made the assumption that if a list of versions was able to fit into the request packet when generating the first subscribe request, then any resubscribe containing data versions for the same clusters would also fit. However the data version numbers themselves can be updated when we receive reports, and this can cause the list to no longer fit the request packet, leaving us in a state where every resubscribe attempt would fail.
Note that this change means even an initial subscribe request with a data version list that is too long will no longer fail; ReadClient will simply truncate the list as needed in all cases.