Improve gNMI Set error responses with proper gRPC codes and request paths - #730
Open
Verma-Anukul wants to merge 3 commits into
Open
Verma-Anukul wants to merge 3 commits into
Verma-Anukul wants to merge 3 commits into
Conversation
Use transutil.ToStatus() in the Set handler so translib errors surface with correct gRPC codes and request-path context. Extend transl_utils error mapping for CVL failures and path-aware messages, and add tests for invalid-path Set error reporting. Signed-off-by: Verma-Anukul <anukulverma2013@gmail.com>
Contributor
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Restore richer TranslibCVLFailure messages and update the invalid-path test name to match c-master behavior. Signed-off-by: Verma-Anukul <anukulverma2013@gmail.com>
Contributor
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Cover errorPath, formatErrorWithPath, CVL table/key detail, and TranslProcessBulk gRPC status returns to satisfy diff coverage for PR sonic-net#730. Signed-off-by: Verma-Anukul <anukulverma2013@gmail.com>
Contributor
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Contributor
|
Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks! ---Powered by SONiC BuildBot
|
Contributor
Author
|
@hdwhdw |
1 similar comment
Contributor
Author
|
@hdwhdw |
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.
Summary
InvalidArgument, NotFound) instead of always returning Unknown
gNMI path caused the failure
info instead of generic "Validation failed"
Changes
gnmi_server/server.go: Convert Set errors throughToStatus()beforereturning to the gRPC client
transl_utils/transl_utils.go: AdderrorPath()andformatErrorWithPath()helpers; improve CVL error message fallback chain; fix bulk operation error
reporting with per-entry paths
gnmi_server/server_test.go: Update expected error codes in testsBefore / After
Before:
code = Unknown desc = got float64 type for field enabled, expect boolAfter:
code = InvalidArgument desc = got float64 type for field enabled, expect bool; list entry: interface[name=Ethernet8]request path: /openconfig-interfaces:interfaces/interface