modxevil / google-cloud-sdk

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

gcloud preview app deploy shows misleading error when Go compilation fails. #471

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
gcloud preview app deploy app.yaml

What is the expected output? What do you see instead?
The expected output is the Go compilation error (see below in debug output).

Here's the DEBUG output (most of this doesn't show normally):
Updating module [default]...-DEBUG: Operation 
[apps/roger-web-client/operations/01ff93e1-0e39-49af-b4a6-b1785191e343] 
complete. Result: {
    "metadata": {
        "target": "apps/roger-web-client/modules/default/versions/20160114t164054",
        "operationType": "create_version",
        "user": "blixt@47center.com",
        "insertTime": "2016-01-14T21:41:06.074Z",
        "@type": "type.googleapis.com/google.appengine.v1beta4.OperationMetadata",
        "endTime": "2016-01-14T21:41:38.754Z",
        "method": "google.appengine.v1beta4.Versions.CreateVersion"
    },
    "done": true,
    "name": "apps/roger-web-client/operations/01ff93e1-0e39-49af-b4a6-b1785191e343",
    "error": {
        "message": "Deployment contains files that cannot be compiled: Compile failed:\n2016/01/14 13:41:37 go-app-builder: build timing: 2\u00d76g (117ms total), 0\u00d76l (0 total)\n2016/01/14 13:41:37 go-app-builder: failed running 6g: exit status 1\n\nserver/alexa.go:10: can't find import: \"golang.org/x/net/context\"\n",
        "code": 13
    }
}
Updating module [default]...failed.
DEBUG: 'ascii' codec can't encode character u'\xd7' in position 118: ordinal 
not in range(128)
Traceback (most recent call last):
  File "/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 643, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 1401, in Run
    resources = command_instance.Run(args)
  File "/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/preview/app/deploy.py", line 387, in Run
    images.get(module))
  File "/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 90, in DeployModule
    return operations.WaitForOperation(self.client.apps_operations, operation)
  File "/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/api/operations.py", line 66, in WaitForOperation
    encoding.MessageToPyValue(completed_operation.error)))
  File "/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/api/requests.py", line 69, in ExtractErrorMessage
    message=error_details.get('message', '')))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xd7' in position 
118: ordinal not in range(128)
ERROR: gcloud crashed (UnicodeEncodeError): 'ascii' codec can't encode 
character u'\xd7' in position 118: ordinal not in range(128)

What is the output of 'gcloud info'?
Google Cloud SDK [92.0.0]

Platform: [Mac OS X, x86_64]
Python Version: [2.7.11 (default, Dec  5 2015, 14:44:53)  [GCC 4.2.1 Compatible 
Apple LLVM 7.0.0 (clang-700.1.76)]]
Python Location: 
[/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Resour
ces/Python.app/Contents/MacOS/Python]
Site Packages: [Disabled]

Installation Root: 
[/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk]
Installed Components:
  core: [2016.01.12]
  app-engine-python: [1.9.30]
  core-nix: [2015.11.24]
  app-engine-php: [ ]
  app-engine-java: [1.9.30]
  gcloud: []
  gsutil-nix: [4.15]
  app-engine-python-extras: [1.9.21]
  gsutil: [4.16]
  bq: [2.0.18]
  app-engine-php-darwin: [2015.11.16]
  bq-nix: [2.0.18]
  kubectl: []
  kubectl-darwin-x86_64: [1.1.3]
System PATH: 
[/Users/blixt/src/torch/install/bin:/opt/homebrew-cask/Caskroom/google-cloud-sdk
/latest/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X
11/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/blixt/Do
wnloads/dart/dart-sdk/bin:/Users/blixt/.rvm/bin:/usr/local/go/bin:/Users/blixt/g
o:/Users/blixt/go_appengine/goroot/bin:/Users/blixt/go_appengine:/Users/blixt/an
droid/sdk/tools:/Users/blixt/android/sdk/platform-tools:/Users/blixt/android/sdk
/build-tools/19.1.0:/Users/blixt/anaconda2/bin]
Cloud SDK on PATH: [True]

WARNING: There are old versions of the Google Cloud Platform tools on your 
system PATH.
  /Users/blixt/go_appengine/dev_appserver.py

Installation Properties: 
[/opt/homebrew-cask/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/properties
]
User Config Directory: [/Users/blixt/.config/gcloud]
User Properties: [/Users/blixt/.config/gcloud/properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]

Account: [blixt@47center.com]
Project: [roger-wtf]

Current Properties:
  [core]
    project: [roger-wtf]
    account: [blixt@47center.com]
    disable_usage_reporting: [True]
  [app]
    suppress_change_warning: [true]

Logs Directory: [/Users/blixt/.config/gcloud/logs]
Last Log File: [/Users/blixt/.config/gcloud/logs/2016.01.14/17.32.37.159209.log]

Original issue reported on code.google.com by m...@blixt.org on 15 Jan 2016 at 1:29

GoogleCodeExporter commented 8 years ago
Thank you for reporting this. We will track this and get it fixed soon.

Original comment by vil...@google.com on 15 Jan 2016 at 4:05

GoogleCodeExporter commented 8 years ago
Issue 475 has been merged into this issue.

Original comment by vil...@google.com on 19 Jan 2016 at 3:59

GoogleCodeExporter commented 8 years ago
I'm running into the same issue.  I don't understand why 
"golang.org/x/net/context" can't be imported.

Original comment by ib...@google.com on 26 Jan 2016 at 7:19

GoogleCodeExporter commented 8 years ago
@#3: My solution to the import error was to stop using gcloud deploy and go 
back to using the old appcfg.py script.

See this issue I created for the compilation issue: 
https://code.google.com/p/googleappengine/issues/detail?id=12670

Original comment by m...@blixt.org on 26 Jan 2016 at 2:50

GoogleCodeExporter commented 8 years ago
@#3: Thanks for the info.  

I'm using Jenkins to deploy to AppEngine and I am running the 
"bitnami-jenkins".  I tried using appcfg.py or goapp and got the following 
error (or related appcfg.py not found):

/tmp/hudson3160291730849678757.sh: 2: /tmp/hudson3160291730849678757.sh: goapp: 
not found.

So then I found this: 
https://community.bitnami.com/t/push-to-deploy-with-bitnami-jenkins-image/38931 
detailing that the Docker containers don't contain the Google App Engine SDK so 
I can't use goapp or appcfg.py unless I install it.

Though I feel like I shouldn't have to, I did the steps in the URL and got 
Jenkins to see the GAE SDK.

However, it would get to a step where the output read "Getting current resource 
limits." and it would just sit there and never move onto the next step.

I feel like the glcoud command shouldn't have this problem should just deploy.

Any thoughts?

if #1/#2 wants any other info or can help resolve this issue, I'm ibjhb@ 
internally.  Please feel free to reach out, I'll be around all day.

Original comment by ib...@google.com on 26 Jan 2016 at 3:41

GoogleCodeExporter commented 8 years ago
Is there a workaround for the original issue reported in this ticket using 
gcloud? I am having the same problem

Original comment by iasona...@gmail.com on 14 Feb 2016 at 4:52