Skip to content

Conversation

@mfiedorowicz
Copy link
Member

This pull request introduces significant enhancements to the protobuf schema in diode-proto/diode/v1/ingester.proto, mainly by adding a metadata field to many message types and defining a custom field option for NetBox support. Additionally, the Makefile is updated to ensure generated Go code is formatted automatically. These changes improve extensibility and maintainability for future integrations and custom metadata handling.

Protobuf schema enhancements:

  • Added a google.protobuf.Struct metadata field to a wide range of message types (e.g., ASN, Device, Interface, etc.), enabling flexible storage of additional structured data. In most cases, this field is explicitly marked as not supported by NetBox using a new custom field option. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37]
  • Defined a new custom field option netbox_supported (bool) for protobuf fields, allowing schema consumers to determine if a field is supported by NetBox.
  • Added necessary imports for google/protobuf/descriptor.proto and google/protobuf/struct.proto to support the new metadata field and custom options.

Build and formatting improvements:

  • Updated the Makefile to automatically run gofmt on generated Go SDK and server code, ensuring consistent code formatting after code generation. [1] [2]

Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
@mfiedorowicz mfiedorowicz self-assigned this Nov 14, 2025
@github-actions
Copy link

Go test coverage

STATUS ELAPSED PACKAGE COVER PASS FAIL SKIP
🟢 PASS 1.19s github.com/netboxlabs/diode/diode-server/auth 44.7% 42 0 0
🟢 PASS 0.26s github.com/netboxlabs/diode/diode-server/auth/cli 0.0% 0 0 0
🟢 PASS 1.02s github.com/netboxlabs/diode/diode-server/authutil 82.8% 5 0 0
🟢 PASS 0.00s github.com/netboxlabs/diode/diode-server/dbstore/postgres 0.0% 0 0 0
🟢 PASS 1.09s github.com/netboxlabs/diode/diode-server/entityhash 86.7% 16 0 0
🟢 PASS 0.00s github.com/netboxlabs/diode/diode-server/errors 0.0% 0 0 0
🟢 PASS 1.27s github.com/netboxlabs/diode/diode-server/ingester 82.7% 25 0 0
🟢 PASS 1.05s github.com/netboxlabs/diode/diode-server/migrator 70.4% 4 0 0
🟢 PASS 4.16s github.com/netboxlabs/diode/diode-server/netboxdiodeplugin 83.6% 40 0 0
🟢 PASS 2.63s github.com/netboxlabs/diode/diode-server/reconciler 82.9% 86 0 0
🟢 PASS 1.01s github.com/netboxlabs/diode/diode-server/reconciler/applier 85.7% 1 0 0
🟢 PASS 0.01s github.com/netboxlabs/diode/diode-server/reconciler/changeset 0.0% 0 0 0
🟢 PASS 1.08s github.com/netboxlabs/diode/diode-server/reconciler/differ 63.8% 6 0 0
🟢 PASS 1.02s github.com/netboxlabs/diode/diode-server/server 85.7% 14 0 0
🟢 PASS 1.03s github.com/netboxlabs/diode/diode-server/telemetry 28.0% 26 0 0
🟢 PASS 1.02s github.com/netboxlabs/diode/diode-server/telemetry/otel 91.7% 25 0 0
🟢 PASS 1.01s github.com/netboxlabs/diode/diode-server/version 100.0% 2 0 0

Total coverage: 54.4%

@mfiedorowicz mfiedorowicz marked this pull request as ready for review November 17, 2025 08:34
Copy link
Contributor

@jajeffries jajeffries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mfiedorowicz mfiedorowicz merged commit e12fd0b into develop Nov 19, 2025
8 checks passed
@mfiedorowicz mfiedorowicz deleted the feat-add-metadata branch November 19, 2025 18:45
barryCrunch pushed a commit to barryCrunch/diode that referenced this pull request Nov 26, 2025
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants