netboxlabs / diode

Diode data ingestion for NetBox, from NetBox Labs
https://netboxlabs.com
Other
37 stars 1 forks source link

fix: OBS-447 - diode-server: reconciler - updates with nested object types #86

Closed mfiedorowicz closed 5 months ago

mfiedorowicz commented 5 months ago

This PR as a side effect minimises amount of required data needed for reconciliation of existing entities. Example: when ingesting data for existing device with existing platform and its manufacturer, instead of pushing whole platform and nested manufacturer objects, we needs to provide platform ID only.

Some of the NetBox nested object types (and their serializers) don't handle full object dicts, i.e. Tags when doing updates of parent documents like interface -> device -> tags - in such scenario, if tags for device are provided, we need to update the device with tags, and then update interface with device ID only, as nothing else was to change.

Also:

image

linear[bot] commented 5 months ago

OBS-447 🐛 diode-server: interface update fails when existing nested device has tags