Check DOM for only first subport for test_xcvr_info_in_db.py test.#19170
Merged
prgeor merged 4 commits intosonic-net:masterfrom Jul 11, 2025
Merged
Conversation
* Get first subport for all logical ports. * Optimize the sonic db query.
Collaborator
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where the DOM is checked only for the first subport of a logical port and optimizes the SONiC DB query for transceiver information. Key changes include:
- Updating tests to retrieve and pass the first subport mapping.
- Modifying transceiver utility functions to assert DOM sensor information for the first subport.
- Adding new helper functions in the platform interface utilities to provide physical-to-logical and first-subport mappings.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/platform_tests/test_xcvr_info_in_db.py | Updated test to use first subport mapping when calling check_transceiver_status |
| tests/common/platform/transceiver_utils.py | Adjusted DOM sensor checks to look up using first subport instead of logical port |
| tests/common/platform/interface_utils.py | Added helper functions for physical to logical port mapping and first subport lookup |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
mihirpat1
reviewed
Jul 11, 2025
mihirpat1
approved these changes
Jul 11, 2025
prgeor
approved these changes
Jul 11, 2025
mannytaheri
added a commit
to mannytaheri/sonic-mgmt
that referenced
this pull request
Aug 5, 2025
10 tasks
nissampa
pushed a commit
to nissampa/sonic-mgmt_dpu_test
that referenced
this pull request
Aug 7, 2025
…onic-net#19170) * Check DOM for only first subport for test_xcvr_info_in_db.py test. * Get first subport for all logical ports. * Optimize the sonic db query. * Update assertion error message. * Xfail the failing test_retry_count test.
rlhui
pushed a commit
that referenced
this pull request
Aug 13, 2025
A change in test_common/platform/interface_utils.py (get_physical_port_indices) is causing all testcases in platform_tests/api/test_sfp.py::TestSfpApi to error out with the message: TypeError: '<' not supported between instances of 'NoneType' and 'int'
ashutosh-agrawal
pushed a commit
to ashutosh-agrawal/sonic-mgmt
that referenced
this pull request
Aug 14, 2025
…onic-net#19170) * Check DOM for only first subport for test_xcvr_info_in_db.py test. * Get first subport for all logical ports. * Optimize the sonic db query. * Update assertion error message. * Xfail the failing test_retry_count test.
nikamirrr
pushed a commit
to nikamirrr/nmirin-sonic-mgmt
that referenced
this pull request
Aug 20, 2025
A change in test_common/platform/interface_utils.py (get_physical_port_indices) is causing all testcases in platform_tests/api/test_sfp.py::TestSfpApi to error out with the message: TypeError: '<' not supported between instances of 'NoneType' and 'int'
vidyac86
pushed a commit
to vidyac86/sonic-mgmt
that referenced
this pull request
Oct 23, 2025
…onic-net#19170) * Check DOM for only first subport for test_xcvr_info_in_db.py test. * Get first subport for all logical ports. * Optimize the sonic db query. * Update assertion error message. * Xfail the failing test_retry_count test.
vidyac86
pushed a commit
to vidyac86/sonic-mgmt
that referenced
this pull request
Oct 23, 2025
A change in test_common/platform/interface_utils.py (get_physical_port_indices) is causing all testcases in platform_tests/api/test_sfp.py::TestSfpApi to error out with the message: TypeError: '<' not supported between instances of 'NoneType' and 'int'
Collaborator
|
hi @bingwang-ms @az-pz cherrypick failure for 202503, could you do the manual cherrypick? |
Contributor
If we do cherry-pick this PR to 202503 please remember to cherry-pick the fix for the issue introduced by this PR - #20078 |
Contributor
Author
|
@StormLiangMS @arista-nwolfe , here's the PR cherry picking this PR and #20078 : |
opcoder0
pushed a commit
to opcoder0/sonic-mgmt
that referenced
this pull request
Dec 8, 2025
…onic-net#19170) * Check DOM for only first subport for test_xcvr_info_in_db.py test. * Get first subport for all logical ports. * Optimize the sonic db query. * Update assertion error message. * Xfail the failing test_retry_count test. Signed-off-by: opcoder0 <[email protected]>
opcoder0
pushed a commit
to opcoder0/sonic-mgmt
that referenced
this pull request
Dec 8, 2025
A change in test_common/platform/interface_utils.py (get_physical_port_indices) is causing all testcases in platform_tests/api/test_sfp.py::TestSfpApi to error out with the message: TypeError: '<' not supported between instances of 'NoneType' and 'int' Signed-off-by: opcoder0 <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Dec 16, 2025
…onic-net#19170) * Check DOM for only first subport for test_xcvr_info_in_db.py test. * Get first subport for all logical ports. * Optimize the sonic db query. * Update assertion error message. * Xfail the failing test_retry_count test. Signed-off-by: Guy Shemesh <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Dec 16, 2025
A change in test_common/platform/interface_utils.py (get_physical_port_indices) is causing all testcases in platform_tests/api/test_sfp.py::TestSfpApi to error out with the message: TypeError: '<' not supported between instances of 'NoneType' and 'int' Signed-off-by: Guy Shemesh <[email protected]>
AharonMalkin
pushed a commit
to AharonMalkin/sonic-mgmt
that referenced
this pull request
Dec 16, 2025
…onic-net#19170) * Check DOM for only first subport for test_xcvr_info_in_db.py test. * Get first subport for all logical ports. * Optimize the sonic db query. * Update assertion error message. * Xfail the failing test_retry_count test. Signed-off-by: Aharon Malkin <[email protected]>
AharonMalkin
pushed a commit
to AharonMalkin/sonic-mgmt
that referenced
this pull request
Dec 16, 2025
A change in test_common/platform/interface_utils.py (get_physical_port_indices) is causing all testcases in platform_tests/api/test_sfp.py::TestSfpApi to error out with the message: TypeError: '<' not supported between instances of 'NoneType' and 'int' Signed-off-by: Aharon Malkin <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Dec 21, 2025
…onic-net#19170) * Check DOM for only first subport for test_xcvr_info_in_db.py test. * Get first subport for all logical ports. * Optimize the sonic db query. * Update assertion error message. * Xfail the failing test_retry_count test. Signed-off-by: Guy Shemesh <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Dec 21, 2025
A change in test_common/platform/interface_utils.py (get_physical_port_indices) is causing all testcases in platform_tests/api/test_sfp.py::TestSfpApi to error out with the message: TypeError: '<' not supported between instances of 'NoneType' and 'int' Signed-off-by: Guy Shemesh <[email protected]>
venu-nexthop
pushed a commit
to venu-nexthop/sonic-mgmt
that referenced
this pull request
Jan 13, 2026
…onic-net#19170) * Check DOM for only first subport for test_xcvr_info_in_db.py test. * Get first subport for all logical ports. * Optimize the sonic db query. * Update assertion error message. * Xfail the failing test_retry_count test.
venu-nexthop
pushed a commit
to venu-nexthop/sonic-mgmt
that referenced
this pull request
Jan 13, 2026
A change in test_common/platform/interface_utils.py (get_physical_port_indices) is causing all testcases in platform_tests/api/test_sfp.py::TestSfpApi to error out with the message: TypeError: '<' not supported between instances of 'NoneType' and 'int'
prgeor
added a commit
to Azure/sonic-mgmt.msft
that referenced
this pull request
Jan 16, 2026
… test. (#867) Cherry pick sonic-net/sonic-mgmt#19170 and sonic-net/sonic-mgmt#20078 to 202503.
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Jan 26, 2026
…onic-net#19170) * Check DOM for only first subport for test_xcvr_info_in_db.py test. * Get first subport for all logical ports. * Optimize the sonic db query. * Update assertion error message. * Xfail the failing test_retry_count test. Signed-off-by: Guy Shemesh <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Jan 26, 2026
A change in test_common/platform/interface_utils.py (get_physical_port_indices) is causing all testcases in platform_tests/api/test_sfp.py::TestSfpApi to error out with the message: TypeError: '<' not supported between instances of 'NoneType' and 'int' Signed-off-by: Guy Shemesh <[email protected]>
ytzur1
pushed a commit
to ytzur1/sonic-mgmt
that referenced
this pull request
Feb 2, 2026
…onic-net#19170) * Check DOM for only first subport for test_xcvr_info_in_db.py test. * Get first subport for all logical ports. * Optimize the sonic db query. * Update assertion error message. * Xfail the failing test_retry_count test. Signed-off-by: Yael Tzur <[email protected]>
ytzur1
pushed a commit
to ytzur1/sonic-mgmt
that referenced
this pull request
Feb 2, 2026
A change in test_common/platform/interface_utils.py (get_physical_port_indices) is causing all testcases in platform_tests/api/test_sfp.py::TestSfpApi to error out with the message: TypeError: '<' not supported between instances of 'NoneType' and 'int' Signed-off-by: Yael Tzur <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary: Check DOM for only first subport for test_xcvr_info_in_db.py test
Fixes # (issue)
Type of change
Back port request
Approach
Add a helper function to get the first subport of logical ports to check for DOM values.
What is the motivation for this PR?
This PR (sonic-net/sonic-platform-daemons#604) changed the way the DOM data is returned for logical ports. After the change, DOM of a logical port is returned only for the first subport of the physical port.
How did you do it?
How did you verify/test it?
Ran the tests on SN5600 and SN5640 platforms.
Any platform specific information?
NA
Supported testbed topology if it's a new test case?
No change in testbed topology support.
Documentation