GoogleCloudPlatform / appengine-ruby

Optional integration library for the Ruby runtime for Google App Engine
Apache License 2.0
53 stars 21 forks source link

Missing container image from gcloud app versions describe VERSION #33

Closed laertispappas closed 3 years ago

laertispappas commented 4 years ago

Hello,

I'm new to gcloud and trying to set up a rails app based on the docs. I'm not sure if this is a appengine-ruby probably not since the gcloud CLI is giving the same results. Not sure where I messed up but when I run

bundle exec rake appengine:exec -- bundle exec rake db:migrate

I get the following error

rake aborted!
NoMethodError: undefined method `[]' for nil:NilClass
/Users/laerti.papa/.rvm/gems/ruby-2.6.3/gems/appengine-0.5.0/lib/appengine/exec.rb:754:in `start_build_strategy'
/Users/laerti.papa/.rvm/gems/ruby-2.6.3/gems/appengine-0.5.0/lib/appengine/exec.rb:491:in `start'
/Users/laerti.papa/.rvm/gems/ruby-2.6.3/gems/appengine-0.5.0/lib/appengine/tasks.rb:317:in `start_and_report_errors'
/Users/laerti.pap

I debugged a bit and I saw that apparently the app_info hash is missing the ["deployment"]["container"]["image"]: https://github.com/GoogleCloudPlatform/appengine-ruby/blob/master/lib/appengine/exec.rb#L754

Running the deployment strategy I have other issues but for now I try to understand why cloud_build does not work or why the image is not there when I run describe app version.

Any help would be much appreciated. Thank you.

dazuma commented 4 years ago

First, is your app in the flexible or standard environment? (Is there env: flex in your app.yaml or not?)

The cloud_build strategy does not work in the standard environment, because App Engine does not provide the image for standard environment apps.

laertispappas commented 4 years ago

Hi @dazuma my app is running in the flex. environment. This command for some reason does not give me the container image in the JSON output:

gcloud app versions describe 20200415t004447

I ended app getting a shell in a running version and running the migrations manually from there. But I need to automate this.

I'm not sure where to ask and I k now its not an appengine-ruby question probably but any help would be much appreciated.

jerelmiller commented 4 years ago

I have also encountered this running in a flex environment. I have since switched to the standard environment and it seems to be working ok there.

jonasmora commented 4 years ago

Is there any update on this issue?

asanchez0527 commented 4 years ago

I'm also facing this issue, is there any workaround?

jonasmora commented 4 years ago

This was working but now I'm getting the same error again. Did anything change?

dwalker11 commented 4 years ago

Any update?

dazuma commented 3 years ago

I just had a conversation with one of the App Engine engineers, and it looks like there's a change to the behavior of the Flexible Environment that's causing this. They suggested a workaround that I'm now working on implementing. Apparently the change is one that's been planned for a while and should make the build process more reliable, but the rollout has been slow which is why it's been hard to reproduce and diagnose.

dazuma commented 3 years ago

The fix is scheduled for release Wed Dec 2.