-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GCU]Remove GCU unique lane check for duplicate lanes platforms #2343
Conversation
"DPB_1_TO_4__SUCCESS" in patch_sorter_test will fail after unique lane check removed. Details below: Expected change involving unique lane check
Actual change after remove unique lane check:
|
suggest add an extra parameter In reply to: 1233305890 In reply to: 1233305890 In reply to: 1233305890 In reply to: 1233305890 Refers to: generic_config_updater/gu_common.py:136 in 72b8249. [](commit_id = 72b8249, deletion_comment = False) |
This pull request introduces 1 alert when merging 1c4096b into f0ce586 - view on LGTM.com new alerts:
|
generic_config_updater/gu_common.py
Outdated
success, error = supplemental_yang_validator(config_db_as_json) | ||
for supplemental_yang_validator, validator_params in \ | ||
zip(supplemental_yang_validators, validators_params): | ||
success, error = supplemental_yang_validator(*validator_params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -3034,6 +3034,9 @@ def test_patch_sorter_success(self): | |||
data = Files.PATCH_SORTER_TEST_SUCCESS | |||
skip_exact_change_list_match = False | |||
for test_case_name in data: | |||
# DPB_1_TO_4__SUCCESS will fail when unique_lanes is set to False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check above sorting output here #2343 (comment)
When lane validator is removed, the sorting order is changed. That's why it fails.
generic_config_updater/gu_common.py
Outdated
@@ -116,6 +116,8 @@ def validate_config_db_config(self, config_db_as_json): | |||
# TODO: Move these validators to YANG models | |||
supplemental_yang_validators = [self.validate_bgp_peer_group, | |||
self.validate_lanes] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.validate_lanes] | |
lambda c: return self.validate_lanes(c, False)] |
generic_config_updater/gu_common.py
Outdated
@@ -133,7 +138,7 @@ def validate_config_db_config(self, config_db_as_json): | |||
|
|||
return True, None | |||
|
|||
def validate_lanes(self, config_db): | |||
def validate_lanes(self, config_db, dup_lanes_platforms=[]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a common bug. ref: https://stackoverflow.com/a/44272023/2514803 #Closed
generic_config_updater/gu_common.py
Outdated
@@ -113,9 +113,14 @@ def validate_sonic_yang_config(self, sonic_yang_as_json): | |||
def validate_config_db_config(self, config_db_as_json): | |||
sy = self.create_sonic_yang_with_loaded_models() | |||
|
|||
dup_lanes_platforms = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add the TODO comment in my above comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
Let's remove blank line only changes, so backport will be easier. In reply to: 1251553830 Refers to: tests/generic_config_updater/files/patch_sorter_test_success.json:6161 in 6cb3a8c. [](commit_id = 6cb3a8c, deletion_comment = False) |
Update sonic-utilities submodule pointer to include the following: * 0a7557b [minigraph] add option to specify golden path in load_minigraph ([sonic-net#2350](sonic-net/sonic-utilities#2350)) * 322aefc [GCU]Remove GCU unique lane check for duplicate lanes platforms ([sonic-net#2343](sonic-net/sonic-utilities#2343)) * 7099fff [fastboot] fastboot enhancement: Use warm-boot infrastructure for fast-boot ([sonic-net#2286](sonic-net/sonic-utilities#2286)) * 09026ed [warm-reboot] fix warm-reboot when /tmp/cache is missing ([sonic-net#2367](sonic-net/sonic-utilities#2367)) * a3c404c Fix typo in platform_sfputil_helper.is_rj45_port ([sonic-net#2374](sonic-net/sonic-utilities#2374)) * 637d834 Vnet_route_check Vxlan tunnel route update. ([sonic-net#2281](sonic-net/sonic-utilities#2281)) * 29a3e51 Added support for tunnel route status in show vnet routes all. ([sonic-net#2341](sonic-net/sonic-utilities#2341)) * 1ac584b Use 'default' VRF when VRF name is not provided ([sonic-net#2368](sonic-net/sonic-utilities#2368)) * 4d377a6 [subinterface]Added additional checks in portchannel and subinterface commands ([sonic-net#2345](sonic-net/sonic-utilities#2345)) * bbcdf2e disk_check: Publish event for RO state ([sonic-net#2320](sonic-net/sonic-utilities#2320)) * 3fd537b Support the bandit check by GitHub Action ([sonic-net#2358](sonic-net/sonic-utilities#2358)) * 491d3d3 [generate dump]Added error message when saisdkdump fails ([sonic-net#2356](sonic-net/sonic-utilities#2356)) * 6830e01 [counterpoll]Fixing counterpoll show for tunnel and acl stats ([sonic-net#2355](sonic-net/sonic-utilities#2355)) * 3be2ad7 [fast-reboot]Avoid stopping masked services during fast-reboot ([sonic-net#2335](sonic-net/sonic-utilities#2335)) * 0e1b0cf [GCU] Fix missing backend in dry run ([sonic-net#2347](sonic-net/sonic-utilities#2347)) * 676c31b Add verification for override ([sonic-net#2305](sonic-net/sonic-utilities#2305)) * 48997c2 Add Password Hardening CLI support ([sonic-net#2338](sonic-net/sonic-utilities#2338)) * 414e239 update unit tests for swap ([#locato](https://github.com/sonic-net/sonic-utilities/pull/locato)) * a91a492 consider swap checking memory in ([#stalle](https://github.com/sonic-net/sonic-utilities/pull/stalle)) * f0ce586 [route_check]: Ignore standalone tunnel routes ([sonic-net#2325](sonic-net/sonic-utilities#2325)) Signed-off-by: dprital <drorp@nvidia.com>
What I did Remove unique lane check for specific platforms to unblock GCU nightly test. How I did it Add platform check for unique lane validator How to verify it Run unit test
Summary: Duplicate lane check was added in sonic-utilities. Remove that in sonic-mgmt. What is the motivation for this PR? The GCU-related tests were bypassed in duplicate lanes' platforms. We don't want to skip GCU tests on such platforms. So we update the unique lane check and simply bypass the check for such platforms in GCU feature. Now the GCU tests can be tested on such platforms. How did you do it? Fix in GCU feature. sonic-net/sonic-utilities#2343 has been updated to sonic-buildimage. How did you verify/test it? Run e2e test in specific platform.
…c-net#2343) What I did Remove unique lane check for specific platforms to unblock GCU nightly test. How I did it Add platform check for unique lane validator How to verify it Run unit test
Summary: Duplicate lane check was added in sonic-utilities. Remove that in sonic-mgmt. What is the motivation for this PR? The GCU-related tests were bypassed in duplicate lanes' platforms. We don't want to skip GCU tests on such platforms. So we update the unique lane check and simply bypass the check for such platforms in GCU feature. Now the GCU tests can be tested on such platforms. How did you do it? Fix in GCU feature. sonic-net/sonic-utilities#2343 has been updated to sonic-buildimage. How did you verify/test it? Run e2e test in specific platform.
…c-net#2343) What I did Remove unique lane check for specific platforms to unblock GCU nightly test. How I did it Add platform check for unique lane validator How to verify it Run unit test
Summary: Duplicate lane check was added in sonic-utilities. Remove that in sonic-mgmt. What is the motivation for this PR? The GCU-related tests were bypassed in duplicate lanes' platforms. We don't want to skip GCU tests on such platforms. So we update the unique lane check and simply bypass the check for such platforms in GCU feature. Now the GCU tests can be tested on such platforms. How did you do it? Fix in GCU feature. sonic-net/sonic-utilities#2343 has been updated to sonic-buildimage. How did you verify/test it? Run e2e test in specific platform.
…c-net#2343) What I did Remove unique lane check for specific platforms to unblock GCU nightly test. How I did it Add platform check for unique lane validator How to verify it Run unit test
Summary: Duplicate lane check was added in sonic-utilities. Remove that in sonic-mgmt. What is the motivation for this PR? The GCU-related tests were bypassed in duplicate lanes' platforms. We don't want to skip GCU tests on such platforms. So we update the unique lane check and simply bypass the check for such platforms in GCU feature. Now the GCU tests can be tested on such platforms. How did you do it? Fix in GCU feature. sonic-net/sonic-utilities#2343 has been updated to sonic-buildimage. How did you verify/test it? Run e2e test in specific platform.
Summary: Duplicate lane check was added in sonic-utilities. Remove that in sonic-mgmt. What is the motivation for this PR? The GCU-related tests were bypassed in duplicate lanes' platforms. We don't want to skip GCU tests on such platforms. So we update the unique lane check and simply bypass the check for such platforms in GCU feature. Now the GCU tests can be tested on such platforms. How did you do it? Fix in GCU feature. sonic-net/sonic-utilities#2343 has been updated to sonic-buildimage. How did you verify/test it? Run e2e test in specific platform.
What I did
Remove unique lane check for specific platforms to unblock GCU nightly test.
How I did it
Add platform check for unique lane validator
How to verify it
Run unit test
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)