Skip to content
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

Better modularization for gnoi_client.go #338

Merged
merged 5 commits into from
Jan 10, 2025
Merged

Conversation

hdwhdw
Copy link
Contributor

@hdwhdw hdwhdw commented Jan 9, 2025

Why I did it

The gnoi/gnmi code in sonic-gnmi have some diamond dependency problems since different code can dependent on different version of gnoi/gnmi, leading to inability to implement newer services such as containerz, which comes after gnoi v0.4.0. Golang with its go mod vendor offers a way to solve this problem. But the code needs to be properly modularized to take advantage of this.

How I did it

Untangle gnoi_client.go into separate modules such as config, util, system, file and sonic.

How to verify it

built and unit tested, also verified by copying the new gnoi_client binary to a VS and run sonic-mgmt gnoi_kill_process test.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@hdwhdw hdwhdw marked this pull request as ready for review January 10, 2025 00:20
@ganglyu
Copy link
Contributor

ganglyu commented Jan 10, 2025

Did you verify this gnoi_client?

Copy link

@xincunli-sonic xincunli-sonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hdwhdw
Copy link
Contributor Author

hdwhdw commented Jan 10, 2025

@ganglyu Yes by copying gnoi_client onto a machine and run sonic-mgmt gnoi test.

@hdwhdw hdwhdw merged commit 3afc927 into sonic-net:master Jan 10, 2025
5 checks passed
@hdwhdw hdwhdw deleted the untangle branch January 10, 2025 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants