Apply GCU changes to the appropriate namespace scope for each suite#16065
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Hello @judyjoseph @xincunli-sonic Could you please also review the changes? I have updated the suite calls to use the function However, upon reviewing the overall usage of the function from the test suits, it always ends up returning without applying any changes. My question is: It appears that no test suite is currently capable of applying patch changes to both localhost and all ASIC namespaces based on the function's format. |
| - For changes that are host-specific (applied only to the localhost namespace and not | ||
| to ASIC namespaces), the function returns without any formatting. | ||
| """ | ||
| if is_asic_specific or is_host_specific: |
There was a problem hiding this comment.
Based on similar logic as the flag is_host_specific, which makes zero changes to the patch, I have added a new flag is_asic_specific to again ensure zero changes to the patch.
In such cases, there is an assumption that the function format_json_patch_for_multiasic has already been called with the namespace included in the patch path. This must be ensured by each test suite file that invokes this function.
…count all differnet use cases based on where the chaneg is applied. Adapted the calls of this function to test suites files. Handled the localhost only and all asic namespaces only. Next commit to handle specific asic namespaces changes that require more changes
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…h_interface.py, test_ip_bgp.py, test_pfcwd_status.py) where changes apply only to a specific ASIC namespace. In these cases, the function 'format_json_patch_for_multiasic' is not called, and the JSON formatting is handled within the respective test suite files. Helper functions were also updated, where necessary, to include the namespace prefix when issuing CLI commands or making database calls.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Hello @xincunli-sonic @judyjoseph Could you please re-review the changes? What I have done:
|
|
Hi @xincunli-sonic @judyjoseph Some suites require additional changes as they perform database calls to fetch values used in validation to confirm that the applied patch succeeded. These changes were not considered in the initial PR that got merged. However, I did not include these changes neither in this PR because the current focus is on fixing the JSON patch scope application. Adding them here would make the PR much larger and harder to manage. These changes are included in the separate Test PRs I have created per GCU suite.
The required changes are as follows:
Please advise on the preferred approach Thanks, |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@StormLiangMS Could you please review? |
…onic-net#16065) Description of PR For GCU test suites, configuration changes applied via patches sometimes target a specific ASIC namespace or apply globally to the card (localhost), depending on the feature functionality. With the recent merged PR sonic-net#14098, configuration changes are now applied to both localhost and all ASIC namespaces for all multi-ASIC platforms by default, which is incorrect. Examples: Configuration paths like /BGP_NEIGHBOR/ should apply only to the ASIC namespace. Paths like /SYSLOG_SERVER/ should apply only to the localhost namespace. This PR addresses the issue by introducing a missing flag for "asic_specific" configurations. It adapts the calls appropriately in each test suite based on the targeted configuration scope (ASIC namespace or localhost). Approach How did you verify/test it? Ran vs-kvm tests. Attaching sample results for test_portchannel.py and test_eth_interface.py:
|
@okaravasi , your changes on some files seem to be not correct. For example, in generic_config_updater/test_valn_interface.py, the DUT is always single-ASIC. In such a case, the format_json_patch_for_multiasic will return an empty list. |
|
nvm, I misread the code. Your change is fine. |
…292) Cherry-pick the fix of `verify_orchagent_running_or_assert` in following PRs to msft-202503: - sonic-net/sonic-mgmt#16065 - sonic-net/sonic-mgmt#18463
|
@okaravasi PR conflicts with 202505 branch |
|
hi @okaravasi , do you mind to help manual pick this PR to 202412? |
@mssonicbld It seems PR changes are already included in 2025, that's why there is conflict in cherry-picking. |
@r12f Created PR Azure/sonic-mgmt.msft#527 |
Manually porting changes from sonic-net/sonic-mgmt#16065
Description of PR
For GCU test suites, configuration changes applied via patches sometimes target a specific ASIC namespace or apply globally to the card (localhost), depending on the feature functionality.
With the recent merged PR #14098, configuration changes are now applied to both localhost and all ASIC namespaces for all multi-ASIC platforms by default, which is incorrect.
Examples:
Configuration paths like /BGP_NEIGHBOR/ should apply only to the ASIC namespace.
Paths like /SYSLOG_SERVER/ should apply only to the localhost namespace.
This PR addresses the issue by introducing a missing flag for "asic_specific" configurations. It adapts the calls appropriately in each test suite based on the targeted configuration scope (ASIC namespace or localhost).
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
Ran vs-kvm tests.
Attaching sample results for test_portchannel.py and test_eth_interface.py:
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation