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

The PullResponse docstring is inaccurate #717

Closed
hjtran opened this issue Jun 8, 2022 · 1 comment
Closed

The PullResponse docstring is inaccurate #717

hjtran opened this issue Jun 8, 2022 · 1 comment
Assignees
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@hjtran
Copy link

hjtran commented Jun 8, 2022

class PullResponse(proto.Message):
    r"""Response for the ``Pull`` method.
    Attributes:
        received_messages (Sequence[google.pubsub_v1.types.ReceivedMessage]):
            Received Pub/Sub messages. The list will be empty if there
            are no more messages available in the backlog. For JSON, the
            response can be entirely empty. The Pub/Sub system may
            return fewer than the ``maxMessages`` requested even if
            there are more messages available in the backlog.
    """

The PullResponse docstring states that the received_messages ... will be empty if there are no more messages available in the backlog.

From my conversation with @kamalaboulhosn on the GCP slack, this is incorrect. Kamal mentioned that there was a doc overhaul coming that would fix it but I wonder if it might save someone else some time (we spent an embarrassing amount of dev/cpu time debugging our application which was built on this statement) if this part of the docstring was removed altogether.

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/python-pubsub API. label Jun 8, 2022
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jun 9, 2022
@acocuzzo acocuzzo added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jun 9, 2022
@yoshi-automation yoshi-automation removed the triage me I really want to be triaged. label Jun 9, 2022
@acocuzzo acocuzzo self-assigned this Sep 13, 2022
@acocuzzo
Copy link
Contributor

Fixed in 2.15.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants