Skip to content

[Docs] Deleting a model cancels its in-flight download - #23

Merged
slin1237 merged 1 commit into
mainfrom
codex/nightly-docs-cf9af84f22d57623
Oct 2, 2026
Merged

slin1237 merged 1 commit into
mainfrom
codex/nightly-docs-cf9af84f22d57623

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

What this PR does

What happens when I delete a BaseModel or ClusterBaseModel while nodes are still downloading it, or while its download is waiting in the agent's queue?

Why we need it

Source change: ome-projects/ome@c23c643

In pkg/modelagent/gopher_task_queue.go, enqueue inserts a Delete task at the front of the high-priority queue and removeSupersededTasks drops the model's queued downloads ('Delete preempts pending work for the same model'); pkg/modelagent/gopher_task_tracker.go beginDelete cancels the active download attempt's context. Commit c23c643 (#1157) switched the agent's OCI bulk download to the context-aware ociobjectstore.BulkDownloadContext so an OCI download actually stops ('stops standard downloads between files and can cancel multipart downloads in progress; active SDK calls may delay cancellation'), completing what #1151 (mid-download HF cleanup of partial files) and #1156/#985 (delete-download races, no Failed status from a canceled download — gopher.go 'Skipping Failed status for canceled model download') built. Current docs say nothing about this: concepts/models/base-models.md 'Delete a model' describes only the finalizer waiting for each node's agent to report its copy deleted, and guides/operate-ome/model-agent.md 'How downloads run' says queued models 'wait their turn' with no mention that a delete preempts the queue or stops a running download. A reader who deletes a mistakenly created large model cannot tell whether the node keeps downloading hundreds of gigabytes. This is one independent concern: the interaction of deletion with an active or queued download, distinct from the ordering of downloads among themselves.

Scope: model-storage / delete-cancels-inflight-download. Other concerns are deferred.

How to test

  • Passed the documentation path and size guard (under 1000 added plus deleted lines; no file-count limit).
  • Passed an independent accuracy and single-concern review.
  • Passed git diff --check and website content/link tests, type checks, lint and production build.

Checklist

  • Every commit is signed off (git commit -s)
  • pnpm lint && pnpm check && pnpm test && pnpm build passes (run by the publisher on an isolated copy)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: ed3c6645-af4c-48ae-afa7-7734a8fe436e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Documentation maintenance: ready. Unsuccessful content rounds: 0/3. Operational attempts: 0/3.

Head: 069bb5b1255bfec33c77f823702b6ec246ec5813; reviewed main: 40ff7deafa9a366fda6cc0cb9598dbef9b7fe515.

Both edits document one concern: deletion versus queued/active downloads. All claims verified against pkg/modelagent and pkg/ociobjectstore at the pinned commit: delete drops the model's queued tasks and goes to the front of the high-priority queue (gopher_task_queue.go enqueue/removeSupersededTasks); the active download's context is canceled at enqueue (gopher.go enqueueTask -> gopher_task_tracker.go beginDelete); canceled downloads skip the Failed status (gopher.go:1093); the agent passes WithSizeThreshold(BigFileSizeInMB=200, MiB-based comparison) so files under 200 MiB finish via the standard download while larger files' multipart transfers stop mid-file with part temp files and the .temp assembly file removed; GetObject runs under context.WithoutCancel so an in-flight SDK request keeps its retries and must return first; HF downloads carry an xet cancellation token polled mid-transfer. The since-v1.3/on-v1.2.2 framing matches the triggering commit c23c643 introducing BulkDownloadContext (previously no context, so OCI downloads ran to completion), corroborated by the Hugo page's long-standing Download Cancellation section. Anchor links resolve and the style follows the house conventions; no nav/redirect changes needed.

Workflow evidence

Human review threads and CODEOWNER approval remain under repository policy.

@slin1237
slin1237 merged commit 40933a7 into main Oct 2, 2026
2 checks passed
@slin1237
slin1237 deleted the codex/nightly-docs-cf9af84f22d57623 branch October 2, 2026 18:31
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