Skip to content

Refactor DPU check in device_utils and test_watchdog#19574

Merged
roy-sror merged 3 commits intosonic-net:masterfrom
xixuej:is_dpu_method_update
Jul 29, 2025
Merged

Refactor DPU check in device_utils and test_watchdog#19574
roy-sror merged 3 commits intosonic-net:masterfrom
xixuej:is_dpu_method_update

Conversation

@xixuej
Copy link
Copy Markdown
Contributor

@xixuej xixuej commented Jul 14, 2025

This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (#19313)

The way to check if is dpu should use duthost.dut_basic_facts()['ansible_facts']['dut_basic_facts'].get("is_dpu") instead of duthost.get_facts().get('is_dpu') becasue PR #19313 added the facts into dut_basic_facts

Description of PR

Summary:
Fixes #19573

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?

To fix bugs that cause test failure

How did you do it?

update tests that calls method that does not exist

How did you verify/test it?

run test before and after the PR to verify it works as expected

Any platform specific information?

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

Documentation

@xixuej xixuej requested a review from prgeor as a code owner July 14, 2025 04:38
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@xixuej
Copy link
Copy Markdown
Contributor Author

xixuej commented Jul 17, 2025

Hi @prgeor, can you please review the PR when you're available? Thanks

xixuej and others added 3 commits July 28, 2025 18:55
This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (sonic-net#19313)
@xixuej xixuej force-pushed the is_dpu_method_update branch from c344ffe to 212318d Compare July 28, 2025 11:04
@xixuej xixuej requested a review from yxieca as a code owner July 28, 2025 11:04
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@xixuej
Copy link
Copy Markdown
Contributor Author

xixuej commented Jul 28, 2025

Hi @vvolam , can you please review this PR? Thanks

@xixuej
Copy link
Copy Markdown
Contributor Author

xixuej commented Jul 29, 2025

Hi @roy-sror , can you please review and merge?

@roy-sror roy-sror merged commit 365744d into sonic-net:master Jul 29, 2025
19 checks passed
@mssonicbld
Copy link
Copy Markdown
Collaborator

@xixuej PR conflicts with 202505 branch

@yejianquan
Copy link
Copy Markdown
Collaborator

Hi @xixuej , please fix the conflict and raise PR to 202505 branch

@xixuej
Copy link
Copy Markdown
Contributor Author

xixuej commented Jul 30, 2025

Hi @yejianquan , I've resolved the merge conflicts for branch 202505 in the new PR #19912

yejianquan pushed a commit that referenced this pull request Jul 30, 2025
cherry-pick #19574
Description of PR
Summary:
This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (#19313)

The way to check if is dpu should use duthost.dut_basic_facts()['ansible_facts']['dut_basic_facts'].get("is_dpu") instead of duthost.get_facts().get('is_dpu') becasue PR #19313 added the facts into dut_basic_facts

Resolve merge conflicts for branch 202505
Co-authored-by: Cong Hou <[email protected]>
nissampa pushed a commit to nissampa/sonic-mgmt_dpu_test that referenced this pull request Aug 7, 2025
* Refactor DPU check in device_utils and test_watchdog

This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (sonic-net#19313)

* Fix the condition for dpu in techsupport test

* Fix skip dpu logic in techsupport test

---------

Co-authored-by: Cong Hou <[email protected]>
ashutosh-agrawal pushed a commit to ashutosh-agrawal/sonic-mgmt that referenced this pull request Aug 14, 2025
* Refactor DPU check in device_utils and test_watchdog

This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (sonic-net#19313)

* Fix the condition for dpu in techsupport test

* Fix skip dpu logic in techsupport test

---------

Co-authored-by: Cong Hou <[email protected]>
vidyac86 pushed a commit to vidyac86/sonic-mgmt that referenced this pull request Oct 23, 2025
* Refactor DPU check in device_utils and test_watchdog

This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (sonic-net#19313)

* Fix the condition for dpu in techsupport test

* Fix skip dpu logic in techsupport test

---------

Co-authored-by: Cong Hou <[email protected]>
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
* Refactor DPU check in device_utils and test_watchdog

This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (sonic-net#19313)

* Fix the condition for dpu in techsupport test

* Fix skip dpu logic in techsupport test

---------

Co-authored-by: Cong Hou <[email protected]>

Signed-off-by: opcoder0 <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 16, 2025
* Refactor DPU check in device_utils and test_watchdog

This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (sonic-net#19313)

* Fix the condition for dpu in techsupport test

* Fix skip dpu logic in techsupport test

---------

Co-authored-by: Cong Hou <[email protected]>
Signed-off-by: Guy Shemesh <[email protected]>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
* Refactor DPU check in device_utils and test_watchdog

This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (sonic-net#19313)

* Fix the condition for dpu in techsupport test

* Fix skip dpu logic in techsupport test

---------

Co-authored-by: Cong Hou <[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
* Refactor DPU check in device_utils and test_watchdog

This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (sonic-net#19313)

* Fix the condition for dpu in techsupport test

* Fix skip dpu logic in techsupport test

---------

Co-authored-by: Cong Hou <[email protected]>
Signed-off-by: Guy Shemesh <[email protected]>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
* Refactor DPU check in device_utils and test_watchdog

This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (sonic-net#19313)

* Fix the condition for dpu in techsupport test

* Fix skip dpu logic in techsupport test

---------

Co-authored-by: Cong Hou <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
* Refactor DPU check in device_utils and test_watchdog

This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (sonic-net#19313)

* Fix the condition for dpu in techsupport test

* Fix skip dpu logic in techsupport test

---------

Co-authored-by: Cong Hou <[email protected]>
Signed-off-by: Guy Shemesh <[email protected]>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
* Refactor DPU check in device_utils and test_watchdog

This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (sonic-net#19313)

* Fix the condition for dpu in techsupport test

* Fix skip dpu logic in techsupport test

---------

Co-authored-by: Cong Hou <[email protected]>
Signed-off-by: Yael Tzur <[email protected]>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Mar 27, 2026
* Refactor DPU check in device_utils and test_watchdog

This changes is because is_dpu method was removed
by below PR
[smartswitch]: Add is_smartswitch and is_dpu facts to simplify platform-specific test handling (sonic-net#19313)

* Fix the condition for dpu in techsupport test

* Fix skip dpu logic in techsupport test

---------

Co-authored-by: Cong Hou <[email protected]>
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.

Bug: is_dpu method was removed from SonicHost and corresponding call of is_dpu requires update

8 participants