-
Notifications
You must be signed in to change notification settings - Fork 664
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
[sonic-utilities] Unit test failed when building sonic-utilities #1761
Comments
I did a dummy change and tested it in the online build, and I see the unit-tests are successful. Maybe you need to sync sonic-buildimage because we had a bug fixed there and the sonic-utilities repo UTs. depend on this fix |
Seems not reproducible. Please check, if still have the issue, please reopen. |
Please check sonic-net/sonic-buildimage#8492. What I did:
|
@qiluo-msft could you please reopen the issue? |
@ghooo could you please take a look? |
@Junchao-Mellanox I see you are building Azure.sonic-buildimage and not Azure.sonic-utilities which is not what I tried. The commit was reverted here, I will check soon why it caused a build failure and update accordingly. |
I was able to generate the problem locally by setting-up sonic-buildimage and sonic-utilities from scratch, and not relaying on old builds. The problem is that backlinks of The following unit-test shows the error can be reproduced just from sonic-yang-models and sonic-yang-mgmtand is not related to sonic-utilities: def test_find_leaf_dependencies_acl_table_included(self):
sy = sonic_yang.SonicYang(gu_common.YANG_DIR)
sy.loadYangModel()
sy.loadData(Files.CROPPED_CONFIG_DB_AS_JSON)
xpath = "/sonic-port:sonic-port/PORT/PORT_LIST[name='Ethernet0']/name"
expected =["/sonic-acl:sonic-acl/ACL_TABLE/ACL_TABLE_LIST[ACL_TABLE_NAME='NO-NSW-PACL-V4']/ports[.='Ethernet0']",
"/sonic-vlan:sonic-vlan/VLAN_MEMBER/VLAN_MEMBER_LIST[name='Vlan1000'][port='Ethernet0']/port"]
actual = sy.find_data_dependencies(xpath)
self.assertCountEqual(expected, actual) Output:
The problem is in
When commenting out these lines the issue is resolved. This issue seems to also have happened before, as someone else commented a similar import https://github.com/Azure/sonic-buildimage/blob/48ba459f9ffcf3c5623927ab893ac3f15063aee2/src/sonic-yang-models/yang-models/sonic-route-map.yang#L21 |
#### Why I did it Fixing issue [[sonic-utilities] Unit test failed when building sonic-utilities #1761](sonic-net/sonic-utilities#1761) Importing `sonic-acl` caused getting references by `backlinks()` to break, #### How I did it solution is to comment out the importing statement as it is not used anyway. #### How to verify it Ran sonic-utilities unit-tests locally after the fix, and all passed.
) #### What I did Implemented [JSON Patch Ordering using YANG Models Design Doc](https://github.com/Azure/SONiC/blob/master/doc/config-generic-update-rollback/Json_Patch_Ordering_using_YANG_Models_Design.md) #### How to verify it Unit-Tests **NOTE: The code in this PR was [reverted](github.com/Azure/sonic-utilities/commit/0a145e8027380e8d4decb36bdfc647062c722612) before because of some [build issues](#1761). Build issues have been fixed [here](sonic-net/sonic-buildimage#8632). To check the original PR comments please go [here](#1599
* d240291 Update port_rates & rif_rates lua scripts to convert poll_interval to MS (sonic-net#1855) * a71a5d3 [acl mirror action] Mirror session ref count fix at acl rule attachment (sonic-net#1761) * 197f427 Fix vs test failure in test_buffer_traditional (sonic-net#1881) * 8471f42 Revert "[debugcounterorch] check if counter type is supported before querying… (sonic-net#1789)" (sonic-net#1884) Signed-off-by: Volodymyr Samotiy <[email protected]>
…794) #### What I did Implemented [JSON Patch Ordering using YANG Models Design Doc](https://github.com/Azure/SONiC/blob/master/doc/config-generic-update-rollback/Json_Patch_Ordering_using_YANG_Models_Design.md) #### How to verify it Unit-Tests **NOTE: The code in this PR was [reverted](github.com/Azure/sonic-utilities/commit/0a145e8027380e8d4decb36bdfc647062c722612) before because of some [build issues](sonic-net/sonic-utilities#1761). Build issues have been fixed [here](sonic-net/sonic-buildimage#8632). To check the original PR comments please go [here](sonic-net/sonic-utilities#1599
Description
I suppose this issue is introduced by commit: 920bb87 . And when I checkout the previous commit, no issue.
See unit test failure:
Steps to reproduce the issue
Describe the results you received
See unit test failure
Describe the results you expected
All unit test cases should pass
Additional information you deem important (e.g. issue happens only occasionally)
Output of
show version
The text was updated successfully, but these errors were encountered: