feat: Add Ruby message schema files
Context on this change
- These files will be copied into the
vendor/gems
directory of the gitlab monolith so that they can be used to instantiate a Ruby client to interact with the Duo Workflow Service. - We may choose to publish this in rubygems.org later. For now, we are
generating these files using the
proto
definitions in this project and will just manually copy the files over. - These files were generated using the following command while in the root directory of the duo_workflow_servic project:
grpc_tools_ruby_protoc -I contract --ruby_out=clients/ruby/lib/proto --grpc_out=clients/ruby/lib/proto contract/contract.proto
Note that I did have to make one small change to these generated files: I made to these generated files is that I addedrequire_relative
to L5 of contract_services_pb.rb
. Auto-generated version just had require
. Before this change, I received an error. This appears to be a known issue. See https://github.com/grpc/grpc/issues/29027
How to test this change
See my branch on the monolith where I did the following:
- Run the Duo Workflow Service server:
poetry run python -m duo_workflow_service.server
- Copy the files added in this MR into the
vendor/gems
directory of gitlab - Add the vendored gem to the Gemfile
- Invoke the client I created in
ee/lib/ai/duo_workflow_service/client.rb
in a Rails console:Ai::DuoWorkflowService::Client.new(duo_workflow_service_url: "localhost:50052").generate_token
Edited by Jessie Young