sonic-mgmt icon indicating copy to clipboard operation
sonic-mgmt copied to clipboard

Update platform sfp tests to skip dom check for sfp with flat memory

Open JibinBao opened this issue 1 year ago • 10 comments
trafficstars

Description of PR

  1. Sfp eeprom with option dom is not working on Xcvrs with flat memory. There is a relevant PR:https://github.com/sonic-net/sonic-utilities/pull/3385. Therefore, skip dom check for sfp with flat memory. Also, fix sonic mgmt issue: https://github.com/sonic-net/sonic-mgmt/issues/12981
  2. Skip test ports with flat memory for test_get_transceiver_bulk_status

Summary: Fixes # (issue)

Type of change

  • [x] Bug fix
  • [ ] Testbed and Framework(new/improvement)
  • [ ] Test case(new/improvement)

Back port request

  • [ ] 202012
  • [ ] 202205
  • [ ] 202305
  • [ ] 202311
  • [x] 202405

Approach

What is the motivation for this PR?

Fix issue: https://github.com/sonic-net/sonic-mgmt/issues/12981

How did you do it?

Skip dom checker for sfp with flat memory

How did you verify/test it?

run test_xcvr_info_in_db and test_check_sfp_eeprom_with_option_dom

Any platform specific information?

Any

Supported testbed topology if it's a new test case?

Documentation

JibinBao avatar Aug 20 '24 09:08 JibinBao

/azpw run Azure.sonic-mgmt

JibinBao avatar Aug 20 '24 10:08 JibinBao

/AzurePipelines run Azure.sonic-mgmt

mssonicbld avatar Aug 20 '24 10:08 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 20 '24 10:08 azure-pipelines[bot]

/azpw run Azure.sonic-mgmt

JibinBao avatar Aug 23 '24 07:08 JibinBao

/AzurePipelines run Azure.sonic-mgmt

mssonicbld avatar Aug 23 '24 07:08 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 23 '24 07:08 azure-pipelines[bot]

/azpw run Azure.sonic-mgmt

JibinBao avatar Aug 26 '24 01:08 JibinBao

/AzurePipelines run Azure.sonic-mgmt

mssonicbld avatar Aug 26 '24 01:08 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 26 '24 01:08 azure-pipelines[bot]

@mihirpat1 can you review?

prgeor avatar Sep 09 '24 16:09 prgeor

/azpw run Azure.sonic-mgmt

JibinBao avatar Sep 11 '24 01:09 JibinBao

/AzurePipelines run Azure.sonic-mgmt

mssonicbld avatar Sep 11 '24 01:09 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Sep 11 '24 01:09 azure-pipelines[bot]

/azpw run Azure.sonic-mgmt

JibinBao avatar Sep 11 '24 06:09 JibinBao

/AzurePipelines run Azure.sonic-mgmt

mssonicbld avatar Sep 11 '24 06:09 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Sep 11 '24 06:09 azure-pipelines[bot]

/azpw run Azure.sonic-mgmt

JibinBao avatar Sep 18 '24 02:09 JibinBao

/AzurePipelines run Azure.sonic-mgmt

mssonicbld avatar Sep 18 '24 02:09 mssonicbld

Pull request contains merge conflicts.

azure-pipelines[bot] avatar Sep 18 '24 02:09 azure-pipelines[bot]

@JibinBao in your PR description you mentioned design change. Can you point me to the relevant design change PR?

prgeor avatar Sep 25 '24 12:09 prgeor

@JibinBao in your PR description you mentioned design change. Can you point me to the relevant design change PR?

@prgeor , please check: https://github.com/sonic-net/sonic-utilities/pull/3385

JibinBao avatar Sep 26 '24 00:09 JibinBao

Hi @mihirpat1 , I have fixed the comments, Could you please help review it again? Thanks

JibinBao avatar Oct 15 '24 07:10 JibinBao

The pre-commit check detected issues in the files touched by this pull request. The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results: trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/platform_tests/conftest.py:12:1: E303 too many blank lines (3)

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

mssonicbld avatar Oct 15 '24 08:10 mssonicbld

@mihirpat1 Can you please review?

bingwang-ms avatar Oct 23 '24 01:10 bingwang-ms

@JibinBao PR conflicts with 202405 branch

mssonicbld avatar Oct 23 '24 17:10 mssonicbld

@JibinBao Can you file a PR to 202405 to address conflict?

bingwang-ms avatar Oct 23 '24 17:10 bingwang-ms

@JibinBao Can you file a PR to 202405 to address conflict?

hi @bingwang-ms , Please review: https://github.com/sonic-net/sonic-mgmt/pull/15141/

JibinBao avatar Oct 24 '24 06:10 JibinBao