GithubHelp home page GithubHelp logo

googleapis / nodejs-functions Goto Github PK

View Code? Open in Web Editor NEW
16.0 41.0 8.0 1.17 MB

This repository is deprecated. All of its content and history has been moved to googleapis/google-cloud-node.

License: Apache License 2.0

nodejs-functions's Introduction

THIS REPOSITORY IS DEPRECATED. ALL OF ITS CONTENT AND HISTORY HAS BEEN MOVED TO GOOGLE-CLOUD-NODE

Google Cloud Platform logo

release level npm version

Functions client for Node.js

A comprehensive list of changes in each version may be found in the CHANGELOG.

Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.

Table of contents:

Quickstart

Before you begin

  1. Select or create a Cloud Platform project.
  2. Enable the Google Cloud Functions API.
  3. Set up authentication with a service account so you can access the API from your local workstation.

Installing the client library

npm install @google-cloud/functions

Using the client library

// Imports the Google Cloud client library

// remove this line after package is released
// eslint-disable-next-line node/no-missing-require
const {CloudFunctionsServiceClient} = require('@google-cloud/functions');

// TODO(developer): replace with your prefered project ID.
// const projectId = 'my-project'

// Creates a client
const client = new CloudFunctionsServiceClient();

// project = 'my-project/*/locations/*' // Get the functions for a project.
async function listFunctions() {
  const [functions] = await client.listFunctions({
    parent: `projects/${projectId}/locations/-`,
  });
  console.info(functions);
}
listFunctions();

Samples

Samples are in the samples/ directory. Each sample's README.md has instructions for running its sample.

Sample Source Code Try it
Quickstart source code Open in Cloud Shell

The Google Cloud Functions Node.js Client API Reference documentation also contains samples.

Supported Node.js Versions

Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js. If you are using an end-of-life version of Node.js, we recommend that you update as soon as possible to an actively supported LTS version.

Google's client libraries support legacy versions of Node.js runtimes on a best-efforts basis with the following warnings:

  • Legacy versions are not tested in continuous integration.
  • Some security patches and features cannot be backported.
  • Dependencies cannot be kept up-to-date.

Client libraries targeting some end-of-life versions of Node.js are available, and can be installed through npm dist-tags. The dist-tags follow the naming convention legacy-(version). For example, npm install @google-cloud/functions@legacy-8 installs client libraries for versions compatible with Node.js 8.

Versioning

This library follows Semantic Versioning.

This library is considered to be stable. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against stable libraries are addressed with the highest priority.

More Information: Google Cloud Platform Launch Stages

Contributing

Contributions welcome! See the Contributing Guide.

Please note that this README.md, the samples/README.md, and a variety of configuration files in this repository (including .nycrc and tsconfig.json) are generated from a central template. To edit one of these files, make an edit to its templates in directory.

License

Apache Version 2.0

See LICENSE

nodejs-functions's People

Contributors

alexander-fenster avatar bcoe avatar dinagraves avatar fhinkel avatar gcf-owl-bot[bot] avatar google-cloud-policy-bot[bot] avatar justinbeckwith avatar parthea avatar release-please[bot] avatar renovate-bot avatar sofisl avatar surferjeffatgoogle avatar yoshi-automation avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodejs-functions's Issues

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Synthesis failed for nodejs-functions

Hello! Autosynth couldn't regenerate nodejs-functions. 💔

Here's the output from running synth.py:

ed https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl
  Saved ./Jinja2-2.11.2-py2.py3-none-any.whl
Collecting MarkupSafe==1.1.1 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting protobuf==3.13.0 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 6))
  Using cached https://files.pythonhosted.org/packages/30/79/510974552cebff2ba04038544799450defe75e96ea5f1675dbf72cc8744f/protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting pypandoc==1.5 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 7))
  Using cached https://files.pythonhosted.org/packages/d6/b7/5050dc1769c8a93d3ec7c4bd55be161991c94b8b235f88bf7c764449e708/pypandoc-1.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmpfs/tmp/tmp_pktrayg/setuptools-tmp/setuptools/__init__.py", line 6, in <module>
        import distutils.core
      File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/_distutils_hack/__init__.py", line 82, in create_module
        return importlib.import_module('._distutils', 'setuptools')
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named 'setuptools._distutils'
    
    ----------------------------------------
 (Command "python setup.py egg_info" failed with error code 1 in /tmpfs/tmp/pip-build-xalmgoad/pypandoc/
)
ERROR: no such package '@gapic_generator_python_pip_deps//': pip_import failed: Collecting click==7.1.2 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl
  Saved ./click-7.1.2-py2.py3-none-any.whl
Collecting google-api-core==1.22.1 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/e0/2d/7c6c75013105e1d2b6eaa1bf18a56995be1dbc673c38885aea31136e9918/google_api_core-1.22.1-py2.py3-none-any.whl
  Saved ./google_api_core-1.22.1-py2.py3-none-any.whl
Collecting googleapis-common-protos==1.52.0 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/03/74/3956721ea1eb4bcf7502a311fdaa60b85bd751de4e57d1943afe9b334141/googleapis_common_protos-1.52.0-py2.py3-none-any.whl
  Saved ./googleapis_common_protos-1.52.0-py2.py3-none-any.whl
Collecting jinja2==2.11.2 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl
  Saved ./Jinja2-2.11.2-py2.py3-none-any.whl
Collecting MarkupSafe==1.1.1 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting protobuf==3.13.0 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 6))
  Using cached https://files.pythonhosted.org/packages/30/79/510974552cebff2ba04038544799450defe75e96ea5f1675dbf72cc8744f/protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting pypandoc==1.5 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 7))
  Using cached https://files.pythonhosted.org/packages/d6/b7/5050dc1769c8a93d3ec7c4bd55be161991c94b8b235f88bf7c764449e708/pypandoc-1.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmpfs/tmp/tmp_pktrayg/setuptools-tmp/setuptools/__init__.py", line 6, in <module>
        import distutils.core
      File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/_distutils_hack/__init__.py", line 82, in create_module
        return importlib.import_module('._distutils', 'setuptools')
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named 'setuptools._distutils'
    
    ----------------------------------------
 (Command "python setup.py egg_info" failed with error code 1 in /tmpfs/tmp/pip-build-xalmgoad/pypandoc/
)
INFO: Elapsed time: 2.019s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)

Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/nodejs-functions/synth.py", line 25, in <module>
    library = gapic.node_library(library, version)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 52, in node_library
    return self._generate_code(service, version, "nodejs", **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 183, in _generate_code
    shell.run(bazel_run_args)
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
    raise exc
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
    encoding="utf-8",
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=240', 'build', '//google/cloud/functions/v1:functions-v1-nodejs']' returned non-zero exit status 1.
2020-08-31 02:32:06,153 autosynth [ERROR] > Synthesis failed
2020-08-31 02:32:06,153 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at a01f4e8 build: track flaky tests for "nightly", add new secrets for tagging (#20)
2020-08-31 02:32:06,157 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-08-31 02:32:06,161 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/synth.cpython-36.pyc
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 690, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 539, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 670, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 375, in synthesize_loop
    has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 273, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Synthesis failed for nodejs-functions

Hello! Autosynth couldn't regenerate nodejs-functions. 💔

Here's the output from running synth.py:

[email protected] prepare /home/kbuilder/.cache/synthtool/nodejs-functions
> npm run compile-protos && npm run compile


> @google-cloud/[email protected] compile-protos /home/kbuilder/.cache/synthtool/nodejs-functions
> compileProtos src


> @google-cloud/[email protected] compile /home/kbuilder/.cache/synthtool/nodejs-functions
> tsc -p . && cp -r protos build/

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 647 packages in 13.573s

57 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

/home/kbuilder/.nvm/versions/node/v14.15.0/lib/node_modules/@google-cloud/functions -> /home/kbuilder/.cache/synthtool/nodejs-functions
/home/kbuilder/.cache/synthtool/nodejs-functions/samples/node_modules/@google-cloud/functions -> /home/kbuilder/.nvm/versions/node/v14.15.0/lib/node_modules/@google-cloud/functions -> /home/kbuilder/.cache/synthtool/nodejs-functions
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

removed 1 package and audited 138 packages in 1.809s

17 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

2020-11-07 03:00:28,067 synthtool [DEBUG] > Running fix...
DEBUG:synthtool:Running fix...

> @google-cloud/[email protected] fix /home/kbuilder/.cache/synthtool/nodejs-functions
> gts fix

version: 14
2020-11-07 03:00:36,292 synthtool [DEBUG] > Compiling protos...
DEBUG:synthtool:Compiling protos...
2020-11-07 03:00:40,832 synthtool [DEBUG] > Post-processing completed
DEBUG:synthtool:Post-processing completed
2020-11-07 03:00:43,833 synthtool [INFO] > Removing obsolete file package-lock.json.620595561...
INFO:synthtool:Removing obsolete file package-lock.json.620595561...
2020-11-07 03:00:43,833 synthtool [INFO] > Removing obsolete file __pycache__/synth.cpython-37.pyc...
INFO:synthtool:Removing obsolete file __pycache__/synth.cpython-37.pyc...
2020-11-07 03:00:43,833 synthtool [INFO] > Removing obsolete file samples/package-lock.json.2747171955...
INFO:synthtool:Removing obsolete file samples/package-lock.json.2747171955...
2020-11-07 03:00:43,834 synthtool [DEBUG] > Wrote metadata to synth.metadata.
DEBUG:synthtool:Wrote metadata to synth.metadata.
2020-11-07 03:00:43,894 autosynth [INFO] > Changed files:
2020-11-07 03:00:43,894 autosynth [INFO] > D __pycache__/synth.cpython-37.pyc
 M synth.metadata
2020-11-07 03:00:43,894 autosynth [DEBUG] > Running: git log 24738f112727b56fc180b2ad3280456ccabd1af8 -1 --no-decorate --pretty=%s
2020-11-07 03:00:43,898 autosynth [DEBUG] > Running: git log 24738f112727b56fc180b2ad3280456ccabd1af8 -1 --no-decorate --pretty=%b%n%nSource-Author: %an <%ae>%nSource-Date: %ad
2020-11-07 03:00:43,901 autosynth [DEBUG] > Running: git add -A
2020-11-07 03:00:43,905 autosynth [DEBUG] > Running: git status --porcelain
2020-11-07 03:00:43,909 autosynth [DEBUG] > Running: git commit -m fix: do not modify options object, use defaultScopes

Regenerated the library using
[gapic-generator-typescript](https://github.com/googleapis/gapic-generator-typescript)
v1.2.1.

Source-Author: Alexander Fenster <[email protected]>
Source-Date: Fri Nov 6 15:42:23 2020 -0800
Source-Repo: googleapis/nodejs-functions
Source-Sha: 24738f112727b56fc180b2ad3280456ccabd1af8
Source-Link: https://github.com/googleapis/nodejs-functions/commit/24738f112727b56fc180b2ad3280456ccabd1af8
[autosynth-synthtool-0 7837826] fix: do not modify options object, use defaultScopes
 2 files changed, 10 insertions(+), 5 deletions(-)
 delete mode 100644 __pycache__/synth.cpython-37.pyc
2020-11-07 03:00:43,916 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 7837826 fix: do not modify options object, use defaultScopes
2020-11-07 03:00:43,919 autosynth [DEBUG] > Running: git checkout autosynth-synthtool
Switched to branch 'autosynth-synthtool'
2020-11-07 03:00:43,924 autosynth [DEBUG] > Running: git diff HEAD..autosynth-synthtool-0 -- . :(exclude)synth.metadata
2020-11-07 03:00:43,927 autosynth [DEBUG] > Running: git diff HEAD autosynth-synthtool-0
2020-11-07 03:00:43,930 autosynth [DEBUG] > Running: git apply /tmpfs/tmp/tmph420qytx/autosynth-synthtool-0.patch
error: cannot apply binary patch to '__pycache__/synth.cpython-37.pyc' without full index line
error: __pycache__/synth.cpython-37.pyc: patch does not apply
2020-11-07 03:00:43,933 autosynth [ERROR] > Command '['git', 'apply', '/tmpfs/tmp/tmph420qytx/autosynth-synthtool-0.patch']' returned non-zero exit status 1.
2020-11-07 03:00:44,111 autosynth [DEBUG] > Running: git checkout 24738f112727b56fc180b2ad3280456ccabd1af8
Note: checking out '24738f112727b56fc180b2ad3280456ccabd1af8'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 24738f1 fix: do not modify options object, use defaultScopes (#38)
2020-11-07 03:00:44,116 autosynth [DEBUG] > Running: git checkout 1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b
HEAD is now at 1f1148d chore: add blacken to template (#842)
2020-11-07 03:00:44,121 autosynth [DEBUG] > Running: git branch -f autosynth-0
2020-11-07 03:00:44,125 autosynth [DEBUG] > Running: git checkout autosynth-0
Switched to branch 'autosynth-0'
2020-11-07 03:00:44,129 autosynth [DEBUG] > Running: git merge --ff-only autosynth-synthtool-0
Updating 24738f1..7837826
Fast-forward
 __pycache__/synth.cpython-37.pyc | Bin 988 -> 0 bytes
 synth.metadata                   |  15 ++++++++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)
 delete mode 100644 __pycache__/synth.cpython-37.pyc
2020-11-07 03:00:44,136 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 7837826 fix: do not modify options object, use defaultScopes
2020-11-07 03:00:44,140 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-11-07 03:00:44,144 autosynth [DEBUG] > Running: git diff HEAD..autosynth-0 -- . :(exclude)synth.metadata
2020-11-07 03:00:44,148 autosynth [DEBUG] > Running: git diff HEAD autosynth-0
2020-11-07 03:00:44,151 autosynth [DEBUG] > Running: git apply /tmpfs/tmp/tmph420qytx/autosynth-0.patch
error: cannot apply binary patch to '__pycache__/synth.cpython-37.pyc' without full index line
error: __pycache__/synth.cpython-37.pyc: patch does not apply
2020-11-07 03:00:44,154 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/synth.cpython-36.pyc
Removing build/
Removing node_modules/
Removing package-lock.json
Removing samples/node_modules/
Removing samples/package-lock.json
Traceback (most recent call last):
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 92, in synthesize_loop
    synthesize_inner_loop(fork, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 149, in synthesize_inner_loop
    toolbox.patch_merge_version(0, comment)
  File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 182, in patch_merge_version
    git.patch_merge(sub_branch, patch_file_path)
  File "/tmpfs/src/github/synthtool/autosynth/git.py", line 151, in patch_merge
    executor.check_call(["git", "apply", patch_file_path], cwd=git_repo_dir)
  File "/tmpfs/src/github/synthtool/autosynth/executor.py", line 29, in check_call
    subprocess.check_call(command, **args)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'apply', '/tmpfs/tmp/tmph420qytx/autosynth-synthtool-0.patch']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 354, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 189, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 334, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 100, in synthesize_loop
    synthesize_loop_single_pr(toolbox, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 126, in synthesize_loop_single_pr
    synthesize_inner_loop(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 149, in synthesize_inner_loop
    toolbox.patch_merge_version(0, comment)
  File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 182, in patch_merge_version
    git.patch_merge(sub_branch, patch_file_path)
  File "/tmpfs/src/github/synthtool/autosynth/git.py", line 151, in patch_merge
    executor.check_call(["git", "apply", patch_file_path], cwd=git_repo_dir)
  File "/tmpfs/src/github/synthtool/autosynth/executor.py", line 29, in check_call
    subprocess.check_call(command, **args)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'apply', '/tmpfs/tmp/tmph420qytx/autosynth-0.patch']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Make it easier to deploy unauthenticated functions.

At the moment, to create an unauthenticated function, I have to first deploy using createFunction and then use the run library at some indeterminate time after to do this:

run.setIamPolicy({ resource: payload.request.name, policy: { bindings: [{ "role": "roles/run.invoker", "members": [ "allUsers" ] }] } })

Which has meant setting up an audit log trigger with the above.

It should be easier to do this - the gcloud cli for example provides an --allow-unauthenticated flag to do the above step automatically in the function deploy pipeline.

Request message serialization failure

  1. Is this a client library issue or a product issue?
    Client library issue

  2. Did someone already solve this?
    No :(

  3. Do you have a support contract?
    No :(

If the support paths suggested above still do not result in a resolution, please provide the following details.

Environment details

  • OS: OS X 10.15.6
  • Node.js version: v12.12.0
  • npm version: 7.0.9
  • @google-cloud/functions version: ^1.1.0

Intro:

I am trying to programmatically create a cloud function. However, the function object I am passing gives me the error

{"code":13,"details":"Request message serialization failure: .google.cloud.functions.v1.CloudFunction.timeout: object expected","metadata":{"internalRepr":{},"options":{}}}

I copy/pasted my object into the 'Try this API' widget in the API docs and it works. I understand using the API and client library are not a 1:1 match in terms of passing arguments but the documentation matches. Either this is an error on my part or a bug.

Proof of success in "Try it out"
image

My Code:

const {CloudFunctionsServiceClient} = require('@google-cloud/functions');
const client = new CloudFunctionsServiceClient();
let myFunction = {
  "name": "projects/senior-design-293721/locations/us-central1/functions/helloWord",
  "sourceUploadUrl": "https://storage.googleapis.com/gcf-upload-us-central1-06164526-5e4b-41ba-98e5-7c2d9a3e7260/4320182d-ea72-4c4a-bfb3-06ecd70ba4b5.zip?GoogleAccessId=service-824226399055@gcf-admin-robot.iam.gserviceaccount.com&Expires=1606527088&Signature=SO%2BSMHRh1iIzyhqQdP4ZA5X4jK5GzAwAVP5ZU%2BaIN1C20Fj3DpwXWY%2BsvVxgQe1m3JlhKu0egfC2mhueUL1j%2BkobjqLRdikg7A6daU0f0tJEUiP6wSZPbmm6zv2Rv9mJXC4inwbR3WwomUHbo%2ByXNJ9F7mHzFDSetJ9rJ5pvkCRbzkPJ%2FLDMgipMz7m7JxDxkQCb8l2l1bkef6zEsoS3DPgTrxKhwuW614ztDzuwenpXeTI295Yo9KusZMvj8juEBfyXszMe3SVFfGRVEOcC8SyQcpkBOtLoU01a1s2oOu5Jr1S%2BpamClKwmIWkfa1NdFVAAGG%2BloP4mhoRP85Ae3g%3D%3D",
  "description": "test",
  "maxInstances": 1000,
  "timeout": "300s",
  "entryPoint": "",
  "httpsTrigger": {},
  "labels": {},
  "network": "",
  "runtime": "nodejs10",
  "serviceAccountEmail": "",
  "vpcConnector": ""
}



let request = {
  location: location,
  function: myFunction

}
const [operation] = await client.createFunction(request);
const [response] = await operation.promise();`

Steps to reproduce

  1. Follow Quickstart from Google Cloud Functions: Node.js Client Reference
  2. Use code noted above to try and create a cloud function. Remember to replace location and name with your respective GCP project info.

Synthesis failed for nodejs-functions

Hello! Autosynth couldn't regenerate nodejs-functions. 💔

Here's the output from running synth.py:

ed https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl
  Saved ./Jinja2-2.11.2-py2.py3-none-any.whl
Collecting MarkupSafe==1.1.1 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting protobuf==3.13.0 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 6))
  Using cached https://files.pythonhosted.org/packages/30/79/510974552cebff2ba04038544799450defe75e96ea5f1675dbf72cc8744f/protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting pypandoc==1.5 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 7))
  Using cached https://files.pythonhosted.org/packages/d6/b7/5050dc1769c8a93d3ec7c4bd55be161991c94b8b235f88bf7c764449e708/pypandoc-1.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmpfs/tmp/tmpkhqfer88/setuptools-tmp/setuptools/__init__.py", line 6, in <module>
        import distutils.core
      File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/_distutils_hack/__init__.py", line 82, in create_module
        return importlib.import_module('._distutils', 'setuptools')
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named 'setuptools._distutils'
    
    ----------------------------------------
 (Command "python setup.py egg_info" failed with error code 1 in /tmpfs/tmp/pip-build-p1aiwbd3/pypandoc/
)
ERROR: no such package '@gapic_generator_python_pip_deps//': pip_import failed: Collecting click==7.1.2 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl
  Saved ./click-7.1.2-py2.py3-none-any.whl
Collecting google-api-core==1.22.1 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/e0/2d/7c6c75013105e1d2b6eaa1bf18a56995be1dbc673c38885aea31136e9918/google_api_core-1.22.1-py2.py3-none-any.whl
  Saved ./google_api_core-1.22.1-py2.py3-none-any.whl
Collecting googleapis-common-protos==1.52.0 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/03/74/3956721ea1eb4bcf7502a311fdaa60b85bd751de4e57d1943afe9b334141/googleapis_common_protos-1.52.0-py2.py3-none-any.whl
  Saved ./googleapis_common_protos-1.52.0-py2.py3-none-any.whl
Collecting jinja2==2.11.2 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl
  Saved ./Jinja2-2.11.2-py2.py3-none-any.whl
Collecting MarkupSafe==1.1.1 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting protobuf==3.13.0 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 6))
  Using cached https://files.pythonhosted.org/packages/30/79/510974552cebff2ba04038544799450defe75e96ea5f1675dbf72cc8744f/protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting pypandoc==1.5 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 7))
  Using cached https://files.pythonhosted.org/packages/d6/b7/5050dc1769c8a93d3ec7c4bd55be161991c94b8b235f88bf7c764449e708/pypandoc-1.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmpfs/tmp/tmpkhqfer88/setuptools-tmp/setuptools/__init__.py", line 6, in <module>
        import distutils.core
      File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/_distutils_hack/__init__.py", line 82, in create_module
        return importlib.import_module('._distutils', 'setuptools')
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named 'setuptools._distutils'
    
    ----------------------------------------
 (Command "python setup.py egg_info" failed with error code 1 in /tmpfs/tmp/pip-build-p1aiwbd3/pypandoc/
)
INFO: Elapsed time: 2.277s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)

Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/nodejs-functions/synth.py", line 25, in <module>
    library = gapic.node_library(library, version)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 52, in node_library
    return self._generate_code(service, version, "nodejs", **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 183, in _generate_code
    shell.run(bazel_run_args)
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
    raise exc
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
    encoding="utf-8",
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=240', 'build', '//google/cloud/functions/v1:functions-v1-nodejs']' returned non-zero exit status 1.
2020-09-01 02:32:54,324 autosynth [ERROR] > Synthesis failed
2020-09-01 02:32:54,325 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at a01f4e8 build: track flaky tests for "nightly", add new secrets for tagging (#20)
2020-09-01 02:32:54,329 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-09-01 02:32:54,334 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/synth.cpython-36.pyc
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 690, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 539, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 670, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 375, in synthesize_loop
    has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 273, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

📦 pack-n-play test: TypeScript code failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: fa123c1
buildURL: Build Status, Sponge
status: failed

Test output
Process 189 exited with code 2.
Error: Process 189 exited with code 2.
    at ChildProcess. (node_modules/pack-n-play/build/src/utils.js:48:22)
        -> /workspace/node_modules/pack-n-play/src/utils.ts:62:11
    at maybeClose (internal/child_process.js:1022:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

Getting an error on import

Got this error at runtime when trying to import the client:

TypeError: Cannot read property 'Reader' of undefined
    at /home/asonawalla/github-repos/repo-automation-bots/packages/monitoring-system/data-processor/node_modules/@google-cloud/functions/build/protos/protos.js:28:29
    at /home/asonawalla/github-repos/repo-automation-bots/packages/monitoring-system/data-processor/node_modules/@google-cloud/functions/build/protos/protos.js:22:26
    at Object.<anonymous> (/home/asonawalla/github-repos/repo-automation-bots/packages/monitoring-system/data-processor/node_modules/@google-cloud/functions/build/protos/protos.js:24:3)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/home/asonawalla/github-repos/repo-automation-bots/packages/monitoring-system/data-processor/node_modules/@google-cloud/functions/build/src/index.js:26:16)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/home/asonawalla/github-repos/repo-automation-bots/packages/monitoring-system/data-processor/build/src/data-processors/cloud-functions-data-processor.js:19:21)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/home/asonawalla/github-repos/repo-automation-bots/packages/monitoring-system/data-processor/build/src/data-processor-factory.js:20:42)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/home/asonawalla/github-repos/repo-automation-bots/packages/monitoring-system/data-processor/build/src/task-service.js:22:34)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/home/asonawalla/github-repos/repo-automation-bots/packages/monitoring-system/data-processor/build/test/unit/data-processor-factory.spec.js:22:24)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.exports.requireOrImport (/home/asonawalla/github-repos/repo-automation-bots/packages/monitoring-system/data-processor/node_modules/mocha/lib/esm-utils.js:20:12)
    at Object.exports.loadFilesAsync (/home/asonawalla/github-repos/repo-automation-bots/packages/monitoring-system/data-processor/node_modules/mocha/lib/esm-utils.js:33:34)
    at async singleRun (/home/asonawalla/github-repos/repo-automation-bots/packages/monitoring-system/data-processor/node_modules/mocha/lib/cli/run-helpers.js:156:3)

Here's the code that I'm trying to run:

import {DataProcessor, ProcessorOptions} from './data-processor-abstract';
import {
  CloudFunctionsServiceClient as CloudFunctionClient
} from '@google-cloud/functions';                                         // < -- error thrown right here

export interface CloudFunctionsProcessorOptions extends ProcessorOptions {
  projectId: string;
  location: string;
}

export class CloudFunctionsProcessor extends DataProcessor {
  private projectId: string;
  private location: string;

  constructor(options: CloudFunctionsProcessorOptions) {
    super(options);
    this.functionsClient = new CloudFunctionClient();
    this.projectId = options.projectId;
    this.location = options.location;
  }

  public async collectAndProcess(): Promise<void> {
    throw new Error('Method not implemented.');
  }

  private getAllGCFNames(): string[] {
    throw new Error('Method not implemented.');
  }
}

The error seems to be popping up right when it's importing the dependencies, before any of the code even runs.

Any idea what might be going wrong?

This could totally be me using this library incorrectly

Synthesis failed for nodejs-functions

Hello! Autosynth couldn't regenerate nodejs-functions. 💔

Here's the output from running synth.py:

r/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
 - <builtin>
 - /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:42:1
DEBUG: Rule 'gapic_generator_python' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "8d11f06b408ac5f1c01da3ca17f3a75dc008831509c5c1a4f24f9bde37792a57"
DEBUG: Call stack for the definition of repository 'gapic_generator_python' which is a http_archive (rule definition at /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
 - <builtin>
 - /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:224:1
DEBUG: Rule 'com_googleapis_gapic_generator_go' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "12bfed7873f085093cd60615bd113178ecf36396af0c2ca25e6cd4d4bebdd198"
DEBUG: Call stack for the definition of repository 'com_googleapis_gapic_generator_go' which is a http_archive (rule definition at /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
 - <builtin>
 - /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:261:1
DEBUG: Rule 'gapic_generator_typescript' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "ca322b5e7b0d03b3cc44a90444e3a7f944c9ba3345f0505ee48c8e715d19dd95"
DEBUG: Call stack for the definition of repository 'gapic_generator_typescript' which is a http_archive (rule definition at /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
 - <builtin>
 - /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:280:1
DEBUG: Rule 'gapic_generator_csharp' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "40ddae63d2729ef5ccbd8b60123327ea200ce9400d0629238193ff530dcaea18"
DEBUG: Call stack for the definition of repository 'gapic_generator_csharp' which is a http_archive (rule definition at /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
 - <builtin>
 - /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:318:1
DEBUG: Rule 'bazel_skylib' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "1dde365491125a3db70731e25658dfdd3bc5dbdfd11b840b3e987ecf043c7ca0"
DEBUG: Call stack for the definition of repository 'bazel_skylib' which is a http_archive (rule definition at /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
 - <builtin>
 - /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:35:1
Analyzing: target //google/cloud/functions/v1:functions-v1-nodejs (1 packages loaded, 0 targets configured)
INFO: Call stack for the definition of repository 'npm' which is a yarn_install (rule definition at /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:411:16):
 - <builtin>
 - /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/build_bazel_rules_nodejs/index.bzl:87:5
 - /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:293:1
ERROR: An error occurred during the fetch of repository 'npm':
   yarn_install failed: yarn install v1.19.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info If you think this is a bug, please open a bug report with the information provided in "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_typescript/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
 (error An unexpected error occurred: "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.1.2.tgz: Request failed \"404 Not Found\"".
)
ERROR: /home/kbuilder/.cache/synthtool/googleapis/google/cloud/functions/v1/BUILD.bazel:245:1: //google/cloud/functions/v1:functions_nodejs_gapic depends on @gapic_generator_typescript//:protoc_plugin in repository @gapic_generator_typescript which failed to fetch. no such package '@npm//@bazel/typescript': yarn_install failed: yarn install v1.19.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info If you think this is a bug, please open a bug report with the information provided in "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_typescript/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
 (error An unexpected error occurred: "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.1.2.tgz: Request failed \"404 Not Found\"".
)
ERROR: Analysis of target '//google/cloud/functions/v1:functions-v1-nodejs' failed; build aborted: no such package '@npm//@bazel/typescript': yarn_install failed: yarn install v1.19.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info If you think this is a bug, please open a bug report with the information provided in "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_typescript/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
 (error An unexpected error occurred: "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.1.2.tgz: Request failed \"404 Not Found\"".
)
INFO: Elapsed time: 1.008s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 3 targets configured)
FAILED: Build did NOT complete successfully (1 packages loaded, 3 targets configured)

2020-08-06 04:15:36,493 synthtool [DEBUG] > Wrote metadata to synth.metadata.
DEBUG:synthtool:Wrote metadata to synth.metadata.
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/nodejs-functions/synth.py", line 25, in <module>
    library = gapic.node_library(library, version)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 52, in node_library
    return self._generate_code(service, version, "nodejs", **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 183, in _generate_code
    shell.run(bazel_run_args)
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
    raise exc
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
    encoding="utf-8",
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=240', 'build', '//google/cloud/functions/v1:functions-v1-nodejs']' returned non-zero exit status 1.
2020-08-06 04:15:36,539 autosynth [ERROR] > Synthesis failed
2020-08-06 04:15:36,540 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 8b706c7 chore: release 1.0.1 (#7)
2020-08-06 04:15:36,545 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-08-06 04:15:36,549 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/synth.cpython-36.pyc
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 690, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 539, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 670, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 375, in synthesize_loop
    has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 273, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Not showing error messages from Google API

Environment details

  • OS: macOS
  • Node.js version: 14
  • @google-cloud/functions: 1.1.3

Steps to reproduce

  1. Execute any function such as client.createFunction(...) with invalid arguments
  2. You will see an error similar to this: Error: 3 INVALID_ARGUMENT: The request has errors
    But the actual useful error message from the API is being hidden.

Synthesis failed for nodejs-functions

Hello! Autosynth couldn't regenerate nodejs-functions. 💔

Here's the output from running synth.py:

[7m    �[0m �[91m                         ~�[0m

�[96msrc/v1/cloud_functions_service_client.ts�[0m:�[93m1417�[0m:�[93m28�[0m - �[91merror�[0m�[90m TS1136: �[0mProperty assignment expected.

�[7m1417�[0m     if (!this._terminated) {
�[7m    �[0m �[91m                           ~�[0m

�[96msrc/v1/cloud_functions_service_client.ts�[0m:�[93m1424�[0m:�[93m3�[0m - �[91merror�[0m�[90m TS1128: �[0mDeclaration or statement expected.

�[7m1424�[0m   }
�[7m    �[0m �[91m  ~�[0m

�[96msrc/v1/cloud_functions_service_client.ts�[0m:�[93m1425�[0m:�[93m1�[0m - �[91merror�[0m�[90m TS1128: �[0mDeclaration or statement expected.

�[7m1425�[0m }
�[7m    �[0m �[91m~�[0m

�[96mtest/gapic_cloud_functions_service_v1.ts�[0m:�[93m149�[0m:�[93m16�[0m - �[91merror�[0m�[90m TS2339: �[0mProperty 'close' does not exist on type 'CloudFunctionsServiceClient'.

�[7m149�[0m         client.close();
�[7m   �[0m �[91m               ~~~~~�[0m

�[96mtest/gapic_cloud_functions_service_v1.ts�[0m:�[93m1450�[0m:�[93m90�[0m - �[91merror�[0m�[90m TS2554: �[0mExpected 2 arguments, but got 3.

�[7m1450�[0m                 const result = client.cloudFunctionPath("projectValue", "locationValue", "functionValue");
�[7m    �[0m �[91m                                                                                         ~~~~~~~~~~~~~~~�[0m

�[96mtest/gapic_cloud_functions_service_v1.ts�[0m:�[93m1457�[0m:�[93m39�[0m - �[91merror�[0m�[90m TS2339: �[0mProperty 'matchProjectFromCloudFunctionName' does not exist on type 'CloudFunctionsServiceClient'.

�[7m1457�[0m                 const result = client.matchProjectFromCloudFunctionName(fakePath);
�[7m    �[0m �[91m                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~�[0m

�[96mtest/gapic_cloud_functions_service_v1.ts�[0m:�[93m1464�[0m:�[93m39�[0m - �[91merror�[0m�[90m TS2339: �[0mProperty 'matchLocationFromCloudFunctionName' does not exist on type 'CloudFunctionsServiceClient'.

�[7m1464�[0m                 const result = client.matchLocationFromCloudFunctionName(fakePath);
�[7m    �[0m �[91m                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~�[0m

�[96mtest/gapic_cloud_functions_service_v1.ts�[0m:�[93m1471�[0m:�[93m39�[0m - �[91merror�[0m�[90m TS2339: �[0mProperty 'matchFunctionFromCloudFunctionName' does not exist on type 'CloudFunctionsServiceClient'.

�[7m1471�[0m                 const result = client.matchFunctionFromCloudFunctionName(fakePath);
�[7m    �[0m �[91m                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~�[0m

�[96mtest/gapic_cloud_functions_service_v1.ts�[0m:�[93m1495�[0m:�[93m39�[0m - �[91merror�[0m�[90m TS2339: �[0mProperty 'locationPath' does not exist on type 'CloudFunctionsServiceClient'.

�[7m1495�[0m                 const result = client.locationPath("projectValue", "locationValue");
�[7m    �[0m �[91m                                      ~~~~~~~~~~~~�[0m

�[96mtest/gapic_cloud_functions_service_v1.ts�[0m:�[93m1502�[0m:�[93m39�[0m - �[91merror�[0m�[90m TS2339: �[0mProperty 'matchProjectFromLocationName' does not exist on type 'CloudFunctionsServiceClient'.

�[7m1502�[0m                 const result = client.matchProjectFromLocationName(fakePath);
�[7m    �[0m �[91m                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~�[0m

�[96mtest/gapic_cloud_functions_service_v1.ts�[0m:�[93m1509�[0m:�[93m39�[0m - �[91merror�[0m�[90m TS2339: �[0mProperty 'matchLocationFromLocationName' does not exist on type 'CloudFunctionsServiceClient'.

�[7m1509�[0m                 const result = client.matchLocationFromLocationName(fakePath);
�[7m    �[0m �[91m                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~�[0m


Found 61 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @google-cloud/[email protected] compile: `tsc -p . && cp -r protos build/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @google-cloud/[email protected] compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kbuilder/.npm/_logs/2020-07-25T14_34_55_897Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @google-cloud/[email protected] prepare: `npm run compile-protos && npm run compile`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @google-cloud/[email protected] prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kbuilder/.npm/_logs/2020-07-25T14_34_55_924Z-debug.log
2020-07-25 07:34:55,940 synthtool [ERROR] > Failed executing npm install:

None
ERROR:synthtool:Failed executing npm install:

None
2020-07-25 07:34:55,957 synthtool [DEBUG] > Wrote metadata to synth.metadata.
DEBUG:synthtool:Wrote metadata to synth.metadata.
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/nodejs-functions/synth.py", line 32, in <module>
    node.postprocess_gapic_library()
  File "/tmpfs/src/github/synthtool/synthtool/languages/node.py", line 193, in postprocess_gapic_library
    install(hide_output=hide_output)
  File "/tmpfs/src/github/synthtool/synthtool/languages/node.py", line 167, in install
    shell.run(["npm", "install"], hide_output=hide_output)
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
    raise exc
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
    encoding="utf-8",
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['npm', 'install']' returned non-zero exit status 1.
2020-07-25 07:34:56,005 autosynth [ERROR] > Synthesis failed
2020-07-25 07:34:56,005 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at fc544c2 chore: release 1.0.0
2020-07-25 07:34:56,020 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-07-25 07:34:56,038 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/synth.cpython-36.pyc
Removing node_modules/
Traceback (most recent call last):
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 367, in synthesize_loop
    synthesize_inner_loop(fork, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 657, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 506, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 637, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 375, in synthesize_loop
    synthesize_loop_single_pr(toolbox, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 401, in synthesize_loop_single_pr
    synthesize_inner_loop(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

GA release of Nodejs Functions

Package name: @google-cloud/functions
Current release: beta
Proposed release: GA

Instructions

Check the lists below, adding tests / documentation as required. Once all the "required" boxes are ticked, please create a release and close this issue.

Required

  • 28 days elapsed since last beta release with new API surface
  • Server API is GA
  • Package API is stable, and we can commit to backward compatibility
  • All dependencies are GA

Optional

  • Most common / important scenarios have descriptive samples
  • Public manual methods have at least one usage sample each (excluding overloads)
  • Per-API README includes a full description of the API
  • Per-API README contains at least one “getting started” sample using the most common API scenario
  • Manual code has been reviewed by API producer
  • Manual code has been reviewed by a DPE responsible for samples
  • 'Client Libraries' page is added to the product documentation in 'APIs & Reference' section of the product's documentation on Cloud Site

Thanks!

Quickstart: should run quickstart failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: cccbd44
buildURL: Build Status, Sponge
status: failed

Test output
Command failed: node ./quickstart.js long-door-651
16 UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.

Error: Command failed: node ./quickstart.js long-door-651
16 UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.

at checkExecSyncError (child_process.js:635:11)
at Object.execSync (child_process.js:671:15)
at execSync (test/quickstart.test.js:27:28)
at Context.<anonymous> (test/quickstart.test.js:40:20)
at processImmediate (internal/timers.js:461:21)</pre></details>

Synthesis failed for nodejs-functions

Hello! Autosynth couldn't regenerate nodejs-functions. 💔

Please investigate and fix this issue within 5 business days. While it remains broken,
this library cannot be updated with changes to the nodejs-functions API, and the library grows
stale.

See https://github.com/googleapis/synthtool/blob/master/autosynth/TroubleShooting.md
for trouble shooting tips.

Here's the output from running synth.py:

azel will I run?
bazel 3.0.0
2021-04-08 04:17:49,994 synthtool [DEBUG] > Generating code for: //google/cloud/functions/v1:functions-v1-nodejs.
DEBUG:synthtool:Generating code for: //google/cloud/functions/v1:functions-v1-nodejs.
2021-04-08 04:17:54,397 synthtool [SUCCESS] > Generated code into /tmpfs/tmp/tmpw3wacdo0.
SUCCESS:synthtool:Generated code into /tmpfs/tmp/tmpw3wacdo0.
2021-04-08 04:17:54,407 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/synthtool
DEBUG:synthtool:Using precloned repo /home/kbuilder/.cache/synthtool/synthtool
2021-04-08 04:17:54,424 synthtool [INFO] > successfully generate `src/index.ts`
INFO:synthtool:successfully generate `src/index.ts`
.eslintignore
.eslintrc.json
.gitattributes
.github/CODEOWNERS
.github/ISSUE_TEMPLATE/bug_report.md
.github/ISSUE_TEMPLATE/feature_request.md
.github/ISSUE_TEMPLATE/support_request.md
.github/PULL_REQUEST_TEMPLATE.md
.github/release-please.yml
.github/workflows/ci.yaml
.kokoro/.gitattributes
.kokoro/common.cfg
.kokoro/continuous/node10/common.cfg
.kokoro/continuous/node10/docs.cfg
.kokoro/continuous/node10/test.cfg
.kokoro/continuous/node12/common.cfg
.kokoro/continuous/node12/lint.cfg
.kokoro/continuous/node12/samples-test.cfg
.kokoro/continuous/node12/system-test.cfg
.kokoro/continuous/node12/test.cfg
.kokoro/docs.sh
.kokoro/lint.sh
.kokoro/populate-secrets.sh
.kokoro/presubmit/node10/common.cfg
.kokoro/presubmit/node12/common.cfg
.kokoro/presubmit/node12/samples-test.cfg
.kokoro/presubmit/node12/system-test.cfg
.kokoro/presubmit/node12/test.cfg
.kokoro/publish.sh
.kokoro/release/docs-devsite.cfg
.kokoro/release/docs-devsite.sh
.kokoro/release/docs.cfg
.kokoro/release/docs.sh
.kokoro/release/publish.cfg
.kokoro/samples-test.sh
.kokoro/system-test.sh
.kokoro/test.bat
.kokoro/test.sh
.kokoro/trampoline.sh
.kokoro/trampoline_v2.sh
.mocharc.js
.nycrc
.prettierignore
.prettierrc.js
.trampolinerc
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
api-extractor.json
renovate.json
samples/README.md
2021-04-08 04:17:54,545 synthtool [INFO] > Replaced 'function:string' in src/v1/cloud_functions_service_client.ts.
INFO:synthtool:Replaced 'function:string' in src/v1/cloud_functions_service_client.ts.
2021-04-08 04:17:54,546 synthtool [INFO] > Replaced 'function: function' in src/v1/cloud_functions_service_client.ts.
INFO:synthtool:Replaced 'function: function' in src/v1/cloud_functions_service_client.ts.
2021-04-08 04:17:54,546 synthtool [DEBUG] > Post-processing GAPIC library...
DEBUG:synthtool:Post-processing GAPIC library...
2021-04-08 04:17:54,546 synthtool [DEBUG] > Installing dependencies...
DEBUG:synthtool:Installing dependencies...
npm WARN deprecated [email protected]: Breaking change found in this patch version
npm WARN deprecated [email protected]: Use cheerio-select instead

> [email protected] postinstall /home/kbuilder/.cache/synthtool/nodejs-functions/node_modules/protobufjs
> node scripts/postinstall


> @google-cloud/[email protected] prepare /home/kbuilder/.cache/synthtool/nodejs-functions
> npm run compile-protos && npm run compile


> @google-cloud/[email protected] compile-protos /home/kbuilder/.cache/synthtool/nodejs-functions
> compileProtos src

installing semver@^7.1.2
installing tmp@^0.2.0
installing uglify-js@^3.7.7
installing espree@^7.0.0
installing escodegen@^2.0.0
installing estraverse@^5.1.0

> @google-cloud/[email protected] compile /home/kbuilder/.cache/synthtool/nodejs-functions
> tsc -p . && cp -r protos build/

�[96mnode_modules/@types/sinon/index.d.ts�[0m:�[93m778�[0m:�[93m36�[0m - �[91merror�[0m�[90m TS2694: �[0mNamespace '"/home/kbuilder/.cache/synthtool/nodejs-functions/node_modules/@sinonjs/fake-timers/types/fake-timers-src"' has no exported member 'TimerId'.

�[7m778�[0m     type SinonTimerId = FakeTimers.TimerId;
�[7m   �[0m �[91m                                   ~~~~~~~�[0m

�[96mnode_modules/@types/sinon/index.d.ts�[0m:�[93m780�[0m:�[93m39�[0m - �[91merror�[0m�[90m TS2694: �[0mNamespace '"/home/kbuilder/.cache/synthtool/nodejs-functions/node_modules/@sinonjs/fake-timers/types/fake-timers-src"' has no exported member 'InstalledMethods'.

�[7m780�[0m     type SinonFakeTimers = FakeTimers.InstalledMethods &
�[7m   �[0m �[91m                                      ~~~~~~~~~~~~~~~~�[0m

�[96mnode_modules/@types/sinon/index.d.ts�[0m:�[93m781�[0m:�[93m20�[0m - �[91merror�[0m�[90m TS2694: �[0mNamespace '"/home/kbuilder/.cache/synthtool/nodejs-functions/node_modules/@sinonjs/fake-timers/types/fake-timers-src"' has no exported member 'NodeClock'.

�[7m781�[0m         FakeTimers.NodeClock &
�[7m   �[0m �[91m                   ~~~~~~~~~�[0m

�[96mnode_modules/@types/sinon/index.d.ts�[0m:�[93m782�[0m:�[93m20�[0m - �[91merror�[0m�[90m TS2694: �[0mNamespace '"/home/kbuilder/.cache/synthtool/nodejs-functions/node_modules/@sinonjs/fake-timers/types/fake-timers-src"' has no exported member 'BrowserClock'.

�[7m782�[0m         FakeTimers.BrowserClock & {
�[7m   �[0m �[91m                   ~~~~~~~~~~~~�[0m


Found 4 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @google-cloud/[email protected] compile: `tsc -p . && cp -r protos build/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @google-cloud/[email protected] compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kbuilder/.npm/_logs/2021-04-08T11_18_21_988Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @google-cloud/[email protected] prepare: `npm run compile-protos && npm run compile`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @google-cloud/[email protected] prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kbuilder/.npm/_logs/2021-04-08T11_18_22_057Z-debug.log
2021-04-08 04:18:22,170 synthtool [ERROR] > Failed executing npm install:

None
ERROR:synthtool:Failed executing npm install:

None
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/nodejs-functions/synth.py", line 34, in <module>
    node.postprocess_gapic_library()
  File "/tmpfs/src/github/synthtool/synthtool/languages/node.py", line 248, in postprocess_gapic_library
    install(hide_output=hide_output)
  File "/tmpfs/src/github/synthtool/synthtool/languages/node.py", line 171, in install
    shell.run(["npm", "install"], hide_output=hide_output)
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
    raise exc
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
    encoding="utf-8",
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['npm', 'install']' returned non-zero exit status 1.
2021-04-08 04:18:22,223 autosynth [ERROR] > Synthesis failed
2021-04-08 04:18:22,223 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at b0cb949 chore(deps): update dependency sinon to v10 (#59)
2021-04-08 04:18:22,243 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2021-04-08 04:18:22,261 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/synth.cpython-36.pyc
Removing node_modules/
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 356, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 191, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 336, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 68, in synthesize_loop
    has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
  File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 259, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.