whelmed / la-ace-find-seller

A demo application for the Linux Academy Google Cloud Certified Associate Cloud Engineer exam prep course
47 stars 421 forks source link

Failing Frontend App deploy #9

Open cosmin8905 opened 4 years ago

cosmin8905 commented 4 years ago

After troubleshooting a couple of issue throughout the lab, I landed on a complete blocker on the last step of the lab.

Essentially I got every script to run perfectly up to the "la-ace-find-seller/frontend/cloud/deploy.sh" I've localized the problem to be with the gcloud app deploy command. Really not sure what is causing the error here. The only change made in the app.yaml file was the APP_TOPIC variable which was set to match my "project_settings" PUB_SUB_TOPIC" value EE00683-MacBook-Pro:cloud cosmin$ gcloud pubsub topics list name: projects/playground-s-11-f9c98e/topics/playground-s-11-f9c98e-items

Any help would be very appreciated!


EE00683-MacBook-Pro:cloud cosmin$ gcloud app deploy ../app/app.yaml -q --verbosity=debug
DEBUG: Running [gcloud.app.deploy] with arguments: [--quiet: "True", --verbosity: "debug", DEPLOYABLES:1: "[u'../app/app.yaml']"]
DEBUG: Loading runtimes experiment config from [gs://runtime-builders/experiments.yaml]
INFO: Reading [<googlecloudsdk.api_lib.storage.storage_util.ObjectReference object at 0x10fecd6d0>]
DEBUG: 
Traceback (most recent call last):
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/runtime_builders.py", line 269, in _Read
    with contextlib.closing(storage_client.ReadObject(object_)) as f:
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/storage/storage_api.py", line 302, in ReadObject
    object_=object_ref, err=http_exc.HttpException(err)))
BadFileException: Could not read [<googlecloudsdk.api_lib.storage.storage_util.ObjectReference object at 0x10fecd6d0>]. Please retry: HTTPError 404: No such object: runtime-builders/experiments.yaml
DEBUG: Experiment config file could not be read. Unable to read the runtimes experiment config: [gs://runtime-builders/experiments.yaml], error: Could not read [<googlecloudsdk.api_lib.storage.storage_util.ObjectReference object at 0x10fecd6d0>]. Please retry: HTTPError 404: No such object: runtime-builders/experiments.yaml
Traceback (most recent call last):
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/surface/app/deploy.py", line 126, in _ServerSideExperimentEnabled
    runtimes_builder_root)
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/runtime_builders.py", line 524, in LoadFromURI
    .format(uri, e))
ExperimentsError: Unable to read the runtimes experiment config: [gs://runtime-builders/experiments.yaml], error: Could not read [<googlecloudsdk.api_lib.storage.storage_util.ObjectReference object at 0x10fecd6d0>]. Please retry: HTTPError 404: No such object: runtime-builders/experiments.yaml
INFO: Executing staging command: [/Users/cosmin/Downloads/google-cloud-sdk/platform/google_appengine/go-app-stager /Users/cosmin/Google Drive/Google Cloud Cosmin/Projects/la-ace-find-seller/frontend/app/app.yaml /Users/cosmin/Google Drive/Google Cloud Cosmin/Projects/la-ace-find-seller/frontend/app /var/folders/37/4mc0jxgd33ld3025_5ncfl280000gp/T/tmp82uggX/tmpn0JtSm]

DEBUG: Executing command: [u'/Users/cosmin/Downloads/google-cloud-sdk/platform/google_appengine/go-app-stager', u'/Users/cosmin/Google Drive/Google Cloud Cosmin/Projects/la-ace-find-seller/frontend/app/app.yaml', u'/Users/cosmin/Google Drive/Google Cloud Cosmin/Projects/la-ace-find-seller/frontend/app', '/var/folders/37/4mc0jxgd33ld3025_5ncfl280000gp/T/tmp82uggX/tmpn0JtSm']
INFO: ------------------------------------ STDOUT ------------------------------------
------------------------------------ STDERR ------------------------------------
2020/01/17 18:15:53 invalid runtime value go
--------------------------------------------------------------------------------

DEBUG: (gcloud.app.deploy) Staging command [/Users/cosmin/Downloads/google-cloud-sdk/platform/google_appengine/go-app-stager /Users/cosmin/Google Drive/Google Cloud Cosmin/Projects/la-ace-find-seller/frontend/app/app.yaml /Users/cosmin/Google Drive/Google Cloud Cosmin/Projects/la-ace-find-seller/frontend/app /var/folders/37/4mc0jxgd33ld3025_5ncfl280000gp/T/tmp82uggX/tmpn0JtSm] failed with return code [1].

------------------------------------ STDOUT ------------------------------------
------------------------------------ STDERR ------------------------------------
2020/01/17 18:15:53 invalid runtime value go
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 981, in Execute
    resources = calliope_command.Run(cli=self, args=args)
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 807, in Run
    resources = command_instance.Run(args)
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/surface/app/deploy.py", line 110, in Run
    default_strategy=flex_image_build_option_default))
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 574, in RunDeploy
    args.deployables, stager, deployables.GetPathMatchers())
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deployables.py", line 366, in GetDeployables
    service = Service.FromPath(path, stager, path_matchers)
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deployables.py", line 102, in FromPath
    service = matcher(path, stager)
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deployables.py", line 140, in ServiceYamlMatcher
    service_info.env)
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/staging.py", line 441, in Stage
    return command.Run(self.staging_area, descriptor, app_dir)
  File "/Users/cosmin/Downloads/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/staging.py", line 190, in Run
    raise StagingCommandFailedError(args, return_code, message)
StagingCommandFailedError: Staging command [/Users/cosmin/Downloads/google-cloud-sdk/platform/google_appengine/go-app-stager /Users/cosmin/Google Drive/Google Cloud Cosmin/Projects/la-ace-find-seller/frontend/app/app.yaml /Users/cosmin/Google Drive/Google Cloud Cosmin/Projects/la-ace-find-seller/frontend/app /var/folders/37/4mc0jxgd33ld3025_5ncfl280000gp/T/tmp82uggX/tmpn0JtSm] failed with return code [1].

------------------------------------ STDOUT ------------------------------------
------------------------------------ STDERR ------------------------------------
2020/01/17 18:15:53 invalid runtime value go
--------------------------------------------------------------------------------

ERROR: (gcloud.app.deploy) Staging command [/Users/cosmin/Downloads/google-cloud-sdk/platform/google_appengine/go-app-stager /Users/cosmin/Google Drive/Google Cloud Cosmin/Projects/la-ace-find-seller/frontend/app/app.yaml /Users/cosmin/Google Drive/Google Cloud Cosmin/Projects/la-ace-find-seller/frontend/app /var/folders/37/4mc0jxgd33ld3025_5ncfl280000gp/T/tmp82uggX/tmpn0JtSm] failed with return code [1].

------------------------------------ STDOUT ------------------------------------
------------------------------------ STDERR ------------------------------------
2020/01/17 18:15:53 invalid runtime value go
--------------------------------------------------------------------------------

EE00683-MacBook-Pro:cloud cosmin$ ```
mattuLA commented 4 years ago

Hi, Matt here from Linux Academy. We have a temporary fix in place to fix the app engine issues you have been experiencing that will update necessary files after they have been cloned from this github repo. Steps below:

  1. Navigate to your la-ace-find-seller folder.
  2. In terminal: run the following command to download and execute a script that will update the necessary files to bring App Engine's deploy files up to current standards. Be sure to run this command only once, or some of the affected files will be 'double pasted' and not correctly formatted: gsutil cp https://storage.cloud.google.com/la-gcloud-course-resources/cloud-engineer/gca-fixes.sh . && source gca-fixes.sh You should now be able to deploy your app engine application. Please let me know if this works or not. Thanks.