-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Linux: Move UniqueId from ChipFactory to ChipConfig namespace #39879
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
Linux: Move UniqueId from ChipFactory to ChipConfig namespace #39879
Conversation
The UniqueId must be cleared on factory reset, so it does not belong in the factory namespace. See project-chip#39852.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
The code changes move the UniqueId to the ChipConfig namespace and include data migration logic. There's a potential issue with error handling in the migration logic that could mask failures during the migration process. The suggested change ensures that any errors are properly propagated, leading to a more reliable system.
PR #39879: Size comparison from ce90b61 to 96192a2 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
There was a problem hiding this 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 moves the UniqueId
key out of the factory namespace into the chip configuration namespace so that it gets cleared on factory reset, and adds migration logic on Linux to move any existing stored value.
- Changed the
UniqueId
key namespace in both Linux and Darwin implementations fromChipFactory
toChipConfig
. - Added fallback and migration logic in Linux
ReadConfigValueStr
to read from the old factory namespace and re-write into the new one.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/platform/Linux/PosixConfig.cpp | Updated UniqueId namespace and added migration code on read |
src/platform/Darwin/PosixConfig.cpp | Moved UniqueId declaration to ChipConfig namespace |
…t-chip#39879) * Linux: Move UniqueId from ChipFactory to ChipConfig namespace The UniqueId must be cleared on factory reset, so it does not belong in the factory namespace. See project-chip#39852. * Make the linter happy and improve comment
Summary
The UniqueId must be cleared on factory reset, so it does not belong in the factory namespace. See #39852.
Testing
Existing CI tests. Manually tested the migration code path.