0

When trying to deploy my app to app engine, I'm getting this error:

[INFO] GCLOUD: ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: In place deployments of App Engine Flexible Environment over an existing version are not supported. Please use a different version name, or delete the existing version first.

I'm deploying the application by running:

 mvn clean package appengine:deploy -P cloud-gcp

There's one and only one version:

> gcloud app versions list
SERVICE  VERSION  TRAFFIC_SPLIT  LAST_DEPLOYED              SERVING_STATUS
default  1        1.00           2019-10-05T10:22:54+01:00  SERVING

so, I can't delete it:

> gcloud app versions delete 1
ERROR: (gcloud.app.versions.delete) The default service (module) may not be deleted, and must comprise at least one version.

What am I missing to manage to deploy this app?

I originally configured my app following this tutorial: https://cloud.google.com/appengine/docs/standard/java11/quickstart (I think, I'm not sure)

but then I switched to this as it included database config, which my app needs: https://www.baeldung.com/spring-boot-google-app-engine

The configuration I copied was:

        <plugin>
            <groupId>com.google.cloud.tools</groupId>
            <artifactId>appengine-maven-plugin</artifactId>
            <version>2.1.0</version>
            <configuration>
                <version>1</version>
                <projectId>GCLOUD_CONFIG</projectId>
            </configuration>
        </plugin>

and changing that version to 2 changed the error message to:

[INFO] GCLOUD: ERROR: (gcloud.app.deploy) Error Response: [4] Your deployment has failed to become healthy in the allotted time and therefore was rolled back. If you believe this was an error, try adjusting the 'app_start_timeout_sec' setting in the 'readiness_check' section.

My question remains, what's the sane way of deploying the app without having to commit a new pom.xml file every time and having to manually delete versions when it hits 120 deployed versions?

Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622

1 Answers1

0

Apparently the solution was to configure it like this:

        <plugin>
            <groupId>com.google.cloud.tools</groupId>
            <artifactId>appengine-maven-plugin</artifactId>
            <version>2.1.0</version>
            <configuration>
                <version>recruiter-wtf</version>
                <projectId>GCLOUD_CONFIG</projectId>
            </configuration>
        </plugin>

but I'm not 100% sure this is correct because the app is not correctly starting yet.

Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622