Skip to content

Implementation of "Impacted Area Based PR testing". #15666

Merged
wangxin merged 48 commits intosonic-net:masterfrom
yutongzhang-microsoft:yutongzhang/pr_impacted_area
Dec 31, 2024
Merged

Implementation of "Impacted Area Based PR testing". #15666
wangxin merged 48 commits intosonic-net:masterfrom
yutongzhang-microsoft:yutongzhang/pr_impacted_area

Conversation

@yutongzhang-microsoft
Copy link
Copy Markdown
Contributor

@yutongzhang-microsoft yutongzhang-microsoft commented Nov 21, 2024

Description of PR

We introduce a new model of PR testing called "Impacted Area-Based PR Testing," designed to be time-efficient, cost-efficient, and highly flexible. The HLD is detailed in #14761, and this PR represents its implementation

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

We introduce a new model of PR testing called "Impacted Area-Based PR Testing," designed to be time-efficient, cost-efficient, and highly flexible. The HLD is detailed in #14761, and this PR represents its implementation

How did you do it?

We redefine the scope of PR testing by impacted area, which means we will only run the test scripts really affected by the changes.

How did you verify/test it?

Test by pipeline.

Any platform specific information?

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

Documentation

Comment on lines +22 to +33
ingest_cluster = os.getenv("TEST_REPORT_QUERY_KUSTO_CLUSTER_BACKUP")
access_token = os.getenv('ACCESS_TOKEN', None)

if not ingest_cluster or not access_token:
raise RuntimeError(
"Could not load Kusto Credentials from environment")
else:
kcsb = KustoConnectionStringBuilder.with_aad_application_token_authentication(ingest_cluster,
access_token) # noqa F841

client = KustoClient(kcsb)

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.

If query from kusto fail, post action will be blocked, right? So, suggest to enhance it with setting default instance_num for the calculate_instance_number task.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We have set the default instance number MAX_INSTANCE_NUMBER

@yutongzhang-microsoft yutongzhang-microsoft force-pushed the yutongzhang/pr_impacted_area branch 4 times, most recently from c9d0353 to 46f8aef Compare December 11, 2024 06:01
@wangxin
Copy link
Copy Markdown
Collaborator

wangxin commented Dec 11, 2024

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).


- script: |
set -e
set -x
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why make this change?

Copy link
Copy Markdown
Contributor Author

@yutongzhang-microsoft yutongzhang-microsoft Dec 30, 2024

Choose a reason for hiding this comment

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

I change this because I want to get more information in our roll out stage. We can clearly get the parameters like scripts, min-worker, max-worker passed into the test plan from console by changing this.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin wangxin merged commit b086ae5 into sonic-net:master Dec 31, 2024
@yutongzhang-microsoft yutongzhang-microsoft deleted the yutongzhang/pr_impacted_area branch December 31, 2024 05:08
wangxin pushed a commit that referenced this pull request Jan 10, 2025
In #15666, we introduced a new approach to PR testing called Impacted Area-Based PR Testing. This model will be rolled out in phases. This PR represents step 2 of the rollout, specifically implementing the t1-lag PR checker partly.
wangxin pushed a commit that referenced this pull request Jan 20, 2025
…6565)

What is the motivation for this PR?
In #15666, we introduced a new approach to PR testing called Impacted Area-Based PR Testing. This model will be rolled out in phases. This PR implement the left PR checkers.

How did you do it?
Roll out the left PR checkers.

How did you verify/test it?
Test by pipeline itself, to see if PR checkers are running as expected.
wangxin pushed a commit that referenced this pull request Jan 22, 2025
)

What is the motivation for this PR?
In PRs #15666 and #16403, we partially rolled out the T0 and T1 PR checkers, considering resource utilization since these checkers require over 20 instances and needed to run in parallel with the legacy PR checkers. After a period of observation, we have confirmed the stability of the new system. In this PR, we complete the rollout of the remaining T0 and T1 PR checkers and officially deprecate the old PR checkers. At the same time, we have added all test scripts into PR testing, and we will gather scripts though pytest mark, so we don't need onboarding PR checkers anymore.

How did you do it?
In this PR, we complete the rollout of the remaining T0 and T1 PR checkers and officially deprecate the old PR checkers.

How did you verify/test it?
Test by pipeline itself, to see if we can successfully pass the PR checkers.
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Mar 15, 2025
What is the motivation for this PR?
We introduce a new model of PR testing called "Impacted Area-Based PR Testing," designed to be time-efficient, cost-efficient, and highly flexible. The HLD is detailed in sonic-net#14761, and this PR represents its implementation

How did you do it?
We redefine the scope of PR testing by impacted area, which means we will only run the test scripts really affected by the changes.

How did you verify/test it?
Test by pipeline.
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Mar 15, 2025
…et#16403)

In sonic-net#15666, we introduced a new approach to PR testing called Impacted Area-Based PR Testing. This model will be rolled out in phases. This PR represents step 2 of the rollout, specifically implementing the t1-lag PR checker partly.
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Mar 15, 2025
…nic-net#16565)

What is the motivation for this PR?
In sonic-net#15666, we introduced a new approach to PR testing called Impacted Area-Based PR Testing. This model will be rolled out in phases. This PR implement the left PR checkers.

How did you do it?
Roll out the left PR checkers.

How did you verify/test it?
Test by pipeline itself, to see if PR checkers are running as expected.
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Mar 15, 2025
…ic-net#16598)

What is the motivation for this PR?
In PRs sonic-net#15666 and sonic-net#16403, we partially rolled out the T0 and T1 PR checkers, considering resource utilization since these checkers require over 20 instances and needed to run in parallel with the legacy PR checkers. After a period of observation, we have confirmed the stability of the new system. In this PR, we complete the rollout of the remaining T0 and T1 PR checkers and officially deprecate the old PR checkers. At the same time, we have added all test scripts into PR testing, and we will gather scripts though pytest mark, so we don't need onboarding PR checkers anymore.

How did you do it?
In this PR, we complete the rollout of the remaining T0 and T1 PR checkers and officially deprecate the old PR checkers.

How did you verify/test it?
Test by pipeline itself, to see if we can successfully pass the PR checkers.
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.

5 participants