From b197577ef8a501c097d635539ae6a297f3b479ac Mon Sep 17 00:00:00 2001 From: Feng Pan Date: Wed, 25 Feb 2026 11:30:24 +0000 Subject: [PATCH] Fix protobuf incompatible issue in mgmt test --- tests/common/helpers/telemetry_helper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/common/helpers/telemetry_helper.py b/tests/common/helpers/telemetry_helper.py index a46117a298..dcd26d0d04 100644 --- a/tests/common/helpers/telemetry_helper.py +++ b/tests/common/helpers/telemetry_helper.py @@ -106,6 +106,9 @@ def setup_streaming_telemetry_context(is_ipv6, duthost, localhost, ptfhost, gnxi else: file_exists = ptfhost.stat(path=gnxi_path + "gnmi_cli_py/py_gnmicli.py") py_assert(file_exists["stat"]["exists"] is True) + + # Ensure protobuf package is compatible with the generated _pb2.py files in gnxi. + ptfhost.shell("/root/env-python3/bin/pip install 'protobuf<=3.20.3'", module_ignore_errors=True) except RunAnsibleModuleFail as e: logger.info("Error happens in the setup period of setup_streaming_telemetry, recover the telemetry.") restore_telemetry_forpyclient(duthost, default_client_auth)