diff --git a/tests/common/helpers/telemetry_helper.py b/tests/common/helpers/telemetry_helper.py index a46117a29..dcd26d0d0 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)