Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I delete multiple versions in an app on google cloud?

When I deploy a project I get this error INVALID_ARGUMENT: Your app may not have more than 15 versions. Please delete one of the existing versions before trying to create a new version.

I also went to versions on google cloud and tried to delete it manually but it says you can not delete a version with traffic shares.

Please help, any advice are greatly appreciated

like image 425
Vincent Avatar asked Feb 24 '17 01:02

Vincent


People also ask

How to delete versions Google Cloud?

Show activity on this post. Just click on the square in the left side of the version row in the table pictured in your 1st screenshot to select it and the Delete button should activate. disable your app if this is the only service in it from the Settings Menu.

How do I remove default service from App Engine?

The only way you can delete the default version of your App Engine app is by deleting your project. However, you can stop the default version in the GCP Console. This action shuts down all instances associated with the version. You can restart these instances later if needed.

How do I recover deleted files from Google cloud?

If you want to restore files for your own consumer Drive account, go to Find or recover a file. As an administrator, you can recover deleted items from Google Drive within 25 days after a user empties their trash. After that period, Google purges the data from its systems.


1 Answers

You'll need to keep one version (latest maybe?) and then migrate all traffic to it with the "Split Traffic" link here, away from all the other versions you want to delete.

Then you will be able to select and delete those versions since they no longer handle traffic.

Finally you deploy the new version (in fact you could do that as soon as you deleted enough versions to no longer see that error) and, if needed, migrate traffic to it.

Also see gcloud app deploy for options related to versioning and traffic migration right at deployment time which could help you prevent such situation in the future:

--promote

Promote the deployed version to receive all traffic.

True by default. To change the default behavior for your current environment, run:

$ gcloud config set app/promote_by_default false

Overrides the default promote_by_default property value for this command invocation. Use --no-promote to disable.

--stop-previous-version

Stop the previously running version when deploying a new version that receives all traffic. Overrides the default stop_previous_version property value for this command invocation. Use --no-stop-previous-version to disable.

--version=VERSION, -v VERSION

The version of the app that will be created or replaced by this deployment. If you do not specify a version, one will be generated for you.

like image 132
Dan Cornilescu Avatar answered Sep 25 '22 01:09

Dan Cornilescu