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 — Bigtable error silently ignored · Issue #2724 · googleapis/google-cloud-node

Bigtable error silently ignored #2724

New issue
Copy link
New issue
Copy link
Closed
Closed
Bigtable error silently ignored#2724
Copy link
Assignees
stephenplusplus
Labels
coretype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@kolodny
kolodny
opened on Nov 5, 2017
Issue body actions
  • OS: OSX 10.12.6
  • Node.js version: 8.5.0 and 6.x
  • npm version: 5.3.0
  • google-cloud-node version: [email protected] [email protected] [email protected]

Steps to reproduce

const bigtable = require('@google-cloud/bigtable');

const bigtableClient = bigtable();
const instance = bigtableClient.instance(process.env.INSTANCE_ID);
const table = instance.table('doesnotexist');

Promise.resolve()
  .then(() => table.getRows())
  .then(([rows]) => console.log(`Read ${rows.length}`))
  .catch(error => console.error(`caught ${error}`))

I chased this bug down to https://github.com/GoogleCloudPlatform/google-cloud-node/blob/a64ad81517045196cf5a3f468ea15aad1e2c25da/packages/common-grpc/src/service.js#L376-L385

This "fake" response call causes streamResponseHandled in retry-request to be set to true on the fake response, that has the consequence of never firing the error callback. https://github.com/stephenplusplus/retry-request/blob/4181eec8187c3603d4e4e68db1ee6ac27725afa3/index.js#L113-L133

I tried reverting the code in #1444 to see if I could replicate the bug referenced at #1443 to see if I could find a different solution that would avoid this nasty regression, but I wasn't able to repro (I always got a response). I suspect that the code can be safely reverted. Reverting that bit of code did fix the bug of silently ignoring erorrs!

Thanks!

Activity

  1. stephenplusplus
    added
    api: bigtableIssues related to the Bigtable API.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Nov 5, 2017
  2. stephenplusplus commented on Nov 5, 2017

    @stephenplusplus
    stephenplusplus
    on Nov 5, 2017
    Contributor
    More actions

    This issue was moved to googleapis/nodejs-bigtable#8

  3. stephenplusplus
    closed this as completedon Nov 5, 2017
  4. kolodny commented on Nov 5, 2017

    @kolodny
    kolodny
    on Nov 5, 2017
    ContributorAuthor
    More actions

    I suspect the underlying bug lives in google-cloud-node and was just manifesting this way in Bigtable. Either way awesome response time

  5. stephenplusplus commented on Nov 5, 2017

    @stephenplusplus
    stephenplusplus
    on Nov 5, 2017
    Contributor
    More actions

    Woops, that's a good point. Well, we'll see what @callmehiphop thinks and maybe having two issues will make us fix it twice as fast :)

  6. callmehiphop
    reopened this on Nov 5, 2017
  7. callmehiphop commented on Nov 5, 2017

    @callmehiphop
    callmehiphop
    on Nov 5, 2017
    Contributor
    More actions

    @kolodny is correct, this is definitely a core issue.

    @stephenplusplus I think this might actually be a retry-request issue. It seems that after a response event is received retry-request will swallow any errors produced by the stream moving forward. IMO the fix here would be to something like

    requestStream.on('error', err => retryStream.emit('error', err));

    Around https://github.com/stephenplusplus/retry-request/blob/master/index.js#L176

  8. callmehiphop
    assigned
    stephenplusplus
    on Nov 5, 2017
  9. stephenplusplus commented on Nov 5, 2017

    @stephenplusplus
    stephenplusplus
    on Nov 5, 2017
    Contributor
    More actions

    Check this out, though: https://github.com/stephenplusplus/retry-request/blob/4181eec8187c3603d4e4e68db1ee6ac27725afa3/index.js#L114

  10. stephenplusplus commented on Nov 5, 2017

    @stephenplusplus
    stephenplusplus
    on Nov 5, 2017
    Contributor
    More actions

    Ah, I see what you're saying. At the point you linked, we know the steam is good to go, so forwarding errors then is what we should do.

  11. callmehiphop commented on Nov 5, 2017

    @callmehiphop
    callmehiphop
    on Nov 5, 2017
    Contributor
    More actions

    I understand, my suggestion is if the response comes through first then you re-emit any request errors on the stream returned to the user. Regardless of whether or not this is a grpc implementation issue, I find it strange that retry-request would swallow an errors that occur mid-stream.

  12. stephenplusplus
    added a commit that references this issue on Nov 6, 2017

    Forward errors from request stream.

    bee1f94
  13. stephenplusplus commented on Nov 6, 2017

    @stephenplusplus
    stephenplusplus
    on Nov 6, 2017
    Contributor
    More actions

    I released a new retry-request that will forward errors from the request stream.

    @callmehiphop will that fix this issue, or is there more to do from common-grpc?

  14. stephenplusplus
    added
    core
    and removed
    api: bigtableIssues related to the Bigtable API.
    on Nov 6, 2017
  15. callmehiphop commented on Nov 6, 2017

    @callmehiphop
    callmehiphop
    on Nov 6, 2017
    Contributor
    More actions

    I'm pretty sure that fix should resolve this issue!

  16. stephenplusplus commented on Nov 6, 2017

    @stephenplusplus
    stephenplusplus
    on Nov 6, 2017
    Contributor
    More actions

    @kolodny please remove your local node_modules, reinstall, and let us know how it goes!

  17. kolodny commented on Nov 6, 2017

    @kolodny
    kolodny
    on Nov 6, 2017
    ContributorAuthor
    More actions

    Confirmed, the issue now appears fixed. Thanks!

  18. kolodny
    closed this as completedon Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

coretype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.