GoogleCloudPlatform / app-gradle-plugin

The library has moved to https://github.com/GoogleCloudPlatform/appengine-plugins/tree/main/app-gradle-plugin
Apache License 2.0
153 stars 40 forks source link

Deploying with stopPreviousVersion doesn't stop the previous version #107

Closed lostpebble closed 7 years ago

lostpebble commented 7 years ago

As per title, I've been deploying a few versions today to test various things - this is what my build.gradle file looks like in the appengine section:

appengine {  // App Engine tasks configuration

    run {      // local (dev_appserver) configuration (standard environments only)
        port = 8080                 // default
    }

    deploy {   // deploy configuration
        stopPreviousVersion = true  // default - stop the current version
        promote = true              // default - & make this the current version
    }
}

But on deploying, looking at my App Engine console and versions listed- it shows that instances for the previous versions are still running. And on clicking on previous versions, they load up instantly which tells me they have not actually been stopped properly.

I have to manually go in and delete each one to get them to go away.

patflynn commented 7 years ago

@lostpebble thank you for the report! We will investigate this ASAP.

@loosebazooka can you verify this and figure out if it's a regression or longstanding issue?

loosebazooka commented 7 years ago

testing this right now.

lostpebble commented 7 years ago

I changed projects and the instances are stopping now after deploying a new version.

Lately I've noticed things have been a bit finicky (on the web App Engine Console) when it comes to working with versions - migrating traffic or stopping certain versions etc. I often get an error that it can't be done and I have to wait and try again. Perhaps its something to do with that.

Also, on the project where the problems occurred just now, I was deploying a series of Java App Engine standard versions after the project had been used for NodeJS App Engine flexible versions before (its just a project I use for development testing).

This new project where everything is fine now has just been Java Standard versions.

loosebazooka commented 7 years ago

Right, standard apps "stop-previous-version" doesn't really do anything as long as you're only deploying standard apps. They go down to zero instances and will instantly start serving if you hit them with traffic.

I'll have to play around with stopping previous versions with a mix of flex and standard to see what's going on, and maybe we'll have to move this issue to the deployment API.

loosebazooka commented 7 years ago

From my tests here it looks like the instances stop after deploying a standard app overwriting a flex app, there some sort of scale down going on and it takes a few minutes. @znewman01, do you have any idea of what the expected behavior is here?

loosebazooka commented 7 years ago

It appears this is a result of the previous version taking some time to shut down. If this continues please file a bug against the deployment platform https://issuetracker.google.com/savedsearches/558567

rohanliston commented 4 years ago

I have the same issue. If two versions are deployed within a short time of each other, one of them doesn't stop:

image

loosebazooka commented 4 years ago

@ludoch know who could fix this?