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

gapic-generator-cloud docker invocation fails if --ruby-cloud-gem-name option is not supplied #323

Open
viacheslav-rostovtsev opened this issue Jan 28, 2020 · 1 comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@viacheslav-rostovtsev
Copy link
Member

when invoking gapic-generator-cloud docker like this:

$ docker run --rm --user $UID \
  --mount type=bind,source=`pwd`/google/showcase/v1beta1,destination=/in/google/showcase/v1beta1,readonly \
  --mount type=bind,source=`pwd`/showcase-ruby,destination=/out \
  gcr.io/gapic-images/gapic-generator-ruby:latest

the generator will fail with the Nil reference exception.

/usr/local/bundle/gems/gapic-generator-0.0.1/templates/default/helpers/presenters/gem_presenter.rb:62 \  
 :in `namespace': undefined method `split' for nil:NilClass (ActionView::Template::Error)

This can be remedied by supplying the docker generator with the --ruby-cloud-gem-name parameter:

$ docker run --rm --user $UID \
  --mount type=bind,source=`pwd`/google/showcase/v1beta1,destination=/in/google/showcase/v1beta1,readonly \
  --mount type=bind,source=`pwd`/showcase-ruby,destination=/out \
  gcr.io/gapic-images/gapic-generator-ruby:latest --ruby-cloud-gem-name=showcase

(this generates correctly)

There should be a sensible default for the gemname we can add to the gapic-generator-ruby to avoid this issue.

@quartzmo
Copy link
Member

There should be a sensible default for the gemname we can add to the gapic-generator-ruby to avoid this issue.

I agree, it seems that we should be able to just derive the gem name from the first three namespaces (Google::Cloud::VideoIntelligence), right?

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Jan 28, 2020
@dazuma dazuma added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants