Skip to content

fix(api): support Scout firmware upgrades for assigned hosts - #5569

Merged
rahmonov merged 1 commit into
NVIDIA:mainfrom
rahmonov:assigned-scout-upgrade
Aug 31, 2026
Merged

fix(api): support Scout firmware upgrades for assigned hosts#5569
rahmonov merged 1 commit into
NVIDIA:mainfrom
rahmonov:assigned-scout-upgrade

Conversation

@rahmonov

@rahmonov rahmonov commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Fix Scout firmware upgrades for machines in Assigned/HostReprovision/WaitingForScoutUpgrade. I missed the fact that WaitingForScoutUpgrade can be nested inside the Assigned state so scout won't know about this work currently. This PR fixes it.

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.)

Testing

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

Additional Notes

The API now:

  • Dispatches firmware upgrade tasks for assigned hosts.
  • Accepts Scout completion reports while preserving the Assigned state wrapper.
  • Adds regression tests for both paths.

@rahmonov
rahmonov requested a review from a team as a code owner August 29, 2026 21:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T21:41:34.246123Z 6b7bf4e PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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: 93a9c72e-7f5b-45bb-be64-d691ac01bb55

📥 Commits

Reviewing files that changed from the base of the PR and between 62f4405 and 6b7bf4e.

📒 Files selected for processing (4)
  • crates/api-core/src/handlers/host_reprovisioning.rs
  • crates/api-core/src/handlers/machine_scout.rs
  • crates/api-core/tests/integration/forge_agent_control.rs
  • crates/api-core/tests/integration/scout_firmware_upgrade_status.rs

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Summary by CodeRabbit

  • Bug Fixes

    • Firmware upgrade workflows now work correctly for assigned hosts undergoing reprovisioning.
    • Scout firmware status reports are properly accepted and applied across supported host states.
    • Hosts receive the appropriate firmware upgrade action when required.
  • Tests

    • Added coverage for firmware upgrade actions and successful status reporting on assigned hosts.

Walkthrough

Assigned hosts with nested host-reprovisioning state now receive Scout firmware upgrade actions. Scout status handling updates the nested state while preserving the assigned-host wrapper. Integration tests cover both flows.

Changes

Assigned Host Reprovisioning

Layer / File(s) Summary
Assigned host firmware action
crates/api-core/src/handlers/machine_scout.rs, crates/api-core/tests/integration/forge_agent_control.rs
forge_agent_control now returns the firmware upgrade action for assigned hosts waiting for Scout upgrades. The integration test validates the firmware component, target version, and task ID.
Assigned host status persistence
crates/api-core/src/handlers/host_reprovisioning.rs, crates/api-core/tests/integration/scout_firmware_upgrade_status.rs
Scout status handling updates nested host-reprovisioning state and preserves the assigned-state wrapper. Tests cover successful status storage and shared waiting-state construction.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 6b7bf

The change enables Scout firmware upgrades for assigned hosts while preserving the existing state wrapper and adds regression coverage; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 46.15% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely identifies the main fix: support Scout firmware upgrades for assigned hosts.
Description check ✅ Passed The description directly explains the assigned-host firmware upgrade issue, the API changes, and the regression tests.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@rahmonov
rahmonov merged commit 288755f into NVIDIA:main Aug 31, 2026
65 of 66 checks passed
rahmonov added a commit to rahmonov/ncx-infra-controller-core that referenced this pull request Aug 31, 2026
…5569)

Fix Scout firmware upgrades for machines in
Assigned/HostReprovision/WaitingForScoutUpgrade. I missed the fact that
`WaitingForScoutUpgrade` can be nested inside the `Assigned` state so
scout won't know about this work currently. This PR fixes it.

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

- [x] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
- [ ] No testing required (docs, internal refactor, etc.)

The API now:
- Dispatches firmware upgrade tasks for assigned hosts.
- Accepts Scout completion reports while preserving the Assigned state
wrapper.
- Adds regression tests for both paths.

ci-rebuild-base-containers

(cherry picked from commit 288755f)
Signed-off-by: Jakhongir Rakhmonov <jrakhmonov@nvidia.com>
nv-dmendoza pushed a commit that referenced this pull request Aug 31, 2026
…5575)

Backporting 288755f
(#5569) to v0.10.0

Signed-off-by: Jakhongir Rakhmonov <jrakhmonov@nvidia.com>
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.

2 participants