Skip to content

Add WithFrom, WithAPIKey, WithBatchSize options#28

Merged
andrew merged 1 commit into
mainfrom
ecosystems-identity-options
Jun 12, 2026
Merged

Add WithFrom, WithAPIKey, WithBatchSize options#28
andrew merged 1 commit into
mainfrom
ecosystems-identity-options

Conversation

@andrew

@andrew andrew commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Threads ecosyste.ms identity and batch-size knobs through to the underlying ecosystems-go client.

  • WithFrom(email) sets the From header
  • WithAPIKey(key) sets the Authorization: Bearer header
  • WithBatchSize(size) caps bulk-lookup batch size below the upstream max

Identifying the client moves it out of ecosyste.ms's shared rate-limit pool, which is the root cause traced in git-pkgs/git-pkgs#231 (opaque HTTP/2 INTERNAL_ERROR stream rejections). WithBatchSize lets callers stay below stricter server-side limits.

The new options are no-ops when running in direct registries mode (GIT_PKGS_DIRECT=1) since the registries client has no equivalent knobs.

Pulls in ecosystems-go v0.2.0 which adds the underlying options.

Thread ecosyste.ms identity and batch-size knobs through to the
underlying ecosystems-go client. Identifying the client (WithFrom or
WithAPIKey) moves it out of the shared rate-limit pool, which the
upstream issue at git-pkgs/git-pkgs#231 traced to opaque HTTP/2 stream
rejections. WithBatchSize lets callers stay below stricter server-side
limits.

The options are ignored when running in direct registries mode, since
the registries client has no equivalent knobs.
@andrew andrew merged commit 9a5fd5f into main Jun 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant