Skip to content

feat: add cancel_pr for testplan.py#23101

Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom
auspham:austinpham/37065882-add-cancel-pr-to-testplan
Mar 19, 2026
Merged

feat: add cancel_pr for testplan.py#23101
StormLiangMS merged 1 commit intosonic-net:masterfrom
auspham:austinpham/37065882-add-cancel-pr-to-testplan

Conversation

@auspham
Copy link
Contributor

@auspham auspham commented Mar 18, 2026

Description of PR

Summary: Adding the ability to cancel previous PR to integrate with #22861
Fixes # (issue) 37065882

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
  • 202511

Approach

What is the motivation for this PR?

Currently, when running a new testplan, there is no safety check to cancel all the previous dangling job.

This add the ability to test_plan.py to cancel all related job with PR number using cancel_pr. However this PR does not add the call, only the implementation. The real call will be implemented in #22861

How did you do it?

Added a cancel_pr method that hits Elastictest endpoint API to cancel all previous job for the same PR

How did you verify/test it?

Verified locally and manually using CI

Any platform specific information?

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

Documentation

Signed-off-by: Austin Pham <austinpham@microsoft.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@xwjiang-ms xwjiang-ms left a comment

Choose a reason for hiding this comment

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

LGTM

@StormLiangMS
Copy link
Collaborator

hi @auspham could you follow the template to add details?

@StormLiangMS StormLiangMS merged commit e7a49ba into sonic-net:master Mar 19, 2026
16 checks passed
@auspham auspham added Request for 202505 branch Request for 202511 branch Request to backport a change to 202511 branch labels Mar 19, 2026
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Mar 19, 2026
What is the motivation for this PR?
Currently, when running a new testplan, there is no safety check to cancel all the previous dangling job.

This add the ability to test_plan.py to cancel all related job with PR number using cancel_pr. However this PR does not add the call, only the implementation. The real call will be implemented in sonic-net#22861

How did you do it?
Added a cancel_pr method that hits Elastictest endpoint API to cancel all previous job for the same PR

How did you verify/test it?
Verified locally and manually using CI
Signed-off-by: Austin Pham <austinpham@microsoft.com>
Signed-off-by: mssonicbld <sonicbld@microsoft.com>
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Mar 19, 2026
What is the motivation for this PR?
Currently, when running a new testplan, there is no safety check to cancel all the previous dangling job.

This add the ability to test_plan.py to cancel all related job with PR number using cancel_pr. However this PR does not add the call, only the implementation. The real call will be implemented in sonic-net#22861

How did you do it?
Added a cancel_pr method that hits Elastictest endpoint API to cancel all previous job for the same PR

How did you verify/test it?
Verified locally and manually using CI
Signed-off-by: Austin Pham <austinpham@microsoft.com>
Signed-off-by: mssonicbld <sonicbld@microsoft.com>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202511: #23116

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202505: #23117

mssonicbld pushed a commit that referenced this pull request Mar 23, 2026
What is the motivation for this PR?
Currently, when running a new testplan, there is no safety check to cancel all the previous dangling job.

This add the ability to test_plan.py to cancel all related job with PR number using cancel_pr. However this PR does not add the call, only the implementation. The real call will be implemented in #22861

How did you do it?
Added a cancel_pr method that hits Elastictest endpoint API to cancel all previous job for the same PR

How did you verify/test it?
Verified locally and manually using CI
Signed-off-by: Austin Pham <austinpham@microsoft.com>
Signed-off-by: mssonicbld <sonicbld@microsoft.com>
vrajeshe pushed a commit to vrajeshe/sonic-mgmt that referenced this pull request Mar 23, 2026
What is the motivation for this PR?
Currently, when running a new testplan, there is no safety check to cancel all the previous dangling job.

This add the ability to test_plan.py to cancel all related job with PR number using cancel_pr. However this PR does not add the call, only the implementation. The real call will be implemented in sonic-net#22861

How did you do it?
Added a cancel_pr method that hits Elastictest endpoint API to cancel all previous job for the same PR

How did you verify/test it?
Verified locally and manually using CI
Signed-off-by: Austin Pham <austinpham@microsoft.com>
Signed-off-by: Venkata Gouri Rajesh Etla <vrajeshe@cisco.com>
mssonicbld added a commit that referenced this pull request Mar 25, 2026
What is the motivation for this PR?
Currently, when running a new testplan, there is no safety check to cancel all the previous dangling job.

This add the ability to test_plan.py to cancel all related job with PR number using cancel_pr. However this PR does not add the call, only the implementation. The real call will be implemented in #22861

How did you do it?
Added a cancel_pr method that hits Elastictest endpoint API to cancel all previous job for the same PR

How did you verify/test it?
Verified locally and manually using CI

Signed-off-by: Austin Pham <austinpham@microsoft.com>
Signed-off-by: mssonicbld <sonicbld@microsoft.com>
Co-authored-by: Austin (Thang Pham) <austinpham@microsoft.com>
ravaliyel pushed a commit to ravaliyel/sonic-mgmt that referenced this pull request Mar 27, 2026
What is the motivation for this PR?
Currently, when running a new testplan, there is no safety check to cancel all the previous dangling job.

This add the ability to test_plan.py to cancel all related job with PR number using cancel_pr. However this PR does not add the call, only the implementation. The real call will be implemented in sonic-net#22861

How did you do it?
Added a cancel_pr method that hits Elastictest endpoint API to cancel all previous job for the same PR

How did you verify/test it?
Verified locally and manually using CI
Signed-off-by: Austin Pham <austinpham@microsoft.com>
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.

4 participants