[code sync] Merge code from sonic-net/sonic-utilities:202511 to 202603#324
Merged
mssonicbld merged 3 commits intoAzure:202603from May 7, 2026
Merged
[code sync] Merge code from sonic-net/sonic-utilities:202511 to 202603#324mssonicbld merged 3 commits intoAzure:202603from
mssonicbld merged 3 commits intoAzure:202603from
Conversation
Collaborator
mssonicbld
commented
May 7, 2026
…prom' (#4524) <!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md CODE_OF_CONDUCT.md LICENSE README.md SECURITY.md SUPPORT.md azure-pipelines failure_prs.log scripts skip_prs.log Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "closes #xxxx", "fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related issue when the PR is merged. If you are adding/modifying/removing any command or utility script, please also make sure to add/modify/remove any unit tests from the tests directory as appropriate. If you are modifying or removing an existing 'show', 'config' or 'sonic-clear' subcommand, or you are adding a new subcommand, please make sure you also update the Command Line Reference Guide (doc/Command-Reference.md) to reflect your changes. Please provide the following information: --> #### What I did Handle the scenario when there is missing/non-available info in EEPROM #### How I did it Add a check in CLI #### How to verify it run 'sfputil show eeprom' #### Previous command output (if the output of a command-line utility has changed) ``` File "/usr/local/bin/sfputil", line 8, in <module> sys.exit(cli()) ^^^^^ File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) ``` #### New command output (if the output of a command-line utility has changed) `EEPROM info: N/A` Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
* Showtech collection for gearbox 1) Updated gearboxutil to show gearbox fec stats and histogram 2) Added gearbox stats in the generate_dump * tests: Add coverage for gearboxutil FEC stats and histogram Add unit tests for the new InterfaceFecStats class and format_ber() helper introduced in the gearboxutil script. Includes a mock GB_COUNTERS_DB fixture with Ethernet0 line/system port data. Tests cover: - format_ber(): normal values, zero, N/A, -1, non-numeric passthrough - InterfaceFecStats: fec-stats headers, port display, BER formatting, port filtering, invalid port error handling, fec-histogram bins (BIN0-BIN15), histogram port filtering and error handling * tests: Fix gearboxutil import and flake8 blank line violation Use SourceFileLoader explicitly to load extensionless script as spec_from_file_location returns None without a .py extension. Remove extra blank line to fix E303 flake8 violation. * tests: Fix E402 flake8 violation by moving import to top of file * gearboxutil: Use string literal for GB_COUNTERS_DB connection SonicV2Connector.GB_COUNTERS_DB attribute is not available in all environments. Use the string literal directly, consistent with how get_all() calls already reference the DB name. * Update the tests with GB_COUNTERS_DB connector * Added show gearbox CLI to support fec-stats and histogram, updated the command refernce guide Updated to read oper state from the system_oper_status and line_oper_status * Fix the precommit check, E302 and E741 errors * Tests for show gearbox command --------- (cherry picked from commit f62b8ecdf240ad3b0540d29b1cf4d7fcf9948625) Signed-off-by: arpit-nexthop <arpit@nexthop.ai>
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.