googleapis/google-api-ruby-client

Can't install gem in appengine with flex env config

Closed this issue · 1 comments

Step #1: /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/google-apis-core-0.4.0/lib/google/apis/core/http_command.rb:228:in check_status': notFound: Requested entity was not found. (Google::Apis::ClientError) Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/google-apis-core-0.4.0/lib/google/apis/core/api_command.rb:134:in check_status'
Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/google-apis-core-0.4.0/lib/google/apis/core/http_command.rb:194:in process_response' Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/google-apis-core-0.4.0/lib/google/apis/core/http_command.rb:310:in execute_once'
Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/google-apis-core-0.4.0/lib/google/apis/core/http_command.rb:113:in block (2 levels) in execute' Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/retriable-3.1.2/lib/retriable.rb:61:in block in retriable'
Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/retriable-3.1.2/lib/retriable.rb:56:in times' Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/retriable-3.1.2/lib/retriable.rb:56:in retriable'
Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/google-apis-core-0.4.0/lib/google/apis/core/http_command.rb:110:in block in execute' Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/retriable-3.1.2/lib/retriable.rb:61:in block in retriable'
Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/retriable-3.1.2/lib/retriable.rb:56:in times' Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/retriable-3.1.2/lib/retriable.rb:56:in retriable'
Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/google-apis-core-0.4.0/lib/google/apis/core/http_command.rb:102:in execute' Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/google-apis-core-0.4.0/lib/google/apis/core/base_service.rb:377:in execute_or_queue_command'
Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/google-api-client-0.53.0/generated/google/apis/runtimeconfig_v1beta1/service.rb:579:in list_project_config_variables' Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/rcloadenv-0.2.1/lib/rcloadenv/loader.rb:141:in load_raw_variables'
Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/rcloadenv-0.2.1/lib/rcloadenv/loader.rb:118:in raw_variables' Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/rcloadenv-0.2.1/lib/rcloadenv/loader.rb:100:in write_dotenv'
Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/rcloadenv-0.2.1/lib/rcloadenv/cli.rb:102:in run' Step #1: from /opt/rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/rcloadenv-0.2.1/bin/rcloadenv:29:in <top (required)>'
Step #1: from /opt/rbenv/versions/2.7.3/bin/rcloadenv:23:in load' Step #1: from /opt/rbenv/versions/2.7.3/bin/rcloadenv:23:in

'
Step #1: The command '/bin/sh -c gem install rcloadenv && rbenv rehash && rcloadenv flex-env-config >> .env' returned a non-zero code: 1
Finished Step #1
ERROR
ERROR: build step 1 "gcr.io/cloud-builders/docker@sha256:052f359bb5af7c6be91b70907a6a75d3fdd822da67ba14ca75fcb16b22380760" failed: step exited with non-zero status: 1

It looks like the gem is installed, but just isn't finding the runtime config that you are asking for. Check that you have indeed created the runtime config called flex-env-config in the same project your app is deployed to. And check that the Google Cloud Build service account has access to read the runtime config.

Longer term, rcloadenv was a stopgap solution and is no longer supported. Consider using Google Cloud Secret Manager instead.