Skip to content

feat: add override feature for variables.py#18067

Merged
yejianquan merged 1 commit intosonic-net:masterfrom
auspham:austinpham/32317078-enhance-overwrite-variables
May 9, 2025
Merged

feat: add override feature for variables.py#18067
yejianquan merged 1 commit intosonic-net:masterfrom
auspham:austinpham/32317078-enhance-overwrite-variables

Conversation

@auspham
Copy link
Copy Markdown
Contributor

@auspham auspham commented Apr 22, 2025

Description of PR

Summary:
This PR adds the following features:

  1. Enable options to overwrite dynamic port selection introduced by [Snappi] - Infra change for dynamic port selection from the setup replacing variables.py file. #15069. We can force running dynamic-port selection feature by adding --enable-snappi-dynamic-ports in the CLI.

We can override by using variables.override.yml. The config is similar to our variable.py but in yaml.

  1. Add option to overwrite pfcQueueGroupSize as well and the default fallback value. So we can adjust per testbed.
  2. Fix some minimal issue from [Snappi] - Infra change for dynamic port selection from the setup replacing variables.py file. #15069
  • Create folder and subfolder if it does not exist correctly for metadata.json
  • Revert the tx_rx port in the dynamic snappi port selection
  • Refactor the use of snappi_dut_base_config needed for consistency when toggle on and off dynamic ports selection make sure everything still work

Fixes # (issue) 32317078

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

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

Documentation

without --enable-snappi-dynamic-ports
image

with --enable-snappi-dynamic-ports

image

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham force-pushed the austinpham/32317078-enhance-overwrite-variables branch from abee13e to 726c830 Compare April 22, 2025 00:54
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham force-pushed the austinpham/32317078-enhance-overwrite-variables branch from 726c830 to ae6ad43 Compare April 22, 2025 01:01
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham force-pushed the austinpham/32317078-enhance-overwrite-variables branch from ae6ad43 to 97a1eef Compare April 22, 2025 01:34
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham force-pushed the austinpham/32317078-enhance-overwrite-variables branch from 97a1eef to 69087b4 Compare April 22, 2025 02:27
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham force-pushed the austinpham/32317078-enhance-overwrite-variables branch from 69087b4 to 22d16ca Compare April 22, 2025 02:38
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham force-pushed the austinpham/32317078-enhance-overwrite-variables branch from 22d16ca to 5ebc1e8 Compare April 22, 2025 02:44
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham force-pushed the austinpham/32317078-enhance-overwrite-variables branch from 5ebc1e8 to db65efd Compare April 22, 2025 03:07
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham force-pushed the austinpham/32317078-enhance-overwrite-variables branch from db65efd to 6068f8a Compare April 24, 2025 04:27
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham force-pushed the austinpham/32317078-enhance-overwrite-variables branch from 6068f8a to 7c3970e Compare April 24, 2025 04:43
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham force-pushed the austinpham/32317078-enhance-overwrite-variables branch from 7c3970e to 2e0c162 Compare April 24, 2025 05:07
@sdszhang
Copy link
Copy Markdown
Contributor

@amitpawar12 @kamalsahu0001 for review.

@@ -0,0 +1,34 @@
vms-snappi-sonic-multidut:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@amitpawar12 to help with the README update.

@auspham auspham force-pushed the austinpham/32317078-enhance-overwrite-variables branch from 34feb1a to 520032d Compare May 1, 2025 03:37
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@auspham auspham force-pushed the austinpham/32317078-enhance-overwrite-variables branch from 520032d to be6c08b Compare May 6, 2025 04:39
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

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.

@auspham
Copy link
Copy Markdown
Contributor Author

auspham commented May 6, 2025

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sdszhang sdszhang moved this to In Progress in SONiC Snappi May 7, 2025
@sdszhang sdszhang moved this from In Progress to To be Merged in SONiC Snappi May 9, 2025
Copy link
Copy Markdown
Collaborator

@yejianquan yejianquan left a comment

Choose a reason for hiding this comment

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

LGTM

@yejianquan yejianquan merged commit 4613e88 into sonic-net:master May 9, 2025
17 checks passed
@github-project-automation github-project-automation bot moved this from To be Merged to Done in SONiC Snappi May 9, 2025
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
Description of PR
Summary:
This PR adds the following features:

Enable options to overwrite dynamic port selection introduced by [Snappi] - Infra change for dynamic port selection from the setup replacing variables.py file. sonic-net#15069. We can force running dynamic-port selection feature by adding --enable-snappi-dynamic-ports in the CLI.
We can override by using variables.override.yml. The config is similar to our variable.py but in yaml.

Add option to overwrite pfcQueueGroupSize as well and the default fallback value. So we can adjust per testbed.
Fix some minimal issue from [Snappi] - Infra change for dynamic port selection from the setup replacing variables.py file. sonic-net#15069
Create folder and subfolder if it does not exist correctly for metadata.json
Revert the tx_rx port in the dynamic snappi port selection
Refactor the use of snappi_dut_base_config needed for consistency when toggle on and off dynamic ports selection make sure everything still work
Fixes # (issue) 32317078

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202012
 202205
 202305
 202311
 202405
 202411
Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
without --enable-snappi-dynamic-ports
image

with --enable-snappi-dynamic-ports

image

Signed-off-by: Austin Pham <[email protected]>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
Description of PR
Summary:
This PR adds the following features:

Enable options to overwrite dynamic port selection introduced by [Snappi] - Infra change for dynamic port selection from the setup replacing variables.py file. sonic-net#15069. We can force running dynamic-port selection feature by adding --enable-snappi-dynamic-ports in the CLI.
We can override by using variables.override.yml. The config is similar to our variable.py but in yaml.

Add option to overwrite pfcQueueGroupSize as well and the default fallback value. So we can adjust per testbed.
Fix some minimal issue from [Snappi] - Infra change for dynamic port selection from the setup replacing variables.py file. sonic-net#15069
Create folder and subfolder if it does not exist correctly for metadata.json
Revert the tx_rx port in the dynamic snappi port selection
Refactor the use of snappi_dut_base_config needed for consistency when toggle on and off dynamic ports selection make sure everything still work
Fixes # (issue) 32317078

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202012
 202205
 202305
 202311
 202405
 202411
Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
without --enable-snappi-dynamic-ports
image

with --enable-snappi-dynamic-ports

image

Signed-off-by: Austin Pham <[email protected]>
Signed-off-by: Aharon Malkin <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
Description of PR
Summary:
This PR adds the following features:

Enable options to overwrite dynamic port selection introduced by [Snappi] - Infra change for dynamic port selection from the setup replacing variables.py file. sonic-net#15069. We can force running dynamic-port selection feature by adding --enable-snappi-dynamic-ports in the CLI.
We can override by using variables.override.yml. The config is similar to our variable.py but in yaml.

Add option to overwrite pfcQueueGroupSize as well and the default fallback value. So we can adjust per testbed.
Fix some minimal issue from [Snappi] - Infra change for dynamic port selection from the setup replacing variables.py file. sonic-net#15069
Create folder and subfolder if it does not exist correctly for metadata.json
Revert the tx_rx port in the dynamic snappi port selection
Refactor the use of snappi_dut_base_config needed for consistency when toggle on and off dynamic ports selection make sure everything still work
Fixes # (issue) 32317078

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202012
 202205
 202305
 202311
 202405
 202411
Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
without --enable-snappi-dynamic-ports
image

with --enable-snappi-dynamic-ports

image

Signed-off-by: Austin Pham <[email protected]>
Signed-off-by: Guy Shemesh <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
Description of PR
Summary:
This PR adds the following features:

Enable options to overwrite dynamic port selection introduced by [Snappi] - Infra change for dynamic port selection from the setup replacing variables.py file. sonic-net#15069. We can force running dynamic-port selection feature by adding --enable-snappi-dynamic-ports in the CLI.
We can override by using variables.override.yml. The config is similar to our variable.py but in yaml.

Add option to overwrite pfcQueueGroupSize as well and the default fallback value. So we can adjust per testbed.
Fix some minimal issue from [Snappi] - Infra change for dynamic port selection from the setup replacing variables.py file. sonic-net#15069
Create folder and subfolder if it does not exist correctly for metadata.json
Revert the tx_rx port in the dynamic snappi port selection
Refactor the use of snappi_dut_base_config needed for consistency when toggle on and off dynamic ports selection make sure everything still work
Fixes # (issue) 32317078

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202012
 202205
 202305
 202311
 202405
 202411
Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
without --enable-snappi-dynamic-ports
image

with --enable-snappi-dynamic-ports

image

Signed-off-by: Austin Pham <[email protected]>
Signed-off-by: Guy Shemesh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants