Skip to content

Display complete long directory listings for S3-backed repositories on request #2612

Closed

Description

@kartsm

Request details

(Identifiers changed to protect the innocent)

One of our directories in an S3-backed repository containing snapshots has more than 1000 objects in it.

$ aws s3api list-objects-v2 --bucket REDACTED-reposilite-snapshots --prefix invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT --query 'length(Contents)'
1043

The Reposilite directory listing of that same bucket presents only 1001 objects:

$ curl https://reposilite.example.com.invalid/snapshots/invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT | xmllint --html --xmlout --xpath 'count(//li/a/@href)' -
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
100 126.8k   0 126.8k   0      0   6549      0           00:19          23884
1001

(While the 19 seconds constructing the directory listing are an inconvenience, they are not the subject of this issue.)

The newest objects under that prefix in the bucket:

$ ; aws s3api list-objects-v2 --bucket kar-ops-infra-reposilite-snapshots --prefix OPENLANE/SICommon/sicommon/26.02.000-SNAPSHOT --query 'sort_by(Contents,&LastModified)[-5:].[LastModified,Key]' --output text
2026-03-31T09:44:19+00:00       invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT/propublicity-26.02.000-20260313.074221-124.pom
2026-03-31T09:44:19+00:00       invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT/propublicity-26.02.000-20260318.074551-125.jar.md5
2026-04-02T07:14:20+00:00       invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT/maven-metadata.xml
2026-04-02T07:14:21+00:00       invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT/maven-metadata.xml.md5
2026-04-02T07:14:21+00:00       invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT/maven-metadata.xml.sha1
2026-04-02T07:14:19+00:00       invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT/propublicity-26.02.000-20260402.071417-128.jar.md5
2026-04-02T07:14:19+00:00       invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT/propublicity-26.02.000-20260402.071417-128.jar.sha1
2026-04-02T07:14:19+00:00       invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT/propublicity-26.02.000-20260402.071417-128.pom
2026-04-02T07:14:19+00:00       invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT/propublicity-26.02.000-20260402.071417-128.pom.md5
2026-04-02T07:14:19+00:00       invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT/propublicity-26.02.000-20260402.071417-128.pom.sha1

...do not appear in the directory listing:

$ curl https://reposilite.example.com.invalid/snapshots/invalid/com/example/quickener/propublicity/26.02.000-SNAPSHOT | xmllint --html --xmlout --xpath '//li/a/@href' - | tail
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
100 126.8k   0 126.8k   0      0   9202      0           00:14          22576
 href="./propublicity-26.02.000-20260313.074221-124.jar.md5"
 href="./propublicity-26.02.000-20260313.074221-124.jar.sha1"
 href="./propublicity-26.02.000-20260313.074221-124.jar.sha256"
 href="./propublicity-26.02.000-20260313.074221-124.pom"
 href="./propublicity-26.02.000-20260313.074221-124.pom.md5"
 href="./propublicity-26.02.000-20260313.074221-124.pom.sha1"
 href="./propublicity-26.02.000-20260313.074221-124.pom.sha256"
 href="./propublicity-26.02.000-20260318.074551-125.jar"
 href="./propublicity-26.02.000-20260318.074551-125.jar.md5"
 href="./propublicity-26.02.000-20260318.074551-125.jar.sha1"

I note that 125 x 8 == 1000, and it does not seem like a coincidence that snapshots 126 and up are not visible in the directory listing.

The feature request is one or more of the following.

  • Add a configuration option controlling long directory listings for S3-backed repositories globally. False by default, takes the "first page" of non-paginated ListObjectsV2 and renders that as the directory listing; i.e. matches the current behavior. When true, enumerates all objects under the key prefix via paginated ListObjectsV2 request, constructs HTML-format directory listing, and the response takes however long it takes. If memory limits are too low, that's the operator's problem, not the user's 😅
  • As previous but per-directory and per-request, possibly exposed through an HTTP request parameter and/or control in the UI. False by default.

Calling this more of a feature request than a bug because it takes a long time to render in the user interface, and not everyone may want that. Also, this is motivated by arguably poor organizational practice; we publish too many snapshots.

If it helps: Reposilite 3.5.26 from the container image, running on Amazon EKS 1.34, deployed via Helm chart 1.3.25.

Thank you for this lightweight Maven repository solution!

Activity

  1. added
    bug
    and removed on May 2, 2026
  2. dzikoysk commented on May 2, 2026

    @dzikoysk
    Owner

    Hmm I'll mark this as a bug, because technically speaking it may also cause some leftovers during the removal operation. The performance won't be great there, but at least it will be the correct approach in terms of the functionality.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions