Move gnmiext into new transport package - #277
Merged
Merged
Conversation
felix-kaestner
force-pushed
the
refactor/deviceutil
branch
3 times, most recently
from
April 2, 2026 22:13
05aa0ef to
2943ae0
Compare
felix-kaestner
force-pushed
the
refactor/deviceutil
branch
from
April 8, 2026 13:42
2943ae0 to
b8d9fdc
Compare
felix-kaestner
marked this pull request as ready for review
April 8, 2026 13:45
felix-kaestner
force-pushed
the
refactor/deviceutil
branch
from
April 8, 2026 13:45
b8d9fdc to
c50156d
Compare
nikatza
approved these changes
Apr 10, 2026
felix-kaestner
force-pushed
the
refactor/deviceutil
branch
from
April 13, 2026 07:57
c50156d to
897d764
Compare
When a gRPC call returns a status code that indicates a permanent failure (e.g. InvalidArgument, NotFound, PermissionDenied, Unauthenticated), retrying the request will not resolve the issue. Without marking these errors as terminal, the controller-runtime reconciler keeps requeuing the reconciliation indefinitely, wasting resources. Introduce a TerminalErrorInterceptor that wraps errors with non-retryable gRPC status codes as reconcile.TerminalError so the reconciler stops retrying immediately. Also fix error wrapping in GetDeviceByName which previously dropped the underlying error, and add documentation to GetDeviceBySerial.
As we plan to use our `gnmiext` package also for other provider implementations of other hardware vendors than Cisco, we now move it outside of the cisco provider package scope. With this change we are introducing a new `transport` package which will house multiple packages related to transport/protocol specific utilities and clients.
Extracts `NewClient`, `Option`, `WithDefaultTimeout`, the interceptors, and the `auth` type from `internal/deviceutil` into a dedicated `internal/transport/grpcext` package, mirroring the existing `internal/transport/gnmiext` sibling. `deviceutil` now only contains device CRD helpers and the `Connection` type.
The Configurable interface is used for both configuration and state data, making the old name misleading. Rename it to DataElement, the term used by the gNMI specification for any item addressable by a path — regardless of whether it represents a leaf, container, or entire subtree. Update variable names in the nxos provider package to reflect the intent of each call site: `updates` for Update, `deletes` for Delete, `patches` for Patch, and `el` for generic slices, replacing the ambiguous `conf` that implied configuration-only usage.
felix-kaestner
force-pushed
the
refactor/deviceutil
branch
from
April 13, 2026 07:58
897d764 to
21bd916
Compare
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
1 similar comment
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
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.
As we plan to use our
gnmiextpackage also for other providerimplementations of other hardware vendors than Cisco, we now move it
outside of the cisco provider package scope.
With this change we are introducing a new
transportpackage which willhouse multiple packages related to transport/protocol specific utilities
and clients.
Additionally a new
transport/grpcextpackage is added which refactorsout all the grpc related code from the
deviceutilpackage and add anadditional interceptor for handling non-retryable grpc error codes.