Skip to content

[Breaking Change] gNMI Set with sonic-* YANG paths regressed between 202012 and 202512 (translib request_binder) #228

Description

@wangdan1323

Summary
Same gNMI Set request that worked on the 202012 branch fails on the 202512 branch with the same client, same YANG model, and same payload. This is an undocumented backward-incompatible change in translib/request_binder.go affecting any client using sonic-* private YANG paths via gNMI.

Affected component

translib/request_binder.go — the URI-to-ygot binding logic

Reproduction
Client command (identical on both branches)
bashgnmic -a :8080 --insecure -u -p
-e JSON_IETF --target YANG set
--update-path "sonic-interface:sonic-interface/INTERFACE"
--update-value '{"INTERFACE_LIST":[{"portname":"Ethernet1"}]}'
Expected behavior (202012 branch)
Set succeeds. The entry is written to CONFIG_DB under INTERFACE|Ethernet1.
Actual behavior (202512 branch)
Set fails with:
rpc error: code = Unknown desc = parent container sonic-interface
(type *ocbinds.SonicInterface_SonicInterface): JSON contains unexpected field INTERFACE_LIST
Telemetry log shows the failure originates from request_binder.go:
request_binder.go: requestBinder: modified path is: elem:{name:"sonic-interface"}
request_binder.go: Ygot target object: {INTERFACE: nil}
request_binder.go: parent container sonic-interface (type *ocbinds.SonicInterface_SonicInterface): JSON contains unexpected field INTERFACE_LIST
translib.go: Error in request binding

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions