7

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.

Mark
  • 2,265
  • 15
  • 13
theshadowmonkey
  • 689
  • 8
  • 26

3 Answers3

6

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.

Mark
  • 2,265
  • 15
  • 13
  • Thanks Mark, yeah removing the version number from the files and using a --version flag solved my problem. And now I am not able to deploy a full directory and I need to specify each .yaml file separately. – theshadowmonkey Apr 23 '15 at 19:56
  • Hi Mark, can you also add the part about not able to deploy complete directories anymore to this answer so that it will be complete? – theshadowmonkey Apr 27 '15 at 02:50
  • An exact command line example would be helpful... and, please stop changing things this often :-( – Jonny Apr 28 '15 at 02:08
  • 1
    @Jonny gcloud preview app deploy app.yaml deploy2.yaml --version=1 Here if this is your first deploy you can have the version to be anything you like. And where it is app.yaml, deploy.yaml, it is just the list of yaml files to be included when deploying your application. – theshadowmonkey Apr 28 '15 at 03:38
  • @Mark can you please also point me to a place where there are changes to the gcloud version changes like release notes? – theshadowmonkey Apr 28 '15 at 03:39
  • @theshadowmonkey thanks I got it working. Just a side note. Where are major changes like this notified to us users? I found out about this change because suddenly the command didn't work anymore. I would rather been notified by an important looking email, push notification or something ;-) – Jonny Apr 28 '15 at 03:40
  • @Jonny I wish so too. Whenever there is some change, it'd be nice to have some sort of communication. – theshadowmonkey Apr 28 '15 at 03:43
3
  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
PrecariousJimi
  • 1,503
  • 8
  • 20
  • The version didnt get set in the .yaml files, but when I try deploying, it already got set on the command line as a global setting. – theshadowmonkey Apr 23 '15 at 14:30
1

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

Shobhit
  • 488
  • 2
  • 11