-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fixes #9280 - Add option to adopt existing DeviceComponents #9281
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
Fixes #9280 - Add option to adopt existing DeviceComponents #9281
Conversation
|
A potential issue I found when testing. When you add a module with component names that are already present in on another installed module, which of the following solutions would make most sense?
|
|
I think this is a good starting point for the feature. I mentioned that I would like to verify that the API works as expected (it does). However, I can see from the commit here a298187 that disabling replication was specifically only added to the UI. I can bring both replication and adoption into the API also if you want @jeremystretch - not sure if that's another feature request after or if it is even a good idea. Before merging please test the different scenarios to make sure I didn't miss anything. When this is merged I'll create a pull request for #9001 |
|
Did some testing with this, works great! 👍
The simplest approach may be to simply ignore any existing components which are already assigned to a module. I'll add a note to my review w/more detail.
Probably worth discussing as a separate issue. For now I think introducing the adoption functionality in the UI only is fine. |
|
Added prefetching of installed components. Ignore components with a module set. This will make module installation fail if replicate components is activated. A better error message can be shown when I finish the error message PR. |
|
I'll fix the test tomorrow. |
Fixes: #9280
This PR adds a new boolean field (adopt_components) to the Module form. The creation logic has been changed to check for and change the module field on any existing components.
This is still a draft. I need to verify that the API works, and I haven't checked a few cases.Looking for input for the implementation also.