[16.0] Omit empty fields in dpc.go on JSON serialization#5369
Merged
eriknordmark merged 2 commits intoNov 10, 2025
Merged
Conversation
Add json:",omitempty" tags to all struct fields in dpc.go to omit zero/empty values from JSON serialization. This produces cleaner JSON output for device port configuration structures and prevents from creating too large messages. Signed-off-by: Nikolay Martyanov <[email protected]> (cherry picked from commit 8e86414)
So that we are following the best practicies and meke Yetus happy =P Signed-off-by: Nikolay Martyanov <[email protected]> (cherry picked from commit 2677fac)
milan-zededa
approved these changes
Nov 10, 2025
Member
Author
|
/rerun red |
rucoder
added a commit
to rucoder/eve
that referenced
this pull request
Nov 11, 2025
- this release introduces support for DPC types that have "omitempty" annotations. see lf-edge#5369 Signed-off-by: Mikhail Malyshev <[email protected]>
eriknordmark
pushed a commit
that referenced
this pull request
Nov 11, 2025
- this release introduces support for DPC types that have "omitempty" annotations. see #5369 Signed-off-by: Mikhail Malyshev <[email protected]>
rucoder
added a commit
to rucoder/eve
that referenced
this pull request
Nov 20, 2025
- this release introduces support for DPC types that have "omitempty" annotations. see lf-edge#5369 Signed-off-by: Mikhail Malyshev <[email protected]> (cherry picked from commit 524b084)
rucoder
added a commit
to rucoder/eve
that referenced
this pull request
Nov 20, 2025
- this release introduces support for DPC types that have "omitempty" annotations. see lf-edge#5369 Signed-off-by: Mikhail Malyshev <[email protected]> (cherry picked from commit 524b084)
rene
pushed a commit
that referenced
this pull request
Nov 22, 2025
- this release introduces support for DPC types that have "omitempty" annotations. see #5369 Signed-off-by: Mikhail Malyshev <[email protected]> (cherry picked from commit 524b084)
rene
pushed a commit
that referenced
this pull request
Nov 22, 2025
- this release introduces support for DPC types that have "omitempty" annotations. see #5369 Signed-off-by: Mikhail Malyshev <[email protected]> (cherry picked from commit 524b084)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #5364
PR dependencies
None.
How to test and validate this PR
port0-port7, one namedport5-starlink).port5-starlinkwith IDs4001-4012and labels likeport5-starlink.4001, all usingADAPTER_USAGE_MANAGEMENT.The configuration should apply partially (some “too long” label warnings), but nim must not crash.
port5-starlink(ID4013, same usage).Before the fix nim crashes.
After the fix nim stays alive and reports a validation error for the 13th VLAN instead of crashing.
Changelog notes
Simplify DPC’s internal representation to avoid exceeding JSON message size limits and to support more sophisticated network configurations.
Checklist
check them.