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

Share exceptions when opening AppendRowsStream instead of the generic "Try turning on DEBUG level logs to see the error." exception #729

Open
dhendry opened this issue Jan 10, 2024 · 2 comments
Labels
api: bigquerystorage Issues related to the googleapis/python-bigquery-storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. status: investigating The issue is under investigation, which is determined to be non-trivial.

Comments

@dhendry
Copy link

dhendry commented Jan 10, 2024

  • When an exception occurs opening a AppendRowsStream (for example when there is a protobuf-bq schema mismatch), a generic ` "There was a problem opening the stream. Try turning on DEBUG level logs to see the error." exception is raised which is incredibly unhelpful.
    • Our production services do not run with debug logs and I recently spent a lot of time trying to reproduce the conditions which would trigger a stream open error which would have been MUCH simpler if the exception was simply forwarded through.
  • There is the following TODO in the code here
        # Something went wrong when opening the RPC.
        if not is_consumer_active:
            # TODO: Share the exception from _rpc.open(). Blocked by
            # https://github.com/googleapis/python-api-core/issues/268
            request_exception = exceptions.Unknown(
                "There was a problem opening the stream. "
                "Try turning on DEBUG level logs to see the error."
            )
            self.close(reason=request_exception)
            raise request_exception

It appears googleapis/python-api-core#268 has been closed. It would be really awesome if this could be revisited.

@product-auto-label product-auto-label bot added the api: bigquerystorage Issues related to the googleapis/python-bigquery-storage API. label Jan 10, 2024
@Linchin
Copy link
Contributor

Linchin commented Jan 31, 2024

Hi @dhendry, thank you for raising this issue! Actionable error is something we want to ensure for our users. Just so I know the exact situation, could you share a code snippet that reproduces the issue, and even better, the exact unhelpful exception raised (the printed stack tracing and stuff)? Thank you for your help :)

@Linchin Linchin added priority: p2 Moderately-important priority. Fix may not be included in next release. status: investigating The issue is under investigation, which is determined to be non-trivial. labels Jan 31, 2024
@chalmerlowe
Copy link
Contributor

@Linchin I am working on something related to this.
I can provide you with code and a demo during our next 1:1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerystorage Issues related to the googleapis/python-bigquery-storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. status: investigating The issue is under investigation, which is determined to be non-trivial.
Projects
None yet
Development

No branches or pull requests

3 participants