openconfig / models-ci

Continuous integration for OpenConfig models.
Apache License 2.0
1 stars 0 forks source link

Speed up pyangbind and compile generated Python file #83

Closed wenovus closed 1 year ago

wenovus commented 1 year ago

Using the local pyangbind plugin dir instead of the version in PyPI (via pip) speeds up pyangbind code generation.

Also I noticed we were not compiling/interpreting the generated Python file all this time, so do that.

robshakir commented 1 year ago

Very strange -- it's just using the local repo's path rather than the symlink in the venv as far as I can tell, right? What is the speedup?

wenovus commented 1 year ago

Very strange -- it's just using the local repo's path rather than the symlink in the venv as far as I can tell, right? What is the speedup?

generation of network-instance models went from ~6min to ~3min, so this means CI in the public repo got cut by 3min as well.

By any chance do you know why BFD's generated file failed? https://gist.github.com/OpenConfigBot/bf776f80a2d518bddb10d2635c78ad9b

I'm planning to move pyangbind to compat-report for now until we fix this.

wenovus commented 1 year ago

Actually the reason is probably because what's in PyPI is outdated. I was using pip3 install pyangbind and using the pybind.py there rather than what's in the main branch.

wenovus commented 1 year ago

Thanks for the review!

robshakir commented 1 year ago

No problem — FYI, going forward Xavier and Jose just picked up maintaining pyangbind, so I expect that there will be some more up-to-date releases going forward. Once they have a strategy there it might be good for us to sync with them :-)