Ryotaro-Sanpe666 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

Respect legacy app.yaml parameters such as application and version #272

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Issue running command [gcloud preview app deploy].

What steps will reproduce the problem?

$ gcloud preview app deploy ./app.yaml
WARNING: The [application] field is specified in file 
[/usr/local/google/home/jlucena/Code/blobstore-demo/app.yaml].  This field is 
not used by gcloud and should be removed.
ERROR: The version [blobstore-upload-demo] declared in 
[/usr/local/google/home/jlucena/Code/blobstore-demo/app.yaml] does not match 
the current gcloud version [20150930t160215].
ERROR: (gcloud.preview.app.deploy) Errors occurred while parsing the App Engine 
app configuration.

What is the expected output? What do you see instead?

I would expect:
$ gcloud preview app deploy ./app.yaml

to behave the same as:
$ appcfg.py update .

Why can't I specify the application in my app.yaml? (Especially if it's the 
same as my gcloud project)? If it conflicts then prompt me which to choose or 
allow me warn me that you are ignoring the one in the file.

Same for version. I don't understand why I can't set the version in the 
app.yaml and need to now specify it via -v (and then if I don't you error that 
it doesn't match the new default generated one?) If I don't specify one on the 
command line use the one in the file. (same as in appcfg).

Please provide any additional information below.

There are all little things but Product Excellence related. If we want people 
to use the newer version and make the experience excellent for existing users 
as well.

Traceback (most recent call last):
  File "calliope/cli.py", line 589, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "calliope/backend.py", line 1221, in Run
    resources = command_instance.Run(args)
  File "appengine/app_commands/deploy.py", line 182, in Run
    args.deployables, project, args.version or util.GenerateVersionId())
  File "appengine/lib/yaml_parsing.py", line 337, in __init__
    raise AppConfigSetLoadError()
AppConfigSetLoadError: Errors occurred while parsing the App Engine app 
configuration.

Installation information:

Google Cloud SDK [HEAD]

Platform: [Linux, x86_64]
Python Version: [2.7.6 (default, Jun 22 2015, 17:58:13)  [GCC 4.8.2]]
Site Packages: [Disabled]

Installation Root: [/usr/local/google/home/jlucena/google-cloud-sdk_dogfood]
Release Channel: [dogfood]
Repository URL: 
[https://cloud-sdk-components.corp.google.com/release_channels/dogfood/latest/co
mponents-2.json]
Installed Components:
  kubectl: []
  app-engine-python: [1.9.26]
  core-nix: [2015.09.01]
  core: [2015.09.30]
  app: [2015.09.30]
  gcloud: [2015.09.30]
  gsutil-nix: [4.14]
  app-engine-python-extras: [1.9.20]
  beta: [2015.09.25]
  gsutil: [4.15]
  bq: [2.0.18]
  kubectl-linux-x86_64: [1.0.6]
  app-engine-java: [1.9.26]
  bq-nix: [2.0.18]
[output truncated]

Original issue reported on code.google.com by jluc...@google.com on 30 Sep 2015 at 11:12

GoogleCodeExporter commented 8 years ago
Greetings, 
and thanks for the feedback.  We decided to remove both the application: and 
version: fields from app.yaml for a variety of reasons.  The move from 
appcfg.py to gcloud is part of bringing AppEngine closer to the rest of Google 
Cloud, so complete backward compatibility isn't something we can always promise 
with the tools.  

----
application:
----
We removed this from app.yaml, as gcloud already provides 2 ways to specify the 
project.  You can specify the project using:

gcloud config set project PROJECT_ID

This will set the project globally.  If you want to set the project on a 
per-command basis, you can specify on the command line:

gcloud preview app deploy ./app.yaml --project="PROJECT_ID"

-----
version:
------

We don't want to encourage devs to set version inside of application code this 
way.  This made it way to easy to override an existing version, which leads to 
a.) a lack of rollback ability and b.) potential downtime.  We want to 
encourage pushing a new version every time you deploy.  If you still want to 
specify an exact version, you can do this from the deploy command:

gcloud preview app deploy ./app.yaml --version="12345"

Hopefully this sheds some light on our decision making here.  Hope this helps!

Original comment by beckw...@google.com on 20 Oct 2015 at 6:41

GoogleCodeExporter commented 8 years ago

Original comment by z...@google.com on 20 Nov 2015 at 11:20