Skip to content

[gnmi/test_gnmic] Skip integration test while gnmic is being removed from docker-ptf #24328

Description

@hdwhdw

Context

The gnmic Go binary is being removed from docker-ptf (companion sonic-buildimage PR to follow). This is part of an effort to reduce the attack surface of docker-ptf after a series of golang.org/x/* CVEs flagged by S360 against the embedded Go modules. The companion gnoic removal landed in sonic-buildimage#27055.

While there is no current S360 finding against gnmic itself, it is only exercised by a single integration test (tests/gnmi/test_gnmic.py, which calls gnmic capabilities via PtfGnmic.capabilities()). All other gNMI/gNOI testing in this repo uses the in-tree Python gNOI/gNMI clients (gnmi_tls.gnoi.*, pygnmi, etc.), not the gnmic CLI.

Removing the binary is therefore a low-cost reduction in supply-chain surface — but tests/gnmi/test_gnmic.py will start failing as soon as the new docker-ptf image is rolled out.

Plan

  1. (this issue) Skip gnmi/test_gnmic.py via conditional_mark referencing this issue.
  2. Land the corresponding docker-ptf change to remove gnmic from the image.
  3. Decide long-term: either delete tests/gnmi/test_gnmic.py + tests/common/ptf_gnmic.py entirely, or restore gnmic if a real consumer emerges. Closing this issue will lift the skip — by then we should have a definitive answer.

Affected

  • tests/gnmi/test_gnmic.py — only test that invokes the gnmic binary.
  • tests/common/ptf_gnmic.py — wrapper module; constructor does not shell out, so other fixtures that hold a PtfGnmic reference (gnmi_tls) are not affected unless they call methods on it.
  • tests/common/test_ptf_gnmic.py — unit test, mocks subprocess; not affected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions