-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Default initialize controller vendor ID #20017
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
Merged
mrjerryjohns
merged 4 commits into
project-chip:master
from
mrjerryjohns:init-admin-vendor-id
Jul 7, 2022
Merged
Default initialize controller vendor ID #20017
mrjerryjohns
merged 4 commits into
project-chip:master
from
mrjerryjohns:init-admin-vendor-id
Jul 7, 2022
Conversation
This file contains hidden or 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
Problem: The Python REPL was failing to commission a device when built with detail logging disabled. Cause: It was not correctly initializing the Controller::SetupParams::controllerVendorId when creating a commissioner instance. This resulted in it using garbage values that sometimes, were correct and not zero. Fix: As per discussion here, this default initializes that field to VendorId::Unspecified as well as adding an early check for a valid value at controller creation time. This ensures that applications creating commissioners are forced to explicitly provide a value for their vendor ID. It also ensures we catch applications who don't do so early at commissioner instantiation time. Testing: Validate that the REPL and REPL tests pass correctly. For other platforms, will have to check the various PR tests and see which ones fail.
efa5795
to
ff39af3
Compare
PR #20017: Size comparison from 29133aa to ff39af3 Increases (4 builds for cc13x2_26x2, linux, nrfconnect, telink)
Decreases (4 builds for cc13x2_26x2, cyw30739, esp32, telink)
Full report (30 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
bzbarsky-apple
approved these changes
Jun 27, 2022
yunhanw-google
approved these changes
Jun 27, 2022
chrisdecenzo
approved these changes
Jun 27, 2022
tehampson
approved these changes
Jun 28, 2022
agners
approved these changes
Jun 29, 2022
PR #20017: Size comparison from 9e982ce to 73976c7 Increases (2 builds for esp32, linux)
Decreases (4 builds for cc13x2_26x2, linux, telink)
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
github-actions bot
pushed a commit
that referenced
this pull request
Jul 7, 2022
* Default initialize controller vendor ID Problem: The Python REPL was failing to commission a device when built with detail logging disabled. Cause: It was not correctly initializing the Controller::SetupParams::controllerVendorId when creating a commissioner instance. This resulted in it using garbage values that sometimes, were correct and not zero. Fix: As per discussion here, this default initializes that field to VendorId::Unspecified as well as adding an early check for a valid value at controller creation time. This ensures that applications creating commissioners are forced to explicitly provide a value for their vendor ID. It also ensures we catch applications who don't do so early at commissioner instantiation time. Testing: Validate that the REPL and REPL tests pass correctly. For other platforms, will have to check the various PR tests and see which ones fail. * Review feedback * Rebase and fix-up test logic that got added recently
woody-apple
added a commit
that referenced
this pull request
Jul 7, 2022
* Default initialize controller vendor ID Problem: The Python REPL was failing to commission a device when built with detail logging disabled. Cause: It was not correctly initializing the Controller::SetupParams::controllerVendorId when creating a commissioner instance. This resulted in it using garbage values that sometimes, were correct and not zero. Fix: As per discussion here, this default initializes that field to VendorId::Unspecified as well as adding an early check for a valid value at controller creation time. This ensures that applications creating commissioners are forced to explicitly provide a value for their vendor ID. It also ensures we catch applications who don't do so early at commissioner instantiation time. Testing: Validate that the REPL and REPL tests pass correctly. For other platforms, will have to check the various PR tests and see which ones fail. * Review feedback * Rebase and fix-up test logic that got added recently Co-authored-by: Jerry Johns <johnsj@google.com>
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.
Problem
The Python REPL was failing to commission a device when built with detail logging disabled.
Cause
It was not correctly initializing the
Controller::SetupParams::controllerVendorId
when creating a commissioner instance. This resulted in it using garbage values that sometimes, were correct and not zero.Fix
As per discussion here, this default initializes that field to
VendorId::Unspecified
as well as adding an early check for a valid value at controller creation time. This ensures that applications creating commissioners are forced to explicitly provide a value for their vendor ID. It also ensures we catch applications who don't do so early at commissioner instantiation time.Testing
Validate that the REPL and REPL tests pass correctly.
For other platforms, will have to check the various PR tests and see which ones fail.