-
Notifications
You must be signed in to change notification settings - Fork 61
Update validate module to protoc-gen-validate 0.6.1 #165
Conversation
We generate by running |
+1 |
@hanzo how did you generate the code? |
Possibly just copied the generated code from https://github.com/envoyproxy/protoc-gen-validate ? |
Correct me if I'm wrong, but it seems to me that the current version of validate_pb2.py was copied from the Lyft-internal repo
That would be preferable, but as far as I can tell that repo doesn't contain the generated python code, only golang: https://github.com/envoyproxy/protoc-gen-validate/tree/main/validate I'm not sure of anywhere else that the generated python exists, open to suggestions. |
@hanzo you're right I meant the internal idlcode repo |
can you run |
I've been trying this but keep getting errors from mockery:
Any idea what's going on there? Full command line history attached: |
@EngHabu Seems like there's a step missing from this documentation? https://github.com/flyteorg/flyteidl#generate-code-from-protobuf Do I need to enter a docker container before running these |
yes, mind running |
essentially step 3 should be step1 |
I did, the output is in the file I attached above. |
I haven't figured out how to get Fortunately, the files in my latest commit seem to get generated before |
@EngHabu does this look good ? |
I see the tests passed. @hanzo can you sign the commit? |
Can you take care of DCO? then we can merge it |
Signed-off-by: Hans Werner <[email protected]>
Signed-off-by: Hans Werner <[email protected]>
Signed-off-by: Hans Werner <[email protected]>
Ok, I ran I was unable to get |
The CI system reruns the code generation. If it produced something different, it'll fail... |
Makes sense. Looks like all checks are passing now, good to merge? |
Just to close the loop here - this PR was successful in resolving the collisions of the Unfortunately this problem will resurface if idlcode gets updated to a newer version of protoc-gen-validate that contains breaking changes. We're looking into a better story for how repos like flyteidl can import the generated |
* Update validate module to protoc-gen-validate 0.6.1 Signed-off-by: Hans Werner <[email protected]> * include generated output Signed-off-by: Hans Werner <[email protected]> * update code Signed-off-by: Hans Werner <[email protected]> Co-authored-by: Julio Capote <[email protected]>
TL;DR
The current version of
validate/validate_pb2.py
was generated from validate.proto in protoc-gen-validate as of version 0.4.1. This PR updates the generated code to match protoc-gen-validate v0.6.1, the latest release. This will prevent collisions with other libraries that are using protoc-gen-validate v0.6.1.Type