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 — core: ending streams manually is unnecessary, unless they errored by stephenplusplus · Pull Request #809 · googleapis/google-cloud-node

Conversation

@stephenplusplus

@stephenplusplus stephenplusplus commented Aug 18, 2015

Copy link
Copy Markdown
Contributor

Fixes #805

This goes over all of our streams and only manually ends or destroys them when it's because of an error. It turns out, calling destroy was akin to smashing a wrecking ball through a user's pipeline. end is usually preferred for its gracefulness, but we don't appear to need either. Streams end up "ending" themselves when they're ready, and they usually know best when that is.

Sorry, something went wrong.

Uh oh!

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

All reactions
@stephenplusplus
core: ending streams manually is unnecessary, unless they errored
35613b0
@stephenplusplus stephenplusplus added the core label Aug 18, 2015
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 18, 2015
@stephenplusplus

stephenplusplus commented Aug 18, 2015

Copy link
Copy Markdown
Contributor Author

@leibale would you mind trying this out?

rm -rf node_modules
npm install stephenplusplus/gcloud-node#spp--core-only-end-streams-with-error
All reactions

Sorry, something went wrong.

Uh oh!

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

@stephenplusplus stephenplusplus mentioned this pull request Aug 18, 2015
Error in storage - calling transform done when ws.length != 0 #805
Closed
@leibale

leibale commented Aug 18, 2015

Copy link
Copy Markdown
Contributor

listen to end, finish or complete?

All reactions

Sorry, something went wrong.

Uh oh!

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

@leibale

leibale commented Aug 18, 2015

Copy link
Copy Markdown
Contributor

it's working with finish :)

All reactions

Sorry, something went wrong.

Uh oh!

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

@stephenplusplus

stephenplusplus commented Aug 18, 2015

Copy link
Copy Markdown
Contributor Author

Yep, it should work like:

file.createReadStream()
  .on('complete', function() {}) // File fully read
  .pipe(fs.createWriteStream('./file'))
  .on('finish', function() {}) // File fully written
All reactions

Sorry, something went wrong.

Uh oh!

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

@leibale

leibale commented Aug 18, 2015

Copy link
Copy Markdown
Contributor

working like a charm, thanks :)

pls add @leibale when you merge this to production

All reactions

Sorry, something went wrong.

Uh oh!

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

callmehiphop added a commit that referenced this pull request Aug 18, 2015
@callmehiphop
Merge pull request #809 from stephenplusplus/spp--core-only-end-strea…
1e00f7f
…ms-with-error

core: ending streams manually is unnecessary, unless they errored
@callmehiphop
callmehiphop merged commit 1e00f7f into googleapis:master Aug 18, 2015
@callmehiphop

callmehiphop commented Aug 18, 2015

Copy link
Copy Markdown
Contributor

Sweet, thanks!

@leibale this has been merged in but we still need to do a release. I think we have one coming very soon!

All reactions

Sorry, something went wrong.

Uh oh!

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

@stephenplusplus stephenplusplus mentioned this pull request Aug 26, 2015
Refactor Storage read and write streams #824
Merged
@sofisl sofisl mentioned this pull request Nov 10, 2022
migrate code from googleapis/nodejs-translate #3520
Merged
4 tasks
sofisl pushed a commit that referenced this pull request Nov 10, 2022
@gcf-owl-bot
fix: better support for fallback mode (#809)
ec38559
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 468790263

Source-Link: googleapis/googleapis@873ab45

Source-Link: googleapis/googleapis-gen@cb6f37a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9
@release-please release-please Bot mentioned this pull request Nov 10, 2022
chore: release main #3529
Merged
@sofisl sofisl mentioned this pull request Jan 17, 2023
migrate code from googleapis/nodejs-vision #3860
Merged
4 tasks
sofisl pushed a commit that referenced this pull request Jan 17, 2023
@fhinkel
chore: add dev dependencies for cloud-rad ref docs (#809)
9a903e9
miguelvelezsa pushed a commit that referenced this pull request Jul 23, 2025
@alexander-fenster
fix: use @grpc/grpc-js v1.0.0, pass grpc options properly (#809)
997a1d6
* fix: use @grpc/grpc-js v1.0.0, pass grpc options properly

* docs: pr feedback
miguelvelezsa pushed a commit that referenced this pull request Jul 23, 2025
@alexander-fenster
fix: strip grpc. prefix for grpc-gcp options (#814)
8266eb6
gRPC options are weird. Regular gRPC options are prefixed `grpc.` and should be passed down as `grpc.*`, while the three known `grpc-gcp` options should be passed without a prefix.

This partially rolls back my refactor in #809 to make `grpc-gcp` work.
GautamSharda pushed a commit that referenced this pull request Jan 14, 2026
@release-please
chore(main): release 6.0.0 (#809)
fc2edd9
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
GautamSharda pushed a commit that referenced this pull request Jan 20, 2026
@release-please
chore(main): release 6.0.0 (#809)
126a3d8
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
GautamSharda pushed a commit that referenced this pull request Jan 21, 2026
@release-please
chore(main): release 6.0.0 (#809)
22d6939
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
@GautamSharda GautamSharda mentioned this pull request Jan 21, 2026
chore: migrate code from googleapis/nodejs-logging-winston #7024
Closed
4 tasks
GautamSharda pushed a commit that referenced this pull request Feb 2, 2026
@release-please
chore(main): release 6.0.0 (#809)
a38a48d
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Feb 3, 2026
@JustinBeckwith
chore: update CODEOWNERS (#809)
bbe6eb3
GautamSharda pushed a commit that referenced this pull request Feb 3, 2026
@release-please
chore(main): release 6.0.0 (#809)
1f5c9d0
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Feb 25, 2026
Benjamin E. Coe
fix(deps): update @google-cloud/common with fixes for http (#809)
8d961ff
sofisl pushed a commit that referenced this pull request Feb 26, 2026
@olavloite
fix: fixed wrong return type of Database.run(..) (#810)
1a727b6
The Database.run(query) method declared a return type of Promise<Row[]>,
while its actual return type was Promise<[Row[], ResultSetStats]>.

Fixes #809
GautamSharda pushed a commit that referenced this pull request Mar 5, 2026
@alexander-fenster
fix: linting and formatting (#809)
40df637
sofisl added a commit that referenced this pull request Mar 5, 2026
@miguelvelezsa @release-please
@feywind @renovate-bot @sofisl
feat: add gtoken get credentials (#809)
5c7e60f
* chore(deps): update dependency jsdoc-region-tag to v4 (#831)

* build: calculate changes instead of using external action (#834)

* chore: fix lint

* build: use temp dir in credentials test

* build: added error message in case of invalid json

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: feywind <[email protected]>
Co-authored-by: Mend Renovate <[email protected]>
Co-authored-by: sofisl <[email protected]>
GautamSharda pushed a commit that referenced this pull request Mar 11, 2026
@JustinBeckwith
chore: clean up package.json (#809)
f2a269f
@GautamSharda GautamSharda mentioned this pull request Mar 11, 2026
migrate code from googleapis/nodejs-pubsub #7592
Merged
4 tasks
thiyaguk09 pushed a commit to thiyaguk09/google-cloud-node-fork that referenced this pull request Mar 18, 2026
Benjamin E. Coe
fix(deps): update @google-cloud/common with fixes for http (googleapi…
9154ad3
…s#809)
GautamSharda pushed a commit that referenced this pull request Mar 23, 2026
@release-please
chore: release 3.1.1 (#809)
605c689
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
GautamSharda pushed a commit that referenced this pull request Mar 25, 2026
@release-please @GautamSharda
chore: release 3.1.1 (#809)
0a9f312
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
shivanee-p pushed a commit that referenced this pull request Mar 27, 2026
@release-please @shivanee-p
chore: release 3.1.1 (#809)
bf7103d
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
thiyaguk09 pushed a commit to thiyaguk09/google-cloud-node-fork that referenced this pull request May 5, 2026
@release-please @thiyaguk09
chore: release 3.1.1 (googleapis#809)
7fd2309
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
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. core

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.

4 participants

@stephenplusplus @leibale @callmehiphop @googlebot
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.