Skip to content

feat: Surface Flow task report on Task API#2288

Open
kunzhao-nv wants to merge 4 commits into
NVIDIA:mainfrom
kunzhao-nv:feat/rest-api-task-report
Open

feat: Surface Flow task report on Task API#2288
kunzhao-nv wants to merge 4 commits into
NVIDIA:mainfrom
kunzhao-nv:feat/rest-api-task-report

Conversation

@kunzhao-nv
Copy link
Copy Markdown
Contributor

@kunzhao-nv kunzhao-nv commented Jun 7, 2026

Description

  • Adds the structured execution report (already produced by Flow) to the rack Task endpoints.
  • Single-task GET /rack/task/{id} and POST /rack/task/{id}/cancel always include the report. The two list endpoints (/rack/{id}/task, /tray/{id}/task) take a new withReport=true opt-in.
  • with_report is plumbed all the way down to flow.ListTasksRequest, so Flow drops the multi-KB blob server-side when the caller hasn't asked for it; the savings cover the full Temporal workflow / activity payload chain, not just the wire response.
  • report is exposed as an opaque JSON object with a typed version: int32 anchor; clients must branch on version before reading the body, so Flow's internal report schema can evolve without a breaking change here.

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Related Issues (Optional)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

@kunzhao-nv kunzhao-nv requested a review from a team as a code owner June 7, 2026 18:44
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 7, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: dd375793-8a32-449e-9a4e-e89fb1636ebf

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 7, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 7, 2026

🔐 TruffleHog Secret Scan

No secrets or credentials found!

Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉

🔗 View scan details

🕐 Last updated: 2026-06-07 18:46:44 UTC | Commit: fe67fc1

Task.report bodies can be several KB. Always returning them on
ListTasks would persist the blob in every caller-side Temporal
activity / workflow payload along the call path, even when the
caller never reads it. Opt callers in via with_report, defaulting
to off for list endpoints; single-task RPCs always return it.

Signed-off-by: Kun Zhao <kunzhao@nvidia.com>
Pulls in the new ListTasksRequest.with_report field along with prior
upstream drift (Task.report, override_assignment_check on the rack
power / firmware / bring-up requests, and refreshed doc comments)
that earlier PRs landed without running flow-proto + flow-protogen.

Signed-off-by: Kun Zhao <kunzhao@nvidia.com>
Surfaces the structured execution report Flow already produces on
Task. Single-task GET and Cancel always include it; the rack/tray
list endpoints accept withReport=true and forward the flag down to
Flow's ListTasksRequest so the multi-KB payload is not paid for on
the default list path.

The report is exposed as an opaque JSON document with a typed
version anchor; clients must branch on version before reading
anything else, so Flow's internal schema can evolve without
breaking REST consumers.

Signed-off-by: Kun Zhao <kunzhao@nvidia.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 7, 2026

🔍 Container Scan Summary

Service Total Critical High Medium Low Other
nico-flow 116 13 50 41 4 8
nico-nsm 133 11 45 66 11 0
nico-psm 118 13 52 41 4 8
nico-rest-api 182 16 84 67 7 8
nico-rest-cert-manager 95 5 47 32 3 8
nico-rest-db 116 13 50 41 4 8
nico-rest-site-agent 115 13 50 41 3 8
nico-rest-site-manager 102 6 48 37 3 8
nico-rest-workflow 118 13 52 41 4 8
TOTAL 1095 103 478 407 43 64

Per-CVE detail lives in the per-service grype-* artifacts (JSON + SARIF). Severity counts only — no CVE IDs published here.

Covers 82626a9 (the task report + withReport spec change).

Signed-off-by: Kun Zhao <kunzhao@nvidia.com>
@kunzhao-nv kunzhao-nv force-pushed the feat/rest-api-task-report branch from fe67fc1 to 3aa6e8b Compare June 7, 2026 19:01
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