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

Add ygnmi validator #93

Merged
merged 20 commits into from
Nov 13, 2023
Merged

Add ygnmi validator #93

merged 20 commits into from
Nov 13, 2023

Conversation

wenovus
Copy link
Contributor

@wenovus wenovus commented Nov 10, 2023

  • Only compile ygot-generated code since ygnmi-generated code significantly increases compilation time and it is simpler so most issues will be caught at code-generation time.
  • Make processing parallel, which reduced stage time from 7m2.326s to 1m26.953s

Tested @ openconfig/public#996 (see latest commits)

Copy link

github-actions bot commented Nov 10, 2023

Pull Request Test Coverage Report for Build 6853610196

  • 0 of 5 (0.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 54.403%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd_gen/main.go 0 1 0.0%
commonci/github.go 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
cmd_gen/main.go 1 30.42%
Totals Coverage Status
Change from base Build 6819486632: -0.2%
Covered Lines: 939
Relevant Lines: 1726

💛 - Coveralls

@wenovus wenovus requested review from robshakir and dplore November 10, 2023 18:15
@wenovus wenovus marked this pull request as ready for review November 10, 2023 18:16
@robshakir
Copy link
Contributor

Should we keep both ygot and ygnmi? What's the logic for replacing ygot? (It seems like they do different jobs, and may have different flags/ways of generating structs -- e.g., uncompressed vs. compressed).

@wenovus
Copy link
Contributor Author

wenovus commented Nov 10, 2023

Should we keep both ygot and ygnmi? What's the logic for replacing ygot? (It seems like they do different jobs, and may have different flags/ways of generating structs -- e.g., uncompressed vs. compressed).

ygnmi generates a full set of ygot GoStructs with the recommended set of flags for ygot. This is because users of ygnmi in general need the full ygot functionality.

However, there are small benefits to running ygot alongside ygnmi:

  • We know at a glance that ygot is not broken, only ygnmi.
  • We also test ygot's generator.go, but there is not much logic here.
  • If ygot advances its version, ygnmi doesn't automatically advance it without a PR.

I didn't consider the last point here, and that seems to me like a good-enough reason to warrant the extra compute time, so let me add it as a second check.

@wenovus wenovus marked this pull request as draft November 10, 2023 20:30
@wenovus wenovus changed the title Change ygot to ygnmi Add ygnmi validator Nov 13, 2023
@wenovus wenovus marked this pull request as ready for review November 13, 2023 17:58
@wenovus
Copy link
Contributor Author

wenovus commented Nov 13, 2023

@robshakir @dplore PTAL.

@wenovus wenovus merged commit f098639 into master Nov 13, 2023
7 checks passed
@wenovus wenovus deleted the ygnmi-for-ygot branch November 13, 2023 23:37
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.

3 participants