Skip to content

docs(tasks): close OSS documentation gaps for container and Helm tasks - #640

Open
shelleyshen-0 wants to merge 10 commits into
mainfrom
docs/tasks-oss-gaps
Open

docs(tasks): close OSS documentation gaps for container and Helm tasks#640
shelleyshen-0 wants to merge 10 commits into
mainfrom
docs/tasks-oss-gaps

Conversation

@shelleyshen-0

@shelleyshen-0 shelleyshen-0 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Closes gaps between the managed-service Tasks documentation and the OSS self-hosted Tasks documentation, addressing issue #587.

Additional Details

The OSS task docs were missing several pieces that are critical for self-hosted users, particularly around the NONE result strategy (the only strategy supported on self-hosted NVCF):

  • No task lifecycle/status table
  • No environment variables documented (NVCT_TASK_ID, NVCT_TASK_NAME, NVCT_NCA_ID, NVCT_PROGRESS_FILE_PATH, NVCT_RESULTS_DIR)
  • Secrets delivery mechanism described incorrectly (said "env vars"; actually /var/secrets/secrets.json)
  • Progress file protocol entirely absent — without it, users have no way to signal task completion or keep the heartbeat alive under the NONE strategy
  • Model/resource artifact mount paths not documented
  • Cancel vs delete semantics not explained
  • Helm chart prerequisites missing (version no-hyphens rule, required values.yaml keys, pull secret injection)
  • Helm security constraints (supported k8s types, volume types, 300-object limit) not documented

All added content was verified against service source code (worker-task/internal/progress/progress.go, worker-task/configs/configs.go, cloud-tasks/TaskMapperService.java, nvca/pkg/storage/modelcache.go). One correction was made during verification: the name field character pattern was fixed from an incorrect ASCII range notation to an explicit character list matching the code.

Managed-only capabilities (UPLOAD strategy, GFN backend limits, NGC registry, SSA-JWT auth, UI creation) are omitted.

For the Reviewer

Three commits, one per file:

  • docs/user/task-creation.md — lifecycle table, use-case framing, NONE strategy overview
  • docs/user/container-tasks.md — env vars, secrets fix, mount paths, progress file, result handling, monitoring
  • docs/user/helm-tasks.md — prerequisites, progress updates, security constraints

For QA

Ran ./tools/ci/check-docs — 0 errors.

Issues

Closes #587

Checklist

  • I am familiar with the Contributing Guidelines.
  • I have signed off my commits for Developer Certificate of Origin (DCO) compliance.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • Documentation
    • Expanded task guides with lifecycle statuses, progress tracking, heartbeat, completion, cancellation, and deletion behavior.
    • Clarified NONE result handling and container-managed output delivery.
    • Added guidance for S3 credentials, file-based secret delivery and rotation, artifact mounts, atomic writes, and monitoring.
    • Documented Helm prerequisites, runtime-injected values, chart validation, automatic image-pull-secret handling, restarts, supported resources, volume limits, hooks, and CRD behavior.
    • Updated examples for result handling, GPU configuration, and supported resource types.

- Add use-case framing to the intro (fine-tuning, TensorRT, batch pipelines)
- Add task lifecycle section with all 8 statuses and descriptions
- Expand result handling to explain what the NONE strategy requires:
  heartbeat cadence, completion signal, and cross-link to progress file
…toring

- Add environment variables table (NVCT_TASK_ID, NVCT_TASK_NAME,
  NVCT_NCA_ID, NVCT_PROGRESS_FILE_PATH, NVCT_RESULTS_DIR)
- Fix secrets delivery: secrets arrive as /var/secrets/secrets.json,
  not as environment variables; add JSON format example and rotation note
- Add model/resource artifact mount paths (/config/models, /config/resources)
- Add progress file section: JSON schema, field constraints (name length
  and allowed characters verified against worker-task/progress.go),
  heartbeat rule, completion semantics, intermediate result semantics,
  atomic write recommendation
- Update result handling section to explain the NONE workflow
- Expand monitoring section: explain cancel vs delete semantics,
  note that task get returns percentComplete and healthInfo
- Update JSON and CLI examples to use NONE strategy
…aints

- Add prerequisites section: chart version must not contain hyphens,
  essential values.yaml keys (nvctNcaId, nvctTaskId, nvctTaskName,
  nvctResultsDir, nvctProgressFilePath) with minimal template, automatic
  pull secret injection
- Add progress updates section: cross-link to progress file schema,
  Job + backoffLimit:0 + restartPolicy:Never pattern with YAML example,
  warning that percentComplete must never decrease
- Add security constraints section: supported k8s object types, 300-object
  limit, allowed Pod volume types, hook and CRD behavior
- Update JSON example to use NONE strategy and remove GFN-specific backend
@shelleyshen-0
shelleyshen-0 requested a review from a team as a code owner August 3, 2026 20:48
@shelleyshen-0
shelleyshen-0 requested a review from pdmack August 3, 2026 20:48
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 696b1ba1-430e-4a24-a6d6-85f775a14402

📥 Commits

Reviewing files that changed from the base of the PR and between 7e35713 and 8fca8e3.

📒 Files selected for processing (1)
  • docs/user/container-tasks.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/user/container-tasks.md

📝 Walkthrough

Walkthrough

The task documentation adds lifecycle statuses, NONE result handling, container secret and progress protocols, monitoring commands, and Helm prerequisites and Kubernetes constraints across three user guides.

Changes

Task documentation

Layer / File(s) Summary
Task lifecycle and result contracts
docs/user/task-creation.md
The guide adds NVCT batch-job use cases, task lifecycle statuses, and requirements for NONE result handling, progress heartbeats, and completion.
Container runtime protocols
docs/user/container-tasks.md
The guide updates task examples and documents injected environment variables, secret delivery and rotation, artifact paths, progress-file rules, result handling, monitoring, cancellation, and deletion.
Helm task prerequisites and constraints
docs/user/helm-tasks.md
The guide documents chart and runtime prerequisites, NONE result handling, progress and restart settings, supported Kubernetes objects, object limits, hooks, CRDs, and permitted volume types.

Estimated code review effort: 2 (Simple) | ~15 minutes

Suggested reviewers: pdmack, sanjay-saxena

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses the required docs(tasks): format and accurately describes the documentation-only changes.
Linked Issues check ✅ Passed The changes address the linked issue by documenting OSS task lifecycle, result handling, configuration, operations, and Helm requirements across all three pages.
Out of Scope Changes check ✅ Passed The changes are limited to the three OSS Tasks documentation pages and align with the linked issue objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/tasks-oss-gaps

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai 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.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/user/container-tasks.md`:
- Around line 179-182: Update the intermediate-results guidance to scope the
unique checkpoint names and progress-file write-order rules to the UPLOAD
strategy, since only UPLOAD consumes resultsDir; do not apply these requirements
to NONE unless documenting its separate consumer behavior.
- Around line 167-170: Update the percentComplete documentation in
docs/user/container-tasks.md lines 167-170 and docs/user/helm-tasks.md lines
80-83 to state that values must be non-decreasing, allowing equal percentages
when checkpoints use unique names; retain the existing integer range.
- Around line 135-139: Update the container task documentation around the
`/config/models` and `/config/resources` mount paths to state that each artifact
is stored under its corresponding path using its sanitized name, while
preserving the existing model and resource path descriptions.

In `@docs/user/helm-tasks.md`:
- Around line 100-127: Clarify the Helm policy documentation by removing the
duplicate batch/v1/CronJob entry from the extraKubernetesTypes example, or
explicitly identifying it as redundant. State which supported-object, volume,
object-count, hook, and CRD rules are enforced by Default versus Unrestricted,
and explicitly identify any rules that remain enforced for every policy.
- Around line 8-37: Correct the Helm prerequisites documentation to state that
setInfraValues supplies the five root-level runtime values before rendering, so
charts do not need to declare them in values.yaml and existing non-empty values
are preserved. Replace the claim that pull secrets are injected into every
PodSpec with the actual ServiceAccount behavior, including Helm ServiceAccount
handling being controlled by HelmRBACEnforcement.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: cacbf60e-28e1-4155-9f80-3f9b559a1166

📥 Commits

Reviewing files that changed from the base of the PR and between 4ced8f0 and cd32901.

📒 Files selected for processing (3)
  • docs/user/container-tasks.md
  • docs/user/helm-tasks.md
  • docs/user/task-creation.md

Comment thread docs/user/container-tasks.md
Comment thread docs/user/container-tasks.md Outdated
Comment thread docs/user/container-tasks.md Outdated
Comment thread docs/user/helm-tasks.md
Comment thread docs/user/helm-tasks.md

@sbaum1994 sbaum1994 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just one comment about making result strategy none more obvious at the top for CLI examples

--max-runtime PT4H \
--result-strategy UPLOAD \
--results-location my-org/my-team/my-model
--result-strategy NONE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a warning that result strategy none is the only supported result strategy, if not can you add one here (in addition to below)

Comment thread docs/user/container-tasks.md Outdated
## Result handling

Note: result upload is not yet supported in this release.
Note: result upload to a registry is not yet supported in this release. Set

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you make this be a warning

- Change "monotonically increasing" to "non-decreasing" in container-tasks.md
  and helm-tasks.md; the worker accepts equal values and only rejects strictly
  decreasing ones (progress.go:524)
- Scope the intermediate-result write-ordering rule (unique name, do not write
  to previous result dirs) to the UPLOAD strategy, since the worker only reads
  resultsDir for UPLOAD; NONE has no write-ordering constraint
- Fix extraKubernetesTypes example: replace CronJob (already in the Default
  allowlist per serialize.go:178) with DaemonSet, which actually requires
  an extra type entry
- Fix values.yaml prerequisite: setInfraValues injects the five nvct keys
  before rendering via mergo.Merge; charts do not need to declare them but
  empty defaults are recommended for local development
- Fix pull secret description: secrets are attached to the default
  ServiceAccount at runtime (prereqs.go:123), not patched into every PodSpec
- Add policy scoping to security constraints: object type allowlist applies
  to all policies; volume types, 300-object limit, hook and CRD rules apply
  only under Default; Unrestricted bypasses those checks (run.go:376-382)
Add a Warning callout before the CLI examples and convert the plain note
in the Result handling section to a Warning, so the UPLOAD-not-supported
limitation is more prominent on self-hosted.
- taskId: not required; worker auto-fills it if absent (progress.go:157-159)
- name: not required or validated under NONE; isValidProgressName only runs
  inside the UPLOAD_STRATEGY block (progress.go:193)
@shelleyshen-0
shelleyshen-0 enabled auto-merge August 4, 2026 02:33
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.

docs(tasks): close gaps between OSS and managed Tasks documentation

2 participants