Skip to content

patch(v2.2): reject heterogeneous ExpectedMachine batch updates - #5678

Merged
nv-dmendoza merged 1 commit into
NVIDIA:release/v2.2from
chet:gh-issue-5669
Sep 2, 2026
Merged

patch(v2.2): reject heterogeneous ExpectedMachine batch updates#5678
nv-dmendoza merged 1 commit into
NVIDIA:release/v2.2from
chet:gh-issue-5669

Conversation

@chet

@chet chet commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Backports 04dd873ad from #5501 to release/v2.2.

ExpectedMachine batch PATCH requests require every item to select the same update fields, except for the documented per-machine bmcIpAddress behavior. Before #5501, a batch with mismatched fields could reach ExpectedMachine.UpdateMultiple; its shared column list could then write a model zero value into a row that omitted one of those fields.

This compares field presence before database or workflow work begins. Values may still differ, empty collections remain explicit clears, and bmcIpAddress continues to support per-machine set, clear, omit, and null behavior.

Related issues

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

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

  • make rest-api/test-api passes the complete REST API suite, including the new batch validation and the existing BMC IP behavior.

  • make rest-fmt, make rest-lint, cargo make format-nightly, and cargo make clippy pass. The full custom lint traversal stops on two existing txn_held_across_await findings in unchanged crates/api-core/tests/integration/dns_resolution.rs.

Review Findings

Model Findings Overview

The local model reviews were not repeated for this backport. The stable patch ID is 3f91903fd3561c7dc235c9fd99bc5cbb2d3f684c for both this branch and the reviewed patch from #5501, and no code was changed after the cherry-pick.

Model Findings Details

Per Chet's direction, the Codex, CodeRabbit CLI, Claude CLI, and common-nits passes were not rerun. No additional review findings or edits were produced, and no hosted CodeRabbit review was requested.

Backport `04dd873ad` from NVIDIA#5501 to `release/v2.2`.

ExpectedMachine batch PATCH requests must select the same update fields for every item, except for the documented per-machine `bmcIpAddress` behavior. Without the handler check, `ExpectedMachine.UpdateMultiple` can apply its shared column list to a row that omitted one of those fields.

Compare field presence before database or workflow work begins. Values may still differ, empty collections remain explicit clears, and `bmcIpAddress` continues to support per-machine set, clear, omit, and `null` behavior.

This supports NVIDIA#5669

Signed-off-by: Chet Nichols III <chetn@nvidia.com>
@chet
chet requested a review from a team September 2, 2026 05:23
@chet
chet requested a review from a team as a code owner September 2, 2026 05:23
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: 77de7c4e-0df9-44ac-b3de-376871fc9ae7

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

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 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-09-02T05:26:18.297896Z 80bee3f 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.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

🔐 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-09-02 05:26:47 UTC | Commit: 80bee3f

@thossain-nv thossain-nv added the rest-api Add this label when an issue or PR concerns NICo REST API label Sep 2, 2026 — with ChatGPT Codex Connector

@nv-dmendoza nv-dmendoza left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, backports fixes

@nv-dmendoza
nv-dmendoza merged commit 8142d0d into NVIDIA:release/v2.2 Sep 2, 2026
122 checks passed
@chet
chet deleted the gh-issue-5669 branch September 2, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rest-api Add this label when an issue or PR concerns NICo REST API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants