Skip to content

Revert dynamic GLOBAL_PARAMS for reliable template passing#25461

Merged
yxieca merged 2 commits intosonic-net:masterfrom
xwjiang-ms:revert_global_params
Feb 26, 2026
Merged

Revert dynamic GLOBAL_PARAMS for reliable template passing#25461
yxieca merged 2 commits intosonic-net:masterfrom
xwjiang-ms:revert_global_params

Conversation

@xwjiang-ms
Copy link
Copy Markdown
Contributor

@xwjiang-ms xwjiang-ms commented Feb 12, 2026

Why I did it

PR sonic-net/sonic-mgmt#21636 imported GLOBAL_PARAMS to refactor pr_test_template.yml, caused downstream templates run-test-elastictest-template.yml to fail to receive the parameters correctly.
While the top-level YAML could pass GLOBAL_PARAMS successfully to the first-level template, nested dynamic expansion inside the template does not reliably propagate key/value pairs, especially when variables or non-static values are involved.
PR sonic-net/sonic-mgmt#22369 reverted the change of GLOBAL_PARAMS.
This PR aims to make parameter passing stable and predictable by replacing the dynamic each expansion with explicit parameter definitions.
image

Work item tracking
  • Microsoft ADO (number only):

How I did it

Revert dynamic GLOBAL_PARAMS expansion to explicit parameters for reliable template passing.

How to verify it

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@xwjiang-ms xwjiang-ms requested a review from lguohan as a code owner February 12, 2026 04:22
Copilot AI review requested due to automatic review settings February 12, 2026 04:22
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines failed to run 1 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates SONiC buildimage Azure Pipelines definitions to stop using the nested GLOBAL_PARAMS mapping when invoking sonic-mgmt’s pr_test_template.yml, and instead pass those values as explicit top-level template parameters to make nested template propagation reliable.

Changes:

  • Replace GLOBAL_PARAMS usage with explicit parameters in the main PR pipeline (azure-pipelines.yml).
  • Replace GLOBAL_PARAMS usage with explicit parameters across all baseline test rounds (.azure-pipelines/baseline_test/baseline.test.buildimage.yml).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
azure-pipelines.yml Passes PTF_MODIFIED directly to pr_test_template.yml@sonic-mgmt instead of via GLOBAL_PARAMS.
.azure-pipelines/baseline_test/baseline.test.buildimage.yml Passes BUILD_REASON, RETRY_TIMES, STOP_ON_FAILURE, TEST_PLAN_NUM directly to the referenced sonic-mgmt PR test template for each test stage.

@StormLiangMS
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines failed to run 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines failed to run 1 pipeline(s).

@StormLiangMS
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@yxieca yxieca merged commit a5d5faf into sonic-net:master Feb 26, 2026
27 checks passed
Pterosaur pushed a commit to Pterosaur/sonic-buildimage that referenced this pull request Feb 27, 2026
…#25461)

What is the motivation for this PR
PR sonic-mgmt#21636 imported GLOBAL_PARAMS to refactor pr_test_template.yml, which caused downstream templates to fail to receive parameters reliably. This aims to make parameter passing stable and predictable by replacing dynamic expansion with explicit parameters.

How did you do it
Reverted dynamic GLOBAL_PARAMS expansion to explicit parameters for reliable template passing.

How did you verify/test it
Not provided in PR description.

Signed-off-by: xiaweijiang <[email protected]>
Signed-off-by: Ze Gan <[email protected]>
@xwjiang-ms xwjiang-ms deleted the revert_global_params branch March 2, 2026 04:37
FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Mar 6, 2026
…#25461)

What is the motivation for this PR
PR sonic-mgmt#21636 imported GLOBAL_PARAMS to refactor pr_test_template.yml, which caused downstream templates to fail to receive parameters reliably. This aims to make parameter passing stable and predictable by replacing dynamic expansion with explicit parameters.

How did you do it
Reverted dynamic GLOBAL_PARAMS expansion to explicit parameters for reliable template passing.

How did you verify/test it
Not provided in PR description.

Signed-off-by: xiaweijiang <[email protected]>
Signed-off-by: Feng Pan <[email protected]>
dprital pushed a commit that referenced this pull request Mar 19, 2026
What is the motivation for this PR
PR sonic-mgmt#21636 imported GLOBAL_PARAMS to refactor pr_test_template.yml, which caused downstream templates to fail to receive parameters reliably. This aims to make parameter passing stable and predictable by replacing dynamic expansion with explicit parameters.

How did you do it
Reverted dynamic GLOBAL_PARAMS expansion to explicit parameters for reliable template passing.

How did you verify/test it
Not provided in PR description.

Signed-off-by: xiaweijiang <[email protected]>
Signed-off-by: dprital <[email protected]>
LuminaScript pushed a commit to LuminaScript/sonic-buildimage that referenced this pull request Apr 7, 2026
…#25461)

What is the motivation for this PR
PR sonic-mgmt#21636 imported GLOBAL_PARAMS to refactor pr_test_template.yml, which caused downstream templates to fail to receive parameters reliably. This aims to make parameter passing stable and predictable by replacing dynamic expansion with explicit parameters.

How did you do it
Reverted dynamic GLOBAL_PARAMS expansion to explicit parameters for reliable template passing.

How did you verify/test it
Not provided in PR description.

Signed-off-by: xiaweijiang <[email protected]>
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.

8 participants