Skip to content

Should we raise if an Operation contains on error while polling #2679

Closed

Description

@dhermes

When we call Operation.poll(), we check the payload returned and if the operation is both done and has an error set, we could easily raise an exception. We could raise a GaxError? The underyling protobuf type is google.rpc.Status. (ref: operation proto)

Activity

  1. daspecster commented on Nov 4, 2016

    @daspecster
    Contributor

    @dhermes maybe you know the answer to this, but I think it's relevant here.
    Is it possible for an error to be returned as well as a result/payload?

  2. dhermes commented on Nov 4, 2016

    @dhermes
    ContributorAuthor

    @daspecster I updated the original comment with a reference to the actual proto. As can be seen in the part of our codebase I linked, the error is part of a oneof field that response is also in, so there is a clear demarcation.

  3. daspecster commented on Nov 4, 2016

    @daspecster
    Contributor

    Ah yeah

    // The operation result, which can be either an error or a valid response.

    https://github.com/googleapis/googleapis/blob/1e724373436dc016f1708dd18c906524532716ea/google/longrunning/operations.proto#L97.

    Where are things like the protobuf oneof and other types defined?

    I see it's imported as import "google/protobuf/any.proto";(iiccckk) but I can't find that in https://github.com/googleapis/googleapis/tree/1e724373436dc016f1708dd18c906524532716ea/google.

  4. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Apr 19, 2017
  5. lukesneeringer commented on Aug 11, 2017

    @lukesneeringer
    Contributor

    Hello,
    One of the challenges of maintaining a large open source project is that sometimes, you can bite off more than you can chew. As the lead maintainer of google-cloud-python, I can definitely say that I have let the issues here pile up.

    As part of trying to get things under control (as well as to empower us to provide better customer service in the future), I am declaring a "bankruptcy" of sorts on many of the old issues, especially those likely to have been addressed or made obsolete by more recent updates.

    My goal is to close stale issues whose relevance or solution is no longer immediately evident, and which appear to be of lower importance. I believe in good faith that this is one of those issues, but I am scanning quickly and may occasionally be wrong. If this is an issue of high importance, please comment here and we will reconsider. If this is an issue whose solution is trivial, please consider providing a pull request.

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: corepriority: p2Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions