Skip to content

[202511] [conditional_mark] Skip gnmi/test_gnmic.py (#24329) - #24339

Closed
auspham wants to merge 1 commit into
sonic-net:202511from
auspham:austinpham/cherry-pick-24329-202511
Closed

[202511] [conditional_mark] Skip gnmi/test_gnmic.py (#24329)#24339
auspham wants to merge 1 commit into
sonic-net:202511from
auspham:austinpham/cherry-pick-24329-202511

Conversation

@auspham

@auspham auspham commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Add a conditional-mark skip for tests/gnmi/test_gnmic.py while the gnmic binary is being removed from docker-ptf.

This is a precondition for the companion docker-ptf change that drops gnmic from the image. tests/gnmi/test_gnmic.py is the only test in this repo that invokes /usr/local/bin/gnmic directly (via PtfGnmic.capabilities()); without this skip, that test would start failing on the next docker-ptf rebuild.

Fixes # (issue): #24328

  • Test case (verification of existing or new feature)

  • Request back port to applicable release branches (master only — no behavior change for release branches that don't run this test)

Reduce docker-ptf supply-chain surface. gnoic was removed in sonic-buildimage#27055; gnmic is the next candidate because it has only one consumer in sonic-mgmt and that consumer can be skipped without losing coverage of any production behavior — gnmi_tls.gnoi.* and pygnmi cover the actual gNMI/gNOI surfaces under test.

Added an entry under the gnmi/ section of tests_mark_conditions.yaml that skips the test while #24328 is open. When the issue closes, the skip lifts — by then we should have either deleted the test outright or restored gnmic.

  • yaml.safe_load parses the file cleanly with the new entry present.
  • conditional_mark plugin uses pytest_collection_modifyitems; no test execution required to confirm marker application — the existing unit_test/ suite under tests/common/plugins/conditional_mark/ covers that mechanism.

None.

N/A — no test added.

N/A.

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Add a conditional-mark `skip` for `tests/gnmi/test_gnmic.py` while the
`gnmic` binary is being removed from `docker-ptf`.

This is a precondition for the companion `docker-ptf` change that drops
`gnmic` from the image. `tests/gnmi/test_gnmic.py` is the only test in
this repo that invokes `/usr/local/bin/gnmic` directly (via
`PtfGnmic.capabilities()`); without this skip, that test would start
failing on the next `docker-ptf` rebuild.

Fixes # (issue): sonic-net#24328

- [x] Test case (verification of existing or new feature)

- [ ] Request back port to applicable release branches (master only — no
behavior change for release branches that don't run this test)

Reduce `docker-ptf` supply-chain surface. `gnoic` was removed in
[sonic-buildimage#27055](sonic-net/sonic-buildimage#27055);
`gnmic` is the next candidate because it has only one consumer in
sonic-mgmt and that consumer can be skipped without losing coverage of
any production behavior — `gnmi_tls.gnoi.*` and `pygnmi` cover the
actual gNMI/gNOI surfaces under test.

Added an entry under the `gnmi/` section of `tests_mark_conditions.yaml`
that skips the test while sonic-net#24328 is open. When the
issue closes, the skip lifts — by then we should have either deleted the
test outright or restored `gnmic`.

- `yaml.safe_load` parses the file cleanly with the new entry present.
- conditional_mark plugin uses `pytest_collection_modifyitems`; no test
execution required to confirm marker application — the existing
`unit_test/` suite under `tests/common/plugins/conditional_mark/` covers
that mechanism.

None.

N/A — no test added.

N/A.

Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham changed the title [conditional_mark] Skip gnmi/test_gnmic.py (#24329) [202511] [conditional_mark] Skip gnmi/test_gnmic.py (#24329) Apr 30, 2026
@auspham auspham closed this May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants