-
Notifications
You must be signed in to change notification settings - Fork 95
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-mgmt-common: port to libyang3 #157
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
1912d28
to
2af318b
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
74f0752
to
73b87a5
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@dutta-partha probably going to need your help on this as you are the original author. I've got the port to libyang3 compiling at least, but I'm not entirely sure how to test it or debug it. I'm sure there are issues here. @ganglyu I've seen you make some commits here too, maybe you can help? I think out of all the libyang3 porting this is the one that is the most complex and that I know the least about. |
@bradh352
|
You can follow the pipeline to setup your environment and run unit test. |
Right, I'm aware of that. This PR is expected to fail in the SONiC CI system (azure pipelines) until the dependent PRs are merged. I was hoping someone more familiar with sonic-mgmt-common could help with testing and validation of this particular PR. Its by far the most complex port to libyang3 out of all the various sub-projects. |
@sachinholla would you please help? |
e933aa2
to
ef91050
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
02ce756
to
4a72c1f
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
4a72c1f
to
3fad970
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
3fad970
to
36e287b
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
36e287b
to
10f9078
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Hi @bradh352, all tests are passing on my development vm too.. Changes look good to me. Will ask cvl maintainers to take a look.
Seeing a few compiler warnings though:
In file included from _cgo_export.c:4:
util.go: In function ‘customLogCb’:
util.go:30:65: warning: passing argument 3 of ‘customLogCallback’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
util.go:26:62: note: expected ‘char *’ but argument is of type ‘const char *’
# github.com/Azure/sonic-mgmt-common/cvl/internal/util
../cvl/internal/util/util.go: In function ‘customLogCb’:
../cvl/internal/util/util.go:30:72: warning: passing argument 3 of ‘customLogCallback’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
30 | customLogCallback(level, (char*)msg, (char*)data_path?data_path:schema_path);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
../cvl/internal/util/util.go:26:62: note: expected ‘char *’ but argument is of type ‘const char *’
26 | extern void customLogCallback(LY_LOG_LEVEL, char* msg, char* path);
| ~~~~~~^~~~
These warnings are from the original code and not something newly introduced. Its due to the Golang<->C (cgo) stuff, where Go doesn't know about the |
@sachinholla any other comments on this review? If not, could you approve it? |
@bradh352 Code changes look good to me. |
let me know if you need an image to test and for what platform. I've got a tree with all 17 PRs in this series that I test with here: https://github.com/bradh352/sonic-buildimage/commits/bradh352/libyang3/ |
SONiC Libyang3 upgrade Tracking PR: sonic-net/sonic-buildimage#21679
This PR depends on the other PRs mentioned in the above tracking PR.
The API changes between libyang1 and libyang3 are drastic.
The cvl test cases are currently passing all tests.
This depends on libyang3's devel branch plus this rejected patch:
Or the libyang3 package built via sonic-buildimage which is based on v3.7.8 + all the necessary patches, part of sonic-net/sonic-buildimage#21679