Skip to content

[action] [PR:24329] [conditional_mark] Skip gnmi/test_gnmic.py - #24336

Closed
mssonicbld wants to merge 1 commit into
sonic-net:202505from
mssonicbld:cherry/202505/24329
Closed

[action] [PR:24329] [conditional_mark] Skip gnmi/test_gnmic.py#24336
mssonicbld wants to merge 1 commit into
sonic-net:202505from
mssonicbld:cherry/202505/24329

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator

Description of PR

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.

Summary

Fixes # (issue): #24328

Type of change

  • Test case (verification of existing or new feature)

Back port request

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

Approach

What is the motivation for this PR?

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.

How did you do it?

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.

How did you verify/test it?

  • 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.

Any platform specific information?

None.

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

N/A — no test added.

Documentation

N/A.

## Description of PR

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.

## Summary
Fixes # (issue): sonic-net#24328

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

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

## Approach

### What is the motivation for this PR?
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.

### How did you do it?
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`.

### How did you verify/test it?
- `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.

## Any platform specific information?
None.

## Supported testbed topology if it's a new test case?
N/A — no test added.

## Documentation
N/A.

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

Copy link
Copy Markdown
Collaborator Author

Original PR: #24329

@mssonicbld

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

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

@auspham

auspham commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

/azpw retry

@mssonicbld

Copy link
Copy Markdown
Collaborator Author

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator Author

Retrying failed(or canceled) stages in build 1102061:

✅Stage Test:

  • Job impacted-area-kvmtest-dualtor by Elastictest: retried.
  • Job impacted-area-kvmtest-t0 by Elastictest: retried.
  • Job impacted-area-kvmtest-t0-2vlans by Elastictest: retried.
  • Job impacted-area-kvmtest-t1-lag by Elastictest: retried.
  • Job impacted-area-kvmtest-t0-sonic by Elastictest: retried.

@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants