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 — Pager not made for list_collection_ids proto on firestore, seems heuristic may be incorrect? · Issue #516 · googleapis/gapic-generator-python

This repository was archived by the owner on Aug 25, 2026. It is now read-only.
This repository was archived by the owner on Aug 25, 2026. It is now read-only.

Pager not made for list_collection_ids proto on firestore, seems heuristic may be incorrect? #516

Copy link
Copy link
Closed
Closed
Pager not made for list_collection_ids proto on firestore, seems heuristic may be incorrect?#516
Copy link
Assignees
software-dov

Description

@crwilcox
crwilcox
opened on Jul 10, 2020
Issue body actions
def collections(self):
        """List top-level collections of the client's database.

        Returns:
            Sequence[:class:`~google.cloud.firestore_v1.collection.CollectionReference`]:
                iterator of subcollections of the current document.
        """
        iterator = self._firestore_api.list_collection_ids(
            request={"parent": "{}/documents".format(self._database_string)},
            metadata=self._rpc_metadata,
        )
        iterator.client = self
        iterator.item_to_value = _item_to_collection_ref
        return iterator

This code is how we used ot use the list_collection_ids. However, it is no longer a pager/iterator.

https://github.com/googleapis/googleapis/blob/master/google/firestore/v1/firestore.proto#L842

Activity

  1. software-dov commented on Jul 10, 2020

    @software-dov
    software-dov
    on Jul 10, 2020
    Contributor
    More actions

    It looks like the problem is that the generator is expecting that APIs will only paginate over messages, not primitives. The repeated element for ListCollectionIdsResponse is a collection of strings, and so the heuristic ignores it.
    I don't know if this was an oversight or a deliberate decision when implementing the generator logic. I'll check to see if there are any tests that would support one hypothesis or another.

  2. software-dov commented on Jul 10, 2020

    @software-dov
    software-dov
    on Jul 10, 2020
    Contributor
    More actions

    FIxed by #517

  3. software-dov
    closed this as completedon Jul 10, 2020
  4. tseaver
    added a commit that references this issue on Oct 22, 2020

    fix: remove workaround for missing autogen ListCollectionIdsPager

    a0ff66c
  5. JustinBeckwith
    assigned
    software-dov
    on Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @software-dov
    software-dov

Labels

No labels
No labels

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.