-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Bug: Recent PR Causes Missing is_replaceable Field in TRANSCEIVER_INFO, Breaking test_transceiver_info #22150
Description
Is it platform specific
generic
Importance or Severity
Critical
Description of the bug
The following test fails: test_snmp_phy_entity.py::test_transceiver_info.
The failure is due to a missing field (is_replaceable) in the STATE_DB::TRANSCEIVER_INFO table. This field is missing as a result of the following PR, merged on March 15th:
https://github.com/Azure/sonic-platform-daemons.msft/pull/9
The test includes the following assertion:
assert transceiver_snmp_fact['entPhysIsFRU'] == REPLACEABLE if transceiver_info['is_replaceable'] == 'True' else NOT_REPLACEABLE
Since transceiver_info is populated from STATE_DB and the is_replaceable field is currently not present, the test raises a KeyError.
The PR changes introduced logic that, in certain cases, populates STATE_DB::TRANSCEIVER_INFO using data from the module's EEPROM. However, because the EEPROM does not provide the is_replaceable field, it is missing from the resulting STATE_DB entries.
As a result, I believe the changes in the PR are incorrect. Reverting the PR restores the field and allows the test to pass.
Steps to Reproduce
Run the test: test_snmp_phy_entity.py::test_transceiver_info
Actual Behavior and Expected Behavior
Actual behavior: The test fails.
Expected behavior: The test passes (with all expected transceiver information present)
Relevant log output
KeyError: 'is_replaceable'Output of show version, show techsupport
SONiC Software Version: SONiC.202412_RC.44-64043bb73_Internal
SONiC OS Version: 12
Distribution: Debian 12.10
Kernel: 6.1.0-29-2-amd64
Build commit: 64043bb73
Build date: Wed Mar 26 00:43:15 UTC 2025
Built by: sw-r2d2-bot@r-build-sonic-ci03-242
Platform: x86_64-nvidia_sn5610n-r0
HwSKU: Mellanox-SN5610N-C224O8
ASIC: mellanox
ASIC Count: 1
Serial Number: MT2452600Q8U
Model Number: SN5610N
Hardware Revision: A1
Uptime: 10:38:53 up 4:02, 1 user, load average: 0.51, 0.65, 0.78
Date: Wed 26 Mar 2025 10:38:53
Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-orchagent 202412_RC.44-64043bb73_Internal e56de3bf0af5 354MB
docker-orchagent latest e56de3bf0af5 354MB
docker-fpm-frr 202412_RC.44-64043bb73_Internal 949a38cbca6e 375MB
docker-fpm-frr latest 949a38cbca6e 375MB
docker-macsec latest 05d6c01d3a11 344MB
docker-nat 202412_RC.44-64043bb73_Internal b30440145630 344MB
docker-nat latest b30440145630 344MB
docker-sflow 202412_RC.44-64043bb73_Internal 5ef98d2b6773 343MB
docker-sflow latest 5ef98d2b6773 343MB
docker-teamd 202412_RC.44-64043bb73_Internal 826db7d9ffa0 341MB
docker-teamd latest 826db7d9ffa0 341MB
docker-dhcp-server latest 76448567103e 335MB
docker-dhcp-relay latest 584f5bf9cc24 321MB
docker-platform-monitor 202412_RC.44-64043bb73_Internal 47a981510c61 433MB
docker-platform-monitor latest 47a981510c61 433MB
docker-snmp 202412_RC.44-64043bb73_Internal d4633dc0bc70 356MB
docker-snmp latest d4633dc0bc70 356MB
docker-syncd-mlnx 202412_RC.44-64043bb73_Internal ae440911a472 799MB
docker-syncd-mlnx latest ae440911a472 799MB
docker-sonic-mgmt-framework 202412_RC.44-64043bb73_Internal 83a87ca7bff4 399MB
docker-sonic-mgmt-framework latest 83a87ca7bff4 399MB
docker-sonic-restapi 202412_RC.44-64043bb73_Internal 12314ffc7153 331MB
docker-sonic-restapi latest 12314ffc7153 331MB
docker-router-advertiser 202412_RC.44-64043bb73_Internal 887710731cff 312MB
docker-router-advertiser latest 887710731cff 312MB
docker-eventd 202412_RC.44-64043bb73_Internal afb532824b19 312MB
docker-eventd latest afb532824b19 312MB
docker-lldp 202412_RC.44-64043bb73_Internal 5f3a26924618 358MB
docker-lldp latest 5f3a26924618 358MB
docker-sonic-bmp 202412_RC.44-64043bb73_Internal f764edac9aea 313MB
docker-sonic-bmp latest f764edac9aea 313MB
docker-mux 202412_RC.44-64043bb73_Internal 0b62319a0338 364MB
docker-mux latest 0b62319a0338 364MB
docker-database 202412_RC.44-64043bb73_Internal 3bf18c73e7f0 321MB
docker-database latest 3bf18c73e7f0 321MB
docker-sonic-gnmi 202412_RC.44-64043bb73_Internal a1bc5db3ed57 401MB
docker-sonic-gnmi latest a1bc5db3ed57 401MB
urm.nvidia.com/sw-nbu-sws-sonic-docker/sonic-wjh 2.0.2-202412-005 d423802db8c4 430MBAttach files (if any)
No response