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

[Python] Fix schema not found error on vendor specific data #26120

Merged
merged 1 commit into from
Apr 24, 2023
Merged

[Python] Fix schema not found error on vendor specific data #26120

merged 1 commit into from
Apr 24, 2023

Conversation

marcelveldt
Copy link
Contributor

@marcelveldt marcelveldt commented Apr 17, 2023

When Vendor specific data is sent in a read subscription where there is no schema present for the specific Attribute, it is not possible to instantiate a TypedAttributePath due to the simple fact there is not AttributeSchema for that vendor specific data which is fine.

Problem is that the report sends multiple changed values at once so when the above happens, all other values in the same report are also lost (because the Exception is thrown in instantiating the TypedAttributePath of one of the values in the same "burst").

This addresses that issue:

  • Still raise an Exception if the schema was not found found but use KeyError instead of the too generic "Exception".
  • Catch the KeyError (and already existing ValueError) and log it.
  • Still call the "OnAttributeChangeCb" callback for other values in the report.

@CLAassistant
Copy link

CLAassistant commented Apr 17, 2023

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

PR #26120: Size comparison from 3037a8a to 3dde53e

Increases (1 build for cc32xx)
platform target config section 3037a8a 3dde53e change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20328411 20328412 1 0.0
Full report (1 build for cc32xx)
platform target config section 3037a8a 3dde53e change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20328411 20328412 1 0.0
.debug_line 2687890 2687890 0 0.0
.debug_loc 2838930 2838930 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042155 3042155 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0

@github-actions
Copy link

PR #26120: Size comparison from 2b3d5c3 to ed51953

Increases (1 build for cc32xx)
platform target config section 2b3d5c3 ed51953 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20328411 20328412 1 0.0
Full report (1 build for cc32xx)
platform target config section 2b3d5c3 ed51953 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20328411 20328412 1 0.0
.debug_line 2687890 2687890 0 0.0
.debug_loc 2838930 2838930 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042155 3042155 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0

@andy31415 andy31415 merged commit fa303cd into project-chip:master Apr 24, 2023
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.

3 participants