Skip to content

prime images transfer-bulk#775

Open
kcoopermiller wants to merge 10 commits into
mainfrom
feature/bulk-transfer
Open

prime images transfer-bulk#775
kcoopermiller wants to merge 10 commits into
mainfrom
feature/bulk-transfer

Conversation

@kcoopermiller

@kcoopermiller kcoopermiller commented Jul 2, 2026

Copy link
Copy Markdown
Member

Adds a bulk counterpart to prime images push --source-image: copy many existing registry images into prime in one command

prime images transfer-bulk --manifest transfers.jsonl
prime images transfer-bulk --harbor ./tasks
prime images transfer-bulk --hf R2E-Gym/R2E-Gym-Subset --column docker_image
  • --manifest — JSONL, one transfer per line: {"source": "ghcr.io/org/app:v1", "image"?: "name:tag", "platform"?: "..."}.
  • --harbor — transfers each task's prebuilt [environment] docker_image. This is the exact complement of push-bulk's Harbor mode (which skips those tasks), so the two commands together cover a full task directory.
  • --hf — reads image references straight from a Hugging Face dataset column via the dataset-viewer API (no datasets dependency, no download). Takes --column and supports --hf-config/--hf-split, dataset URLs, and HF_TOKEN for gated datasets.

How it runs

  1. Validate everything up front like push-bulk. --dry-run prints the resolved source → destination table without touching the API.
  2. Submit one transfer per request through the sliding-window logic shared with push-bulk (run_bulk_jobs refactored out of run_bulk_push). The server's transfer limiter counts images/minute (10 personal / 60 team), so on a plain 429 the spec is requeued and submission pauses briefly while in-flight transfers keep getting polled. A quota 429 stops submission (rest marked SKIPPED); 20 consecutive deferrals with zero progress makes the run give up instead of pacing forever.
  3. Poll to terminal status and write anything that didn't complete to a re-runnable failures manifest: prime images transfer-bulk --manifest transfer-bulk-failures.jsonl.

Verified end-to-end against R2E-Gym/R2E-Gym-Subset (4,578 images resolved via dry-run).


Note

Medium Risk
Large CLI surface area touching image build/transfer APIs, quotas, and rate limits; platform-image team_id omission is a deliberate behavior change but scoped to admin platform flows.

Overview
Adds prime images transfer-bulk, the bulk counterpart to push --source-image, for copying many external registry images into Prime with the same operational shape as push-bulk (up-front validation, sliding-window concurrency, polling, re-runnable failure manifests).

transfer-bulk accepts exactly one of JSONL (source / optional image destination override), Harbor (each task’s prebuilt docker_image—complementing push-bulk’s build-from-environment/), or Hugging Face (--column image refs via the datasets-server API). It derives default Prime names/tags from source refs, treats transfer 429s as paced requeues (with a cap after repeated deferrals), and supports --platform-image like single-image push.

push-bulk gains --hf mode (Dockerfile text + name columns → temp build contexts) via new images_hf, and shares a refactored run_bulk_jobs engine with transfers: injectable submit, quota stop, rate-limit gating, server errorMessage on failed polls, and Ctrl+C resume via BulkRunInterrupted.

prime images push no longer errors on platform images in team context—it ignores team for platform transfer/build payloads and prints a dim notice instead.

Reviewed by Cursor Bugbot for commit 903fefa. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 38aa296. Configure here.

Comment thread packages/prime/src/prime_cli/commands/images_transfer_bulk.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 38aa296de6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/prime/src/prime_cli/commands/images_transfer_bulk.py Outdated
@kcoopermiller

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb1fc1cdea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/prime/src/prime_cli/commands/images_transfer_bulk.py Outdated
@kcoopermiller

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 16c4977749

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/prime/src/prime_cli/commands/images_transfer_bulk.py Outdated
@kcoopermiller

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 16c4977749

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/prime/src/prime_cli/commands/images_transfer_bulk.py Outdated
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