Skip to content

Refine PR test template to reduce code maintenance costs#20002

Merged
StormLiangMS merged 12 commits intosonic-net:masterfrom
xwjiang-ms:refine_pr_test_template
Aug 5, 2025
Merged

Refine PR test template to reduce code maintenance costs#20002
StormLiangMS merged 12 commits intosonic-net:masterfrom
xwjiang-ms:refine_pr_test_template

Conversation

@xwjiang-ms
Copy link
Contributor

@xwjiang-ms xwjiang-ms commented Aug 1, 2025

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

What is the motivation for this PR?

Currently PR KVM test jobs are all put in azure-pipelines.yml, but in other usage scenarios, baseline test and buildimage PR test, PR KVM tests are required. If we can put KVM test jobs into a template yaml, will reduce lots of code maintenance costs and make it easier to imported by other repos.

How did you do it?

Create PR KVM test template yaml with jobs in matrix to reduce duplicate logs.

How did you verify/test it?

Compared test plan contents in this PR with other PRs, contents are the same.

Any platform specific information?

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

Documentation

@xwjiang-ms xwjiang-ms requested a review from wangxin as a code owner August 1, 2025 07:36
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@xwjiang-ms
Copy link
Contributor Author

/azpw run

@xwjiang-ms xwjiang-ms closed this Aug 1, 2025
@xwjiang-ms xwjiang-ms reopened this Aug 1, 2025
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

vidyac86 pushed a commit to vidyac86/sonic-mgmt that referenced this pull request Oct 23, 2025
What is the motivation for this PR?
PR sonic-net#20002 refined PR test template, but forgot to pass build branch param to get impact area yaml, which led to impact area not working

How did you do it?
Pass build branch to impact area yaml

How did you verify/test it?
Before:

DIFF_FOLDERS=
After:
DIFF_FOLDERS='.azure-pipelines '
vidyac86 pushed a commit to vidyac86/sonic-mgmt that referenced this pull request Oct 23, 2025
What is the motivation for this PR?
In PR sonic-net#20002, I refined PR test template with strategy matrix jobs to reduce duplicate code, but it imported 2 issues:
* Impact area would use condition: contains(dependencies.get_impacted_area.outputs['SetVariableTask.PR_CHECKERS'], variables['CHECKER']) to decide if we need to skip the topology, but variables['CHECKER'] would be get in such early step, it would pass empty string, so it would always success, then caused following calculate instance number failure.
* continueOnError became a global configuration, so for optional jobs, if pipeline fail with stuck/timeout/cancel, the whole sonic-mgmt test will show as failure, then we can only force merge.

How did you do it?
Roll back PR test template to hardcode version.
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
…0002)

What is the motivation for this PR?
Currently PR KVM test jobs are all put in azure-pipelines.yml, but in other usage scenarios, baseline test and buildimage PR test, PR KVM tests are required. If we can put KVM test jobs into a template yaml, will reduce lots of code maintenance costs and make it easier to imported by other repos.

How did you do it?
Create PR KVM test template yaml with jobs in matrix to reduce duplicate logs.

How did you verify/test it?
Compared test plan contents in this PR with other PRs, contents are the same.

Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
What is the motivation for this PR?
PR sonic-net#20002 has refined PR test template yaml, so we can reuse the template for KVM tests in baseline test

How did you do it?
Refine baseline test yaml to use newly added pr_test_template.yml to reduce duplicate code
Add default asic_type in case the newly added param from sonic-net#18297 have incorrect value

Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
What is the motivation for this PR?
PR sonic-net#20002 refined PR test template, but forgot to pass build branch param to get impact area yaml, which led to impact area not working

How did you do it?
Pass build branch to impact area yaml

How did you verify/test it?
Before:

