Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating LossyQueueVoq test for Cisco-8111 platform #9323

Merged
merged 7 commits into from
Nov 21, 2023

Conversation

jsanghra
Copy link
Contributor

@jsanghra jsanghra commented Aug 8, 2023

Description of PR

Updating LossyQueueVoq test for Cisco-8111 platform

What is the motivation for this PR?

Updating LossyQueueVoq test for Cisco-8111 platform

How did you verify/test it?

Verified the changes in local Cisco-8111 setup and the testcase passes .

@mssonicbld
Copy link
Collaborator

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.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/saitests/py3/sai_qos_tests.py

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/saitests/py3/sai_qos_tests.py:3197:13: E128 continuation line under-indented for visual indent
tests/saitests/py3/sai_qos_tests.py:3198:13: E128 continuation line under-indented for visual indent
tests/saitests/py3/sai_qos_tests.py:3200:20: F821 undefined name 'get_multiple_flows'
tests/saitests/py3/sai_qos_tests.py:3203:57: E231 missing whitespace after ','
...
[truncated extra lines, please run pre-commit locally to view full check results]

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>

@XuChen-MSFT
Copy link
Contributor

@jsanghra
can you help to resolve PR test failure?

@wsycqyz
Copy link
Contributor

wsycqyz commented Aug 10, 2023

The pre-commit check is a mandatory check, please fix detected issues.

@jsanghra
Copy link
Contributor Author

Sure will take a look .

@XuChen-MSFT
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

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.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/saitests/py3/sai_qos_tests.py

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/saitests/py3/sai_qos_tests.py:3276:13: E128 continuation line under-indented for visual indent
tests/saitests/py3/sai_qos_tests.py:3277:13: E128 continuation line under-indented for visual indent
tests/saitests/py3/sai_qos_tests.py:3279:20: F821 undefined name 'get_multiple_flows'
tests/saitests/py3/sai_qos_tests.py:3282:57: E231 missing whitespace after ','
...
[truncated extra lines, please run pre-commit locally to view full check results]

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>

@XuChen-MSFT
Copy link
Contributor

@jsanghra , still have pre-commit issue. can you fix it?

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/saitests/py3/sai_qos_tests.py:3276:13: E128 continuation line under-indented for visual indent
tests/saitests/py3/sai_qos_tests.py:3277:13: E128 continuation line under-indented for visual indent
tests/saitests/py3/sai_qos_tests.py:3279:20: F821 undefined name 'get_multiple_flows'
tests/saitests/py3/sai_qos_tests.py:3282:57: E231 missing whitespace after ','

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped
##[error]Bash exited with code '1'.
···

@jsanghra
Copy link
Contributor Author

Hi Xu ,
This PR change has some dependency with changes present only on 202205 branch .
Will Sync up with @rraghav-cisco to see how that dependencies can be resolved as the change made by me is using Raghav's changes present only in 202205 branch .

@XuChen-MSFT
Copy link
Contributor

@jsanghra pass manually test, can you help fix conflict? then we can approve and merge.

@mssonicbld
Copy link
Collaborator

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/saitests/py3/sai_qos_tests.py:3483:5: E303 too many blank lines (2)
tests/saitests/py3/sai_qos_tests.py:3496:20: F821 undefined name 'get_multiple_flows'
tests/saitests/py3/sai_qos_tests.py:3499:57: E231 missing whitespace after ','

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
Copy link
Collaborator

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/saitests/py3/sai_qos_tests.py:3495:20: F821 undefined name 'get_multiple_flows'
tests/saitests/py3/sai_qos_tests.py:3498:57: E231 missing whitespace after ','

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
Copy link
Collaborator

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/saitests/py3/sai_qos_tests.py:3495:20: F821 undefined name 'get_multiple_flows'

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>

XuChen-MSFT
XuChen-MSFT previously approved these changes Nov 20, 2023
Copy link
Contributor

@XuChen-MSFT XuChen-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, and pass in 202305 branch

@XuChen-MSFT
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

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/saitests/py3/sai_qos_tests.py:15:1: F401 'ptf.testutils.simple_udp_packet' imported but unused

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>

@XuChen-MSFT
Copy link
Contributor

@jsanghra

tests/saitests/py3/sai_qos_tests.py:15:1: F401 'ptf.testutils.simple_udp_packet' imported but unused

can you help to fix above pre-commit failur?

@mssonicbld
Copy link
Collaborator

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/saitests/py3/sai_qos_tests.py:15:1: F401 'ptf.testutils.simple_udp_packet' imported but unused

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>

@jsanghra
Copy link
Contributor Author

Hi Xu ,
Fixed the pre-commit issue .

Copy link
Contributor

@XuChen-MSFT XuChen-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@XuChen-MSFT XuChen-MSFT merged commit 3e7561f into sonic-net:master Nov 21, 2023
13 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Nov 22, 2023
* Updating LossyQueueVoq test for Cisco-8111 platform

* Fixing pre-commit error

* fixing pre-commit issue
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #10830

@XuChen-MSFT
Copy link
Contributor

XuChen-MSFT commented Nov 22, 2023

@jsanghra
can you help to resolve pre-commit error for cherry-pick #10830

flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/saitests/py3/sai_qos_tests.py:1389:15: F821 undefined name 'simple_udp_packet'
tests/saitests/py3/sai_qos_tests.py:1400:16: F821 undefined name 'simple_udp_packet'
tests/saitests/py3/sai_qos_tests.py:1412:20: F821 undefined name 'simple_udp_packet'
tests/saitests/py3/sai_qos_tests.py:1423:20: F821 undefined name 'simple_udp_packet'
tests/saitests/py3/sai_qos_tests.py:3367:20: F821 undefined name 'get_multiple_flows'

or manually create a separate PR for 202305 branch

mssonicbld pushed a commit that referenced this pull request Dec 18, 2023
* Updating LossyQueueVoq test for Cisco-8111 platform

* Fixing pre-commit error

* fixing pre-commit issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants