Skip to content

Patch node labels with optimistic lock - #3101

Open
kvalliyurnatt wants to merge 1 commit into
NVIDIA:mainfrom
kvalliyurnatt:fix_patch_request
Open

kvalliyurnatt wants to merge 1 commit into
NVIDIA:mainfrom
kvalliyurnatt:fix_patch_request

Conversation

@kvalliyurnatt

@kvalliyurnatt kvalliyurnatt commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

There are certain Node labels that are updated by multiple operands and the GPU operator, using a plain PATCH for these labels can overwrite the values incorrectly. We use a PATCH with optimistic locking for some of these operations

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Lint checks passing (make lint)
  • Generated assets in-sync (make validate-generated-assets)
  • Go mod artifacts in-sync (make validate-modules)
  • Test cases are added for new code paths

Testing

Added unit tests to cover the scenarios.


Devin Review

Signed-off-by: Karthikeyan Valliyurnatt <kvalliyurnat@nvidia.com>

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@kvalliyurnatt
kvalliyurnatt marked this pull request as ready for review October 23, 2026 21:14
@kvalliyurnatt
kvalliyurnatt requested a review from a team as a code owner October 23, 2026 21:14
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between f05f4f7 and 755b5c3.

📒 Files selected for processing: 2
  • controllers/nodelabeling_controller.go
  • controllers/nodelabeling_controller_test.go

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

📝 Walkthrough

The GPU-node and orphaned-driver-pod labeling paths now use optimistic-lock merge patches. New tests inject concurrent node updates before the first patch, verify that the patch conflicts, and check that a subsequent labeling attempt preserves the concurrent values.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 755b5

No merge-blocking issue is identified. The node-label patch change appears ready for normal validation before merge.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@kvalliyurnatt kvalliyurnatt changed the title patch node labels with resource version Patch node labels with optimistic lock Oct 23, 2026

This branch has not been deployed

No deployments
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