GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GCF: Add Node 8 background function samples · Pull Request #779 · GoogleCloudPlatform/nodejs-docs-samples

Conversation

@ghost

@ghost ghost commented Oct 22, 2018

Copy link
Copy Markdown

Adding helloPromise and helloSynchronous samples for Node 8 to illustrate returning a Promise and a synchronously returning a result.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ericschmidtatwork added 2 commits October 22, 2018 16:33
@ericschmidtatwork
GCF: Add Node 8 background function samples
3a871d9
@ericschmidtatwork
Add necessary dependencies to package.json
ffeb4ba
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 22, 2018
ace-n
ace-n reviewed Oct 23, 2018
View reviewed changes
Comment thread functions/node8/index.js Outdated
* @returns {Promise}
*/
exports.helloPromise = (data) => {
const request = require('request-promise');

@ace-n ace-n Oct 23, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this outside of the function, and use two region tag blocks? e.g:

// [START tag_name]
const library = require('library');
// [END tag_name]

...

// [START tag_name]
exports.useLibrary = () => {
  ...
}
// [END tag_name]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ghost ghost Oct 23, 2018

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I copied this from the original Node 6 sample though: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/functions/background/index.js#L47-L53

Should that one be changed as well?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ace-n

ace-n commented Oct 23, 2018

Copy link
Copy Markdown
Contributor

Also - can you add (unit) tests, or should I do that?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ace-n ace-n added the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 23, 2018
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 23, 2018
@ghost

ghost commented Oct 23, 2018

Copy link
Copy Markdown
Author

@ace-n Can you add unit tests? I can't get the tests running locally.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Nov 1, 2018
ericschmidtatwork and others added 3 commits November 1, 2018 15:56
@ericschmidtatwork Ace Nassri
GCF: Add Node 8 background function samples
c9f7bec
@ericschmidtatwork Ace Nassri
Add necessary dependencies to package.json
5556328
Ace Nassri
Add tests + switch to requestPromiseNative/mocking
fe76a0c
@googlebot

googlebot commented Nov 1, 2018

Copy link
Copy Markdown

CLAs look good, thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Nov 1, 2018
@GoogleCloudPlatform GoogleCloudPlatform deleted a comment from googlebot Nov 1, 2018
ace-n
ace-n approved these changes Nov 1, 2018
View reviewed changes

@ace-n ace-n left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made edits + added tests. LGTM to me if it does to you.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ghost

ghost commented Nov 5, 2018

Copy link
Copy Markdown
Author

Looks good to me, thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Ace Nassri and others added 3 commits November 6, 2018 15:46
Ace Nassri
Merge branch 'master' into node8-background-functions
3b50d25
@fhinkel
Merge branch 'master' into node8-background-functions
e3cbdaf
Ace Nassri
Merge branch 'master' into node8-background-functions
f9ed7e5
@ace-n ace-n added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 8, 2018
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 8, 2018
ericschmidtatwork and others added 2 commits November 9, 2018 12:43
@ericschmidtatwork
Merge changes from remote
5ddce28
Ace Nassri
Merge branch 'master' into node8-background-functions
3db7aea
@ace-n ace-n added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 13, 2018
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 13, 2018
@ace-n ace-n added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 13, 2018
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 13, 2018
Ace Nassri
Fix lint bugs caused by merge
ad4b8fc
@ace-n ace-n added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 13, 2018
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 13, 2018
@ace-n
ace-n merged commit cccf576 into GoogleCloudPlatform:master Nov 13, 2018
@snyk-bot snyk-bot mentioned this pull request Mar 11, 2022
[Snyk] Upgrade googleapis from 20.1.0 to 20.2.0 theWindSweptDev/nodejs-docs-samples#4
Open
This was referenced May 10, 2022
[Snyk] Security upgrade yargs from 6.6.0 to 7.0.0 enterstudio/nodejs-docs-samples#577
Open
[Snyk] Security upgrade yargs from 6.6.0 to 7.0.0 enterstudio/nodejs-docs-samples#579
Open
@snyk-bot snyk-bot mentioned this pull request May 10, 2022
[Snyk] Security upgrade yargs from 6.6.0 to 7.0.0 enterstudio/nodejs-docs-samples#580
Open
This was referenced May 10, 2022
[Snyk] Security upgrade yargs from 6.6.0 to 7.0.0 enterstudio/nodejs-docs-samples#581
Open
[Snyk] Security upgrade yargs from 6.6.0 to 7.0.0 enterstudio/nodejs-docs-samples#582
Open
@snyk-bot snyk-bot mentioned this pull request May 10, 2022
[Snyk] Security upgrade yargs from 6.6.0 to 7.0.0 enterstudio/nodejs-docs-samples#583
Open
This was referenced May 11, 2022
[Snyk] Security upgrade yargs from 6.6.0 to 7.0.0 enterstudio/nodejs-docs-samples#585
Open
[Snyk] Security upgrade yargs from 6.6.0 to 7.0.0 enterstudio/nodejs-docs-samples#586
Open
[Snyk] Security upgrade yargs from 6.6.0 to 7.0.0 enterstudio/nodejs-docs-samples#587
Open
[Snyk] Security upgrade yargs from 6.6.0 to 7.0.0 enterstudio/nodejs-docs-samples#588
Open
[Snyk] Security upgrade yargs from 6.6.0 to 7.0.0 enterstudio/nodejs-docs-samples#589
Open
@snyk-bot snyk-bot mentioned this pull request May 11, 2022
[Snyk] Security upgrade yargs from 6.6.0 to 7.0.0 enterstudio/nodejs-docs-samples#591
Open
ace-n pushed a commit that referenced this pull request Nov 17, 2022
@release-please
chore(main): release 7.0.0 (#788)
7b0bb46
🤖 I have created a release *beep* *boop*
---


## [7.0.0](googleapis/nodejs-translate@v6.3.1...v7.0.0) (2022-06-30)


### ⚠ BREAKING CHANGES

* update library to use Node 12 (#789)

### Features

* support regapic LRO ([#798](googleapis/nodejs-translate#798)) ([9f1ddc1](googleapis/nodejs-translate@9f1ddc1))


### Bug Fixes

* **deps:** update dependency @google-cloud/common to v4 ([#793](googleapis/nodejs-translate#793)) ([a2d079b](googleapis/nodejs-translate@a2d079b))
* **test:** fix language detection test ([#779](googleapis/nodejs-translate#779)) ([b6df5e2](googleapis/nodejs-translate@b6df5e2))


### Build System

* update library to use Node 12 ([#789](googleapis/nodejs-translate#789)) ([3060301](googleapis/nodejs-translate@3060301))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
ace-n pushed a commit that referenced this pull request Nov 17, 2022
@release-please Ace Nassri
chore(main): release 7.0.0 (#788)
ae766cc
🤖 I have created a release *beep* *boop*
---


## [7.0.0](googleapis/nodejs-translate@v6.3.1...v7.0.0) (2022-06-30)


### ⚠ BREAKING CHANGES

* update library to use Node 12 (#789)

### Features

* support regapic LRO ([#798](googleapis/nodejs-translate#798)) ([9f1ddc1](googleapis/nodejs-translate@9f1ddc1))


### Bug Fixes

* **deps:** update dependency @google-cloud/common to v4 ([#793](googleapis/nodejs-translate#793)) ([a2d079b](googleapis/nodejs-translate@a2d079b))
* **test:** fix language detection test ([#779](googleapis/nodejs-translate#779)) ([b6df5e2](googleapis/nodejs-translate@b6df5e2))


### Build System

* update library to use Node 12 ([#789](googleapis/nodejs-translate#789)) ([3060301](googleapis/nodejs-translate@3060301))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
ace-n pushed a commit that referenced this pull request Nov 17, 2022
@release-please Ace Nassri
chore(main): release 7.0.0 (#788)
9dba9c7
🤖 I have created a release *beep* *boop*
---


## [7.0.0](googleapis/nodejs-translate@v6.3.1...v7.0.0) (2022-06-30)


### ⚠ BREAKING CHANGES

* update library to use Node 12 (#789)

### Features

* support regapic LRO ([#798](googleapis/nodejs-translate#798)) ([9f1ddc1](googleapis/nodejs-translate@9f1ddc1))


### Bug Fixes

* **deps:** update dependency @google-cloud/common to v4 ([#793](googleapis/nodejs-translate#793)) ([a2d079b](googleapis/nodejs-translate@a2d079b))
* **test:** fix language detection test ([#779](googleapis/nodejs-translate#779)) ([b6df5e2](googleapis/nodejs-translate@b6df5e2))


### Build System

* update library to use Node 12 ([#789](googleapis/nodejs-translate#789)) ([3060301](googleapis/nodejs-translate@3060301))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
ace-n pushed a commit that referenced this pull request Nov 17, 2022
@release-please Ace Nassri
chore(main): release 7.0.0 (#788)
644ed8c
🤖 I have created a release *beep* *boop*
---


## [7.0.0](googleapis/nodejs-translate@v6.3.1...v7.0.0) (2022-06-30)


### ⚠ BREAKING CHANGES

* update library to use Node 12 (#789)

### Features

* support regapic LRO ([#798](googleapis/nodejs-translate#798)) ([9f1ddc1](googleapis/nodejs-translate@9f1ddc1))


### Bug Fixes

* **deps:** update dependency @google-cloud/common to v4 ([#793](googleapis/nodejs-translate#793)) ([a2d079b](googleapis/nodejs-translate@a2d079b))
* **test:** fix language detection test ([#779](googleapis/nodejs-translate#779)) ([b6df5e2](googleapis/nodejs-translate@b6df5e2))


### Build System

* update library to use Node 12 ([#789](googleapis/nodejs-translate#789)) ([3060301](googleapis/nodejs-translate@3060301))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
renovate-bot pushed a commit to renovate-bot/nodejs-docs-samples that referenced this pull request Nov 17, 2022
@release-please Ace Nassri
chore(main): release 7.0.0 (GoogleCloudPlatform#788)
22c190b
🤖 I have created a release *beep* *boop*
---


## [7.0.0](googleapis/nodejs-translate@v6.3.1...v7.0.0) (2022-06-30)


### ⚠ BREAKING CHANGES

* update library to use Node 12 (GoogleCloudPlatform#789)

### Features

* support regapic LRO ([GoogleCloudPlatform#798](googleapis/nodejs-translate#798)) ([9f1ddc1](googleapis/nodejs-translate@9f1ddc1))


### Bug Fixes

* **deps:** update dependency @google-cloud/common to v4 ([GoogleCloudPlatform#793](googleapis/nodejs-translate#793)) ([a2d079b](googleapis/nodejs-translate@a2d079b))
* **test:** fix language detection test ([GoogleCloudPlatform#779](googleapis/nodejs-translate#779)) ([b6df5e2](googleapis/nodejs-translate@b6df5e2))


### Build System

* update library to use Node 12 ([GoogleCloudPlatform#789](googleapis/nodejs-translate#789)) ([3060301](googleapis/nodejs-translate@3060301))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
@leejh3224 leejh3224 mentioned this pull request Jun 20, 2023
[Snyk] Security upgrade @google-cloud/debug-agent from 3.2.0 to 4.2.1 leejh3224/nodejs-docs-samples#574
Open
@ninadhatkar ninadhatkar mentioned this pull request Jun 21, 2023
[Snyk] Security upgrade @google-cloud/debug-agent from 2.1.3 to 4.2.1 ninadhatkar/nodejs-docs-samples#327
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@ace-n @googlebot @kokoro-team @ericschmidtatwork @fhinkel
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.