-
Notifications
You must be signed in to change notification settings - Fork 29
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
Remove diffsync
field from DiffSyncModel
#256
Comments
- Remove DiffSyncModel.diffsync field - Add diffsync parameter to DiffSyncModel.create/update/delete This closes networktocode#256
This actually similarly relates to nautobot/nautobot-app-ssot#272 because of the What do you ultimately feel the need to pass the |
Yeah primarily for me its about having the logging context available. |
I don't necessarily need the DiffSync or Logger in the model itself. I need the logger in the CRUD methods and it's also very helpful to have the DiffSync instance in the CRUD methods because that's where we wind up stashing some things like the Nautobot API client, NSO API client, DB connections |
But should you? Or should you have a generic |
Environment
Proposed Functionality
diffsync
field from DiffSyncModeldiffsync
to DiffSyncModel.update and DiffSyncModel.create method signaturesThere are a few reasons behind my thinking: 1) It makes the API a bit more consistent 2) It might make it easier for Python to run GC if there's no/fewer cyclical references between objects 3) I didn't see a lot of references to this field outside of create/update/delete
This is likely appropriate for diffsync v2 #232 since it breaks the API.
Other feature requests like #255 may benefit from this change since it would mean there is no assumption that DiffSyncModel has a reference to a given DIffSync
Use Case
The text was updated successfully, but these errors were encountered: