-
Notifications
You must be signed in to change notification settings - Fork 19
Introduce tools to check if implementation is properly synchronized with libpod #71
Conversation
@astronouth7303 feel free to review these changes and to put some comments if needed. |
Also see example of a real usage here |
Now that we can easily detect which methods are not implemented by libopod releases, it can be interesting to submit patch sets related to specific libpod versions (1.6.1, 1.6.2, etc... 1.7.0). We can append the missing methods release by release by using the revision id with Example: $ # libpod 1.6.1
$ ./tools/synchronize.sh -b=233d95f4f0a815f11d1c1ae9aba16781c4eb2700
$ # append the related delta based on previous tool call output
$ git tag 1.6.1
$ git push --tags
$ # libpod 1.6.2
$ ./tools/synchronize.sh -b=f3ffda1e08f19e9a6a88484136b5eed76533f21a
$ # append the related delta based on previous tool call output
$ git tag 1.6.2
$ git push --tags
$ # libpod 1.6.3
$ ./tools/synchronize.sh -b=9d087f6a766259ba53b224944f1b7b778035c370
$ # append the related delta based on previous tool call output
$ git tag 1.6.3
$ git push --tags
$ # libpod 1.6.4
$ ./tools/synchronize.sh -b=5cc92849f7fc9dd734ca2fd8f3ae8830b9a7eb26
$ # append the related delta based on previous tool call output
$ git tag 1.6.4
$ git push --tags
$ # libpod 1.7.0
$ ./tools/synchronize.sh -b=b7ce1157b00af09f4a09e39b377aa3abff46ee05
$ # append the related delta based on previous tool call output
$ git tag 1.7.0
$ git push --tags Then we will have full compatibility with existing releases. If methods signature still have difference in released version we can fix them in a second time by using new revisions build in python-podman release verison. Examples:
|
Seems like a good start, as long as you remember to adjust it as your needs shift. |
Yeah sure, thanks for your feedback |
oh, there is one concern: the implementation warnings are buried in the output, but i'm not sure travis has good options to help with that. |
@astronouth7303 Yes but it's not really an issue, I'm not sure but I think we can fold commands output if needed to keep the output more human readable. I need take a further look to travis option to see if we can improve this part. Anyway thanks for the heads up. |
67589cb
to
3882972
Compare
RHEL8 as the minimal version will be required for python-podman. Also: - introduce some new pypi classifiers; - set a minimal version (pyhton 3.5) in setup.cfg; - stop to build universal wheel.
libpod Related to containers#70 Summarize --------- This tools allow us to compare branches or revision to check if python-podman is unsynchronized with libpod. Design ------ These changes only check if method exist in python-podman souce code. They don't yet check method signature. If a method doesn't exist it will return 1 so we can call it in CI/CD and catch errors to append missing methods. It's possible to force to return a code 0 to avoid to polluate our CI/CD in the first time with a lot of well know issues related to unsynchronized projects. Usage ----- ```shell $ # Check if python-podman is properly synchronized with libpod master $ ./tools/synchronize.sh Downloading the libpod's defined interface https://raw.githubusercontent.com/containers/libpod/master/cmd/podman/varlink/io.podman.varlink % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 52112 100 52112 0 0 49725 0 0:00:01 0:00:01 --:--:-- 49725 Method Reset seems not yet implemented Method GetContainersByStatus seems not yet implemented Method HealthCheckRun seems not yet implemented Method GetContainersByContext seems not yet implemented Method GetContainersLogs seems not yet implemented Method GetContainerStatsWithHistory seems not yet implemented ... Method GetLayersMapWithImageInfo seems not yet implemented Method BuildImageHierarchyMap seems not yet implemented 42 error(s) found Comparison finished...bye! $ # Check if python-podman is properly synchronized with libpod version $ # 1.6.2 (which refer to commit ID f3ffda1e08f19e9a6a88484136b5eed76533f21a) $ ./tools/synchronize.sh -b=f3ffda1e08f19e9a6a88484136b5eed76533f21a Downloading the libpod's defined interface https://raw.githubusercontent.com/containers/libpod/f3ffda1e08f19e9a6a88484136b5eed76533f21a/cmd/podman/varlink/io.podman.varlink % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 50588 100 50588 0 0 51515 0 --:--:-- --:--:-- --:--:-- 51462 Method GetContainersByStatus seems not yet implemented Method HealthCheckRun seems not yet implemented ... Method GetEvents seems not yet implemented Method GetLayersMapWithImageInfo seems not yet implemented Method BuildImageHierarchyMap seems not yet implemented 37 error(s) found Comparison finished...bye! ```
@4383 Looks good, I'm willing to merge with the knowledge that the V2 api will break this. Ack? |
@jwhonce ack, thanks for the heads up. They are not blocking the CI so it's ok for V2 |
Related to #70
Summarize
This tools allow us to compare branches or revision to check
if python-podman is unsynchronized with libpod.
Design
These changes only check if method exist in python-podman souce code.
They don't yet check method signature.
If a method doesn't exist it will return 1 so we can call it in CI/CD
and catch errors to append missing methods.
It's possible to force to return a code 0 to avoid to polluate our CI/CD
in the first time with a lot of well know issues related to
unsynchronized projects.
Usage