You can deploy it this way:

1-gcloud app deploy --no-promote -v

2-gcloud app services set-traffic <yourservice> --splits <yourversion>=1

By using the no promote flag, when you perform a deployment, the new 
version won’t directly serve traffic. Then, you could choose how much of 
the traffic you want to be sent by using set traffic.

If let’s say you want to send 50% of your traffic, you could do this:

gcloud app services set-traffic <yourservice> --splits <v1>=.5,<v2>=.5

You could gradually send all traffic to the new version if that works 
better for your use case.

You could also do this within the UI.
On Thursday, January 20, 2022 at 7:58:21 AM UTC-5 Maha Farhat wrote:

> Hi,
> We use App engine Flexible environment for executing long running 
> asynchronous tasks.
> When we make changes to the app and deploy a new version using the 
> command: "gcloud app deploy app.yaml", it deploys the new version routes 
> 100% traffic to the newly deployed version, and stops the old version. This 
> results in the failure of any request that was in process on the old 
> version.
>
> We have tried keeping the old version alive by using the flag 
> --no-stop-previous-version 
> but in this case, even after the new version is deployed and the latest 
> version is serving 100% requests the new request keeps getting served by 
> the older version. 1. Is there a way to keep the old version running until 
> the requests it is processing are completed? 2. How to make sure in the 2nd 
> scenario that all the new requests after new deployment are served by the 
> latest version instead of the old one?
>
> Thanks,
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/79150031-9709-4765-93a8-a8bc3fa9670dn%40googlegroups.com.

Reply via email to