Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(samples): move awaits into async scope #693

Merged
merged 4 commits into from
Feb 13, 2020

Conversation

stephenplusplus
Copy link
Contributor

The samples were not copy-and-pastable if outside of an async function. This moves any usage of await into a new async function within the sample, then immediately calls it.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 31, 2020
@stephenplusplus stephenplusplus added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 31, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 31, 2020
@stephenplusplus
Copy link
Contributor Author

system tests failing with "Error: 8 RESOURCE_EXHAUSTED: Quota exceeded for quota metric 'Control requests' and limit 'Control requests per minute' of service 'logging.googleapis.com' for consumer 'project_number:1046198160504'."

@stephenplusplus stephenplusplus added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 3, 2020
@codecov
Copy link

codecov bot commented Feb 3, 2020

Codecov Report

Merging #693 into master will decrease coverage by 6.79%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #693     +/-   ##
=========================================
- Coverage    68.3%   61.51%   -6.8%     
=========================================
  Files          36       36             
  Lines       11180    11180             
  Branches      189      111     -78     
=========================================
- Hits         7637     6877    -760     
- Misses       3542     4298    +756     
- Partials        1        5      +4
Impacted Files Coverage Δ
src/middleware/context.ts 50% <0%> (-50%) ⬇️
src/metadata.ts 44.38% <0%> (-45.92%) ⬇️
src/middleware/express/make-http-request.ts 59.52% <0%> (-40.48%) ⬇️
src/middleware/express/make-middleware.ts 61.11% <0%> (-38.89%) ⬇️
src/v2/metrics_service_v2_client.js 65.39% <0%> (-29.01%) ⬇️
src/index.ts 90.2% <0%> (-9.36%) ⬇️
src/common.ts 87.11% <0%> (-9.34%) ⬇️
src/v2/config_service_v2_client.js 85.01% <0%> (-8.15%) ⬇️
src/log.ts 94.96% <0%> (-4.32%) ⬇️
src/v2/logging_service_v2_client.js 91.03% <0%> (-2.99%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f827991...9715178. Read the comment docs.

@stephenplusplus stephenplusplus added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Feb 3, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 3, 2020
@bcoe bcoe merged commit 8ccd960 into googleapis:master Feb 13, 2020
gcf-merge-on-green bot pushed a commit that referenced this pull request Feb 20, 2020
This PR was generated using Autosynth. 🌈

Commits in this repo since last synth:
8ccd960 docs(samples): move awaits into async scope (#693)


<details><summary>Log from Synthtool</summary>

```
synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py.
On branch autosynth
nothing to commit, working tree clean
HEAD detached at FETCH_HEAD
nothing to commit, working tree clean
synthtool > Ensuring dependencies.
synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b
Status: Image is up to date for googleapis/artman:latest
synthtool > Cloning googleapis.
synthtool > Running generator for google/logging/artman_logging.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/js/logging-v2.
synthtool > Replaced '../../package.json' in src/v2/config_service_v2_client.js.
synthtool > Replaced '../../package.json' in src/v2/logging_service_v2_client.js.
synthtool > Replaced '../../package.json' in src/v2/metrics_service_v2_client.js.
.eslintignore
.eslintrc.yml
.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
.jsdoc.js
.kokoro/common.cfg
.kokoro/continuous/node10/common.cfg
.kokoro/continuous/node10/docs.cfg
.kokoro/continuous/node10/lint.cfg
.kokoro/continuous/node10/samples-test.cfg
.kokoro/continuous/node10/system-test.cfg
.kokoro/continuous/node10/test.cfg
.kokoro/continuous/node12/common.cfg
.kokoro/continuous/node12/test.cfg
.kokoro/continuous/node8/common.cfg
.kokoro/continuous/node8/test.cfg
.kokoro/docs.sh
.kokoro/lint.sh
.kokoro/presubmit/node10/common.cfg
.kokoro/presubmit/node10/docs.cfg
.kokoro/presubmit/node10/lint.cfg
.kokoro/presubmit/node10/samples-test.cfg
.kokoro/presubmit/node10/system-test.cfg
.kokoro/presubmit/node10/test.cfg
.kokoro/presubmit/node12/common.cfg
.kokoro/presubmit/node12/test.cfg
.kokoro/presubmit/node8/common.cfg
.kokoro/presubmit/node8/test.cfg
.kokoro/presubmit/windows/common.cfg
.kokoro/presubmit/windows/test.cfg
.kokoro/publish.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
.nycrc
.prettierignore
.prettierrc
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
codecov.yaml
renovate.json
samples/README.md
synthtool > Replaced 'https:\\/\\/cloud\\.google\\.com[\\s\\*]*http:\\/\\/(.*)[\\s\\*]*\\)' in src/v2/doc/google/protobuf/doc_timestamp.js.
synthtool > No replacements made in **/doc/google/protobuf/doc_timestamp.js for pattern toISOString\], maybe replacement is not longer needed?
synthtool > Replaced 'Sum\\[i=1\\.\\.n\\]\\(https:\\/\\/cloud\\.google\\.com\\(x_i - mean\\)\\^2\\)' in src/v2/doc/google/api/doc_distribution.js.
npm WARN npm npm does not support Node.js v12.15.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/

> protobufjs@6.8.8 postinstall /tmpfs/src/git/autosynth/working_repo/node_modules/protobufjs
> node scripts/postinstall


> @google-cloud/logging@7.1.0 prepare /tmpfs/src/git/autosynth/working_repo
> npm run compile

npm WARN npm npm does not support Node.js v12.15.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/

> @google-cloud/logging@7.1.0 compile /tmpfs/src/git/autosynth/working_repo
> tsc -p . && cp -r src/v2 build/src/v2 && cp -r protos build && cp test/*.js build/test

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 687 packages from 1216 contributors and audited 2438 packages in 18.883s
found 0 vulnerabilities

npm WARN npm npm does not support Node.js v12.15.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/

> @google-cloud/logging@7.1.0 fix /tmpfs/src/git/autosynth/working_repo
> gts fix && eslint --fix '**/*.js'

synthtool > Wrote metadata to synth.metadata.

```
</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants