You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The legacy tests/gnmi setup stops supervisor-managed programs and launches the
gNMI server through nohup with test-specific flags. Nine test modules depend
on that lifecycle (27 test functions, roughly 67 static cases, and 55 legacy
helper call sites). It is fragile under setup failures, certificate changes,
reboots, and teardown, and it couples management-plane tests to PTF/DUT CLI
clients and text parsing.
tests/common/: the only owner of PKI, CONFIG_DB profiles, target selection,
supervisor restart, authenticated readiness, rollback/cleanup, and post-reboot
re-provisioning.
Suite-local fixtures may select profiles or expose domain names, but must not
duplicate server lifecycle. Native tests assert structured values and gRPC
status codes, not legacy CLI text.
Use expand-contract: land native coverage beside old tests, prove parity, then
delete each corresponding old slice. Do not mix native branches into the old
helper, and do not leave a permanent parallel smoke suite.
Review and test policy
Each PR must be one coherent, independently green reviewer story, normally
about 200-500 hand-written changed lines. Avoid drive-by cleanup, unrelated
conditional marks, and generated protocol code mixed with migration changes.
For every applicable PR:
Run static/unit tests.
Run each changed integration test individually on local vms-kvm-t0.
Run the changed module in one invocation to expose lifecycle interactions.
Run the changed native subset three consecutive times from restored state.
Run old/new parity tests when replacing behavior.
Require JUnit zero failures/errors.
Require no unhandled thread/process exception, leaked process, core dump,
failed critical process, stale certificate/config row, or forced recovery
caused by the new tests.
Every PR description should include exact commands, JUnit summary, warnings,
and before/after DUT service health. KVM is the default development gate;
multi-ASIC, management-VRF, SmartSwitch, CRL IPv6, and release compatibility
also require their specialized matrix before deleting old coverage.
Current KVM evidence
Validated on a local virtual T0 testbed:
Existing managed gNOI System.Time: TLS and UDS passed (2 tests).
Legacy native CONFIG_DB incremental Set oracle passed.
#26013 capabilities and OpenConfig Get passed individually.
Full #26013 pygnmi module passed 14/14; JUnit reported zero
failures/errors.
Five subscription cases emitted unhandled background-thread exceptions during
teardown (CANCELLED: Channel closed or INVALID_ARGUMENT: queue: disposed).
This is a blocking quality gap despite the green JUnit result.
Remove migrated helpers/modules, manual server nohup lifecycle, obsolete
certificate plumbing, and stale skips.
Gate: full native KVM matrix passes three times, specialized matrices pass,
search confirms the targeted legacy path is gone, and nightly soak shows no
teardown/critical-process regression.
Compatibility decision
The managed legacy telemetry launcher disables native write. We should either
declare a modern gnmi-native compatibility floor for the new suite or fund a
separate product-image change. Do not silently claim telemetry-only native-write
parity.
Non-goals
Preserve legacy CLI output or helper signatures.
Migrate copied nohup paths in HA, DASH, SAI validation, or other suites in
these PRs.
Delete old behavior based only on new smoke coverage.
Problem
The legacy
tests/gnmisetup stops supervisor-managed programs and launches thegNMI server through
nohupwith test-specific flags. Nine test modules dependon that lifecycle (27 test functions, roughly 67 static cases, and 55 legacy
helper call sites). It is fragile under setup failures, certificate changes,
reboots, and teardown, and it couples management-plane tests to PTF/DUT CLI
clients and text parsing.
The repository now has a better destination:
installs
pygnmiindocker-sonic-mgmt.in-process pygnmi client for gNMI.
and #26040 propose a
typed, PTF-free native gNOI client and suite.
We should move directly to that native end state rather than deepen another
PTF-side adapter.
Target architecture
Use segregated behavior suites over one shared managed gRPC test environment:
tests/gnmi_native/: native pygnmi behavior tests;tests/gnoi/: typedsonic_grpc.GnoiClientbehavior tests;tests/common/: the only owner of PKI, CONFIG_DB profiles, target selection,supervisor restart, authenticated readiness, rollback/cleanup, and post-reboot
re-provisioning.
Suite-local fixtures may select profiles or expose domain names, but must not
duplicate server lifecycle. Native tests assert structured values and gRPC
status codes, not legacy CLI text.
Use expand-contract: land native coverage beside old tests, prove parity, then
delete each corresponding old slice. Do not mix native branches into the old
helper, and do not leave a permanent parallel smoke suite.
Review and test policy
Each PR must be one coherent, independently green reviewer story, normally
about 200-500 hand-written changed lines. Avoid drive-by cleanup, unrelated
conditional marks, and generated protocol code mixed with migration changes.
For every applicable PR:
vms-kvm-t0.failed critical process, stale certificate/config row, or forced recovery
caused by the new tests.
Every PR description should include exact commands, JUnit summary, warnings,
and before/after DUT service health. KVM is the default development gate;
multi-ASIC, management-VRF, SmartSwitch, CRL IPv6, and release compatibility
also require their specialized matrix before deleting old coverage.
Current KVM evidence
Validated on a local virtual T0 testbed:
#26013capabilities and OpenConfig Get passed individually.#26013pygnmi module passed 14/14; JUnit reported zerofailures/errors.
teardown (
CANCELLED: Channel closedorINVALID_ARGUMENT: queue: disposed).This is a blocking quality gap despite the green JUnit result.
Phased plan
Phase 1 / PR 1: stabilize native pygnmi client
binding, typed errors, fork-safe channel lifetime, and clean subscription
cancellation.
with no unhandled thread warnings.
Phase 2 / PR 2: establish one shared managed environment
gnmi_tlswith the useful reboot re-provisioning behavior from[gnoi]: Add PTF-free native gNOI test suite (System.Time, File.Stat) #26040.
lifecycle; setup-failure and teardown tests restore DUT state.
Phase 3 / PR 3: create
tests/gnmi_nativeread-only tracerPhase 4 / PR 4: port native CONFIG_DB Set tracer
Phase 5 / PR 5: port remaining ordinary writes
latency coverage.
Phase 6 / PR 6: port Get and subscription matrix
three KVM passes.
Phase 7 / PR 7: port certificate authorization and CRL
state, KVM plus required IPv6 validation.
Phase 8 / PR 8: port VRF profiles
management-VRF validation before deleting old tests.
Phase 9 / PR 9: port rotation and 2038 certificates
with no stale cert state.
Phase 10 / PR 10: port SmartSwitch behavior
proto_bytesfor DPU APPL_DB writes and typed gNOI routing metadata.coverage until specialized parity passes.
Phase 11 / PR 11: consolidate native gNOI suite
tests/gnoi/on the same common environment; do not fork TLS setup.upgrade remains image-pair gated.
Phase 12 / PR 12: contract legacy setup
nohuplifecycle, obsoletecertificate plumbing, and stale skips.
search confirms the targeted legacy path is gone, and nightly soak shows no
teardown/critical-process regression.
Compatibility decision
The managed legacy telemetry launcher disables native write. We should either
declare a modern
gnmi-nativecompatibility floor for the new suite or fund aseparate product-image change. Do not silently claim telemetry-only native-write
parity.
Non-goals
nohuppaths in HA, DASH, SAI validation, or other suites inthese PRs.