-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Adds replication and adoption for module import #9498
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
Adds replication and adoption for module import #9498
Conversation
|
Thank you for the PR! I'm not a big fan of having that much duplicate code for the clean method. @jeremystretch is there any clean way to share the The code functioned as expected when testing. |
|
I don't have a strong preference for an approach, but we definitely can't just replicate the existing code. Maybe a utility function within the |
|
Updated PR to move clean logic to a common class that both forms can inherit from. This works in my testing, but I'm not very familiar with all of this, so please let me know if this isn't a good solution. |
|
As we're getting closer to the v3.3 release, I just wanted to follow up on this to see if there's anything else I need to do to be able to get this merged. |
|
@kkthxbye-code or @jeremystretch, as there have been a number of point releases now since this PR was submitted and we continue to get closer to a v3.3 release, I just wanted to follow up again to see if there is anything I still need to do to get this merged. Thank you. |
jeremystretch
left a comment
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.
@sleepinggenius2 I think the approach looks good, thanks for the revision. Could you extend the import view test to verify the function of the two new fields please?
I assume that this will need to go in the |
|
@jeremystretch, I requested a review a month ago after I made the changes that you asked for, but it is still showing Changes requested and there has been no movement, so I apologize if there was something I missed in that process. |
|
This PR has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further action is taken. |
|
@jeremystretch or @kkthxbye-code, what do I need to do to get this merged or at least kept from being closed? |
kkthxbye-code
left a comment
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.
Sorry this fell through the cracks @sleepinggenius2
I checked out the PR and rebased on the development and everything works exactly as it should, both for CSV import and through the UI for all combinations of replication/adoption. So this looks good to me, can we merge this @jeremystretch ?
| # Ensure that interface is created with no module | ||
| self.assertIsNone(interface.module) | ||
|
|
||
| # Create a module with adopted components |
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.
One small thing, this testcase actually fails on my PC. It's trying to install in the first modulebay of the device, which is already occupied from the setup. If I change to another bay it passes. Not sure if it's something with my setup or from the rebase.
Testcase that fails:
self.assertEqual(self._get_queryset().count(), initial_count + len(csv_data) - 1)
AssertionError: 3 != 4
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.
Same. Maybe related to 9ef24d3? In any case, changing it to an empty bay appears to fix the test.
aa096fe to
2a55c29
Compare
|
I appreciate your all's assistance with this. |
|
Not sure what's going on with CI today. Tests pass locally, though I'm getting failure notifications from GitHub. Nothing's showing up for the PR currently. Going to go ahead and merge this into |
Fixes: #9361
Makes the replicate_components and adopt_components fields available in the UI to also be available when doing a module bulk import.