DIFF_FOLDERS=
After:
DIFF_FOLDERS='.azure-pipelines '

Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
What is the motivation for this PR?
In PR sonic-net#20002, I refined PR test template with strategy matrix jobs to reduce duplicate code, but it imported 2 issues:
* Impact area would use condition: contains(dependencies.get_impacted_area.outputs['SetVariableTask.PR_CHECKERS'], variables['CHECKER']) to decide if we need to skip the topology, but variables['CHECKER'] would be get in such early step, it would pass empty string, so it would always success, then caused following calculate instance number failure.
* continueOnError became a global configuration, so for optional jobs, if pipeline fail with stuck/timeout/cancel, the whole sonic-mgmt test will show as failure, then we can only force merge.

How did you do it?
Roll back PR test template to hardcode version.

Signed-off-by: opcoder0 <110003254+opcoder0@users.noreply.github.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 16, 2025
…0002)

What is the motivation for this PR?
Currently PR KVM test jobs are all put in azure-pipelines.yml, but in other usage scenarios, baseline test and buildimage PR test, PR KVM tests are required. If we can put KVM test jobs into a template yaml, will reduce lots of code maintenance costs and make it easier to imported by other repos.

How did you do it?
Create PR KVM test template yaml with jobs in matrix to reduce duplicate logs.

How did you verify/test it?
Compared test plan contents in this PR with other PRs, contents are the same.

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 16, 2025
What is the motivation for this PR?
PR sonic-net#20002 has refined PR test template yaml, so we can reuse the template for KVM tests in baseline test

How did you do it?
Refine baseline test yaml to use newly added pr_test_template.yml to reduce duplicate code
Add default asic_type in case the newly added param from sonic-net#18297 have incorrect value

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 16, 2025
What is the motivation for this PR?
PR sonic-net#20002 refined PR test template, but forgot to pass build branch param to get impact area yaml, which led to impact area not working

How did you do it?
Pass build branch to impact area yaml

How did you verify/test it?
Before:

DIFF_FOLDERS=
After:
DIFF_FOLDERS='.azure-pipelines '

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 16, 2025
What is the motivation for this PR?
In PR sonic-net#20002, I refined PR test template with strategy matrix jobs to reduce duplicate code, but it imported 2 issues:
* Impact area would use condition: contains(dependencies.get_impacted_area.outputs['SetVariableTask.PR_CHECKERS'], variables['CHECKER']) to decide if we need to skip the topology, but variables['CHECKER'] would be get in such early step, it would pass empty string, so it would always success, then caused following calculate instance number failure.
* continueOnError became a global configuration, so for optional jobs, if pipeline fail with stuck/timeout/cancel, the whole sonic-mgmt test will show as failure, then we can only force merge.

How did you do it?
Roll back PR test template to hardcode version.

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
…0002)

What is the motivation for this PR?
Currently PR KVM test jobs are all put in azure-pipelines.yml, but in other usage scenarios, baseline test and buildimage PR test, PR KVM tests are required. If we can put KVM test jobs into a template yaml, will reduce lots of code maintenance costs and make it easier to imported by other repos.

How did you do it?
Create PR KVM test template yaml with jobs in matrix to reduce duplicate logs.

How did you verify/test it?
Compared test plan contents in this PR with other PRs, contents are the same.

Signed-off-by: Aharon Malkin <amalkin@nvidia.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
What is the motivation for this PR?
PR sonic-net#20002 has refined PR test template yaml, so we can reuse the template for KVM tests in baseline test

How did you do it?
Refine baseline test yaml to use newly added pr_test_template.yml to reduce duplicate code
Add default asic_type in case the newly added param from sonic-net#18297 have incorrect value

Signed-off-by: Aharon Malkin <amalkin@nvidia.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
What is the motivation for this PR?
PR sonic-net#20002 refined PR test template, but forgot to pass build branch param to get impact area yaml, which led to impact area not working

How did you do it?
Pass build branch to impact area yaml

How did you verify/test it?
Before:

DIFF_FOLDERS=
After:
DIFF_FOLDERS='.azure-pipelines '

Signed-off-by: Aharon Malkin <amalkin@nvidia.com>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
What is the motivation for this PR?
In PR sonic-net#20002, I refined PR test template with strategy matrix jobs to reduce duplicate code, but it imported 2 issues:
* Impact area would use condition: contains(dependencies.get_impacted_area.outputs['SetVariableTask.PR_CHECKERS'], variables['CHECKER']) to decide if we need to skip the topology, but variables['CHECKER'] would be get in such early step, it would pass empty string, so it would always success, then caused following calculate instance number failure.
* continueOnError became a global configuration, so for optional jobs, if pipeline fail with stuck/timeout/cancel, the whole sonic-mgmt test will show as failure, then we can only force merge.

How did you do it?
Roll back PR test template to hardcode version.

Signed-off-by: Aharon Malkin <amalkin@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
…0002)

What is the motivation for this PR?
Currently PR KVM test jobs are all put in azure-pipelines.yml, but in other usage scenarios, baseline test and buildimage PR test, PR KVM tests are required. If we can put KVM test jobs into a template yaml, will reduce lots of code maintenance costs and make it easier to imported by other repos.

How did you do it?
Create PR KVM test template yaml with jobs in matrix to reduce duplicate logs.

How did you verify/test it?
Compared test plan contents in this PR with other PRs, contents are the same.

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
What is the motivation for this PR?
PR sonic-net#20002 has refined PR test template yaml, so we can reuse the template for KVM tests in baseline test

How did you do it?
Refine baseline test yaml to use newly added pr_test_template.yml to reduce duplicate code
Add default asic_type in case the newly added param from sonic-net#18297 have incorrect value

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
What is the motivation for this PR?
PR sonic-net#20002 refined PR test template, but forgot to pass build branch param to get impact area yaml, which led to impact area not working

How did you do it?
Pass build branch to impact area yaml

How did you verify/test it?
Before:

DIFF_FOLDERS=
After:
DIFF_FOLDERS='.azure-pipelines '

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
What is the motivation for this PR?
In PR sonic-net#20002, I refined PR test template with strategy matrix jobs to reduce duplicate code, but it imported 2 issues:
* Impact area would use condition: contains(dependencies.get_impacted_area.outputs['SetVariableTask.PR_CHECKERS'], variables['CHECKER']) to decide if we need to skip the topology, but variables['CHECKER'] would be get in such early step, it would pass empty string, so it would always success, then caused following calculate instance number failure.
* continueOnError became a global configuration, so for optional jobs, if pipeline fail with stuck/timeout/cancel, the whole sonic-mgmt test will show as failure, then we can only force merge.

How did you do it?
Roll back PR test template to hardcode version.

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
…0002)

What is the motivation for this PR?
Currently PR KVM test jobs are all put in azure-pipelines.yml, but in other usage scenarios, baseline test and buildimage PR test, PR KVM tests are required. If we can put KVM test jobs into a template yaml, will reduce lots of code maintenance costs and make it easier to imported by other repos.

How did you do it?
Create PR KVM test template yaml with jobs in matrix to reduce duplicate logs.

How did you verify/test it?
Compared test plan contents in this PR with other PRs, contents are the same.
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
What is the motivation for this PR?
PR sonic-net#20002 has refined PR test template yaml, so we can reuse the template for KVM tests in baseline test

How did you do it?
Refine baseline test yaml to use newly added pr_test_template.yml to reduce duplicate code
Add default asic_type in case the newly added param from sonic-net#18297 have incorrect value
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
What is the motivation for this PR?
PR sonic-net#20002 refined PR test template, but forgot to pass build branch param to get impact area yaml, which led to impact area not working

How did you do it?
Pass build branch to impact area yaml

How did you verify/test it?
Before:

DIFF_FOLDERS=
After:
DIFF_FOLDERS='.azure-pipelines '
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
What is the motivation for this PR?
In PR sonic-net#20002, I refined PR test template with strategy matrix jobs to reduce duplicate code, but it imported 2 issues:
* Impact area would use condition: contains(dependencies.get_impacted_area.outputs['SetVariableTask.PR_CHECKERS'], variables['CHECKER']) to decide if we need to skip the topology, but variables['CHECKER'] would be get in such early step, it would pass empty string, so it would always success, then caused following calculate instance number failure.
* continueOnError became a global configuration, so for optional jobs, if pipeline fail with stuck/timeout/cancel, the whole sonic-mgmt test will show as failure, then we can only force merge.

How did you do it?
Roll back PR test template to hardcode version.
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
…0002)

What is the motivation for this PR?
Currently PR KVM test jobs are all put in azure-pipelines.yml, but in other usage scenarios, baseline test and buildimage PR test, PR KVM tests are required. If we can put KVM test jobs into a template yaml, will reduce lots of code maintenance costs and make it easier to imported by other repos.

How did you do it?
Create PR KVM test template yaml with jobs in matrix to reduce duplicate logs.

How did you verify/test it?
Compared test plan contents in this PR with other PRs, contents are the same.

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
What is the motivation for this PR?
PR sonic-net#20002 has refined PR test template yaml, so we can reuse the template for KVM tests in baseline test

How did you do it?
Refine baseline test yaml to use newly added pr_test_template.yml to reduce duplicate code
Add default asic_type in case the newly added param from sonic-net#18297 have incorrect value

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
What is the motivation for this PR?
PR sonic-net#20002 refined PR test template, but forgot to pass build branch param to get impact area yaml, which led to impact area not working

How did you do it?
Pass build branch to impact area yaml

How did you verify/test it?
Before:

DIFF_FOLDERS=
After:
DIFF_FOLDERS='.azure-pipelines '

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
What is the motivation for this PR?
In PR sonic-net#20002, I refined PR test template with strategy matrix jobs to reduce duplicate code, but it imported 2 issues:
* Impact area would use condition: contains(dependencies.get_impacted_area.outputs['SetVariableTask.PR_CHECKERS'], variables['CHECKER']) to decide if we need to skip the topology, but variables['CHECKER'] would be get in such early step, it would pass empty string, so it would always success, then caused following calculate instance number failure.
* continueOnError became a global configuration, so for optional jobs, if pipeline fail with stuck/timeout/cancel, the whole sonic-mgmt test will show as failure, then we can only force merge.

How did you do it?
Roll back PR test template to hardcode version.

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
…0002)

What is the motivation for this PR?
Currently PR KVM test jobs are all put in azure-pipelines.yml, but in other usage scenarios, baseline test and buildimage PR test, PR KVM tests are required. If we can put KVM test jobs into a template yaml, will reduce lots of code maintenance costs and make it easier to imported by other repos.

How did you do it?
Create PR KVM test template yaml with jobs in matrix to reduce duplicate logs.

How did you verify/test it?
Compared test plan contents in this PR with other PRs, contents are the same.

Signed-off-by: Yael Tzur <ytzur@nvidia.com>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
What is the motivation for this PR?
PR sonic-net#20002 has refined PR test template yaml, so we can reuse the template for KVM tests in baseline test

How did you do it?
Refine baseline test yaml to use newly added pr_test_template.yml to reduce duplicate code
Add default asic_type in case the newly added param from sonic-net#18297 have incorrect value

Signed-off-by: Yael Tzur <ytzur@nvidia.com>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
What is the motivation for this PR?
PR sonic-net#20002 refined PR test template, but forgot to pass build branch param to get impact area yaml, which led to impact area not working

How did you do it?
Pass build branch to impact area yaml

How did you verify/test it?
Before:

DIFF_FOLDERS=
After:
DIFF_FOLDERS='.azure-pipelines '

Signed-off-by: Yael Tzur <ytzur@nvidia.com>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
What is the motivation for this PR?
In PR sonic-net#20002, I refined PR test template with strategy matrix jobs to reduce duplicate code, but it imported 2 issues:
* Impact area would use condition: contains(dependencies.get_impacted_area.outputs['SetVariableTask.PR_CHECKERS'], variables['CHECKER']) to decide if we need to skip the topology, but variables['CHECKER'] would be get in such early step, it would pass empty string, so it would always success, then caused following calculate instance number failure.
* continueOnError became a global configuration, so for optional jobs, if pipeline fail with stuck/timeout/cancel, the whole sonic-mgmt test will show as failure, then we can only force merge.

How did you do it?
Roll back PR test template to hardcode version.

Signed-off-by: Yael Tzur <ytzur@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants