[202511] [conditional_mark] Skip gnmi/test_gnmic.py (#24329) - #24339
Closed
auspham wants to merge 1 commit into
Closed
[202511] [conditional_mark] Skip gnmi/test_gnmic.py (#24329)#24339auspham wants to merge 1 commit into
auspham wants to merge 1 commit into
Conversation
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>
Collaborator
|
/azp run |
github-actions
Bot
requested review from
BYGX-wcr,
xwjiang-ms and
yutongzhang-microsoft
April 30, 2026 05:51
|
Azure Pipelines successfully started running 1 pipeline(s). |
YatishSVC
approved these changes
Apr 30, 2026
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.
Add a conditional-mark
skipfortests/gnmi/test_gnmic.pywhile thegnmicbinary is being removed fromdocker-ptf.This is a precondition for the companion
docker-ptfchange that dropsgnmicfrom the image.tests/gnmi/test_gnmic.pyis the only test in this repo that invokes/usr/local/bin/gnmicdirectly (viaPtfGnmic.capabilities()); without this skip, that test would start failing on the nextdocker-ptfrebuild.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-ptfsupply-chain surface.gnoicwas removed in sonic-buildimage#27055;gnmicis 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.*andpygnmicover the actual gNMI/gNOI surfaces under test.Added an entry under the
gnmi/section oftests_mark_conditions.yamlthat 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 restoredgnmic.yaml.safe_loadparses the file cleanly with the new entry present.pytest_collection_modifyitems; no test execution required to confirm marker application — the existingunit_test/suite undertests/common/plugins/conditional_mark/covers that mechanism.None.
N/A — no test added.
N/A.
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
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