Skip to content

gcrane: Cannot list more than ~1000 entries in an artifact registry #1643

@nickstenning

Description

@nickstenning

Describe the bug

Running gcrane ls on an Artifact Registry target with more than 1000 images in it only returns the first ~1000 entries, and there seems to be no way to get the remainder:

$ gcrane ls us-central1-docker.pkg.dev/my-project-name/my-repository |  wc -l
1005

It's clear from the output that gcrane is just emitting the first ~1000 entries alphabetically. There are many more than 1000 top-level tags in this repository:

gcrane-output

To Reproduce

Create an Artifact Registry, and tag >1000 images into it. Then run gcrane ls ... on the base of the repository.

Expected behavior

I'd like gcrane ls to either a) list all of the first-level tags in the repository, or to expose some kind of pagination/max-size option that allows me to get access to results beyond the first 1000.

Additional context

$ gcrane version
v0.14.0

Registry used: Google Artifact Registry

The main reason this is a problem for me right now is that I'd like to use the output of gcrane ls to start multiple parallel gcrane cp -r processes (via parallel or xargs -P) but I can't do that unless I know that the output correctly enumerates every entry in the Artifact Registry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions