Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcloud in version Google Cloud SDK 0.9.57 breaks deploy of application

As of 04/22/15, update of gcloud to the latest version breaks the deploy command. The version of the app is set to the current timestamp (eg: 20150422t202108). And doing a:

gcloud preview app deploy .

returns an error

"ERROR: Directories are not supported [.].  You must provide explicit yaml files."

And deploying the application using individual .yaml files complains about the version specified in the module as the update set the app version to the timestamp.

"The version [1] declared in [/Users/username/app.yaml, /Users/username/app2.yaml] does not match the current gcloud version [20150422t202108]."

Is this a bug or did the config options change? I don't find any differences on the documentation page.

like image 753
theshadowmonkey Avatar asked Apr 23 '15 00:04

theshadowmonkey


3 Answers

The version for deployment is now explicit and never taken from your yaml files. There are two possible cases:

1) If you use the --version flag, whatever version you specify is used. It is an error if this does not match the values in your yaml file.

2) If you do not use the --version flag, a version number is generated for you. This is the error you are seeing because, again, the version does not match that in your yaml file.

The proper solution here is to just remove the version attribute from your yaml (instead of trying to get them to match).

The deploy command also now no longer takes directories as arguments. You specify the yaml files you want to deploy explicitly.

like image 150
Mark Avatar answered Oct 02 '22 07:10

Mark


  1. gcloud preview app command behaviour has changed, see updated documentation page
  2. Can you confirm that version is set to the timestamp in both yaml configs? Try to supply the version manually using --version flag
like image 29
PrecariousJimi Avatar answered Oct 02 '22 06:10

PrecariousJimi


Can you try the following command to deploy the application

gcloud preview app deploy ~/my_app/app.yaml

and for app which have different module

gcloud preview app deploy ~/my_app/app.yaml \

~/my_app/another_module.yaml

like image 32
Shobhit Avatar answered Oct 02 '22 05:10

Shobhit