skip to Main Content

As written in google documentation here and here

I use the latest runtime of Ruby available in app engine.

Runtime Environment Runtime ID End of support Deprecated Decommission
Ruby 3.3 Ubuntu 22.04 ruby33 2027-03-31 2028-03-31
Ruby 3.2 Ubuntu 22.04 ruby32 2026-03-31 2027-03-31

My worker.yml starts like that:

runtime: ruby33
env: flex
service: default
entrypoint: bundle exec sidekiq
resources:
  cpu: 2
  memory_gb: 1.6
  disk_size_gb: 10

My Gemfile starts like so:

source 'https://rubygems.org'

ruby "3.3.1"

My Gemfile.lock ends like that:

RUBY VERSION
   ruby 3.3.1p55

BUNDLED WITH
   2.3.26

My Dockerfile starts like that:

# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.3.1
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base

My cloudbuild.yaml looks like that

#First I build the image:
  - id: "Build worker"
    name: "gcr.io/cloud-builders/docker"
    script: |
      #!/usr/bin/env bash
      docker build --target worker -t $_IMAGE_URL .

#Then I deploy it:
 - id: "Launch worker"
   name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:alpine'
   script: |
     #!/usr/bin/env bash
     gcloud app deploy worker.yaml --image-url=$_IMAGE_URL --quiet

but when deploying, I get this error:

Step #13 – "Launch worker": ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: Error(s) encountered validating runtime. Your runtime version for ruby33 is past End of Support. Please upgrade to the latest runtime version available..

I have no idea how to fix it. Can you help me?

2

Answers


  1. Chosen as BEST ANSWER

    It seems the way the yaml file is processed by app engine has slightly changed between July 4th 2024 and August 8th 2024.

    Now runtime_config.operating_system MUST be defined or it will fail with the unclear error INVALID_ARGUMENT: Error(s) encountered validating runtime. Your runtime version for ...

    I fixed this issue by adding this to my worker.yml file:

    runtime: ruby
    env: flex
    service: default
    entrypoint: bundle exec sidekiq
    runtime_config:
      operating_system: "ubuntu22" # <-- FIX
    
    #...
    

  2. Thanks to @Micka, this worked for me!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search