Disable If-Match on SimpleUpdate action POST to prevent 412 from Dell Idrac#1020
Merged
Merged
Conversation
… Dell iDRAC Dell iDRAC returns @odata.etag on the UpdateService resource from schema version v1_15_0 onwards (confirmed on R770 v1_15_0 and R6715 v1_16_0). gofish's Entity.PostWithResponse automatically includes that ETag as an If-Match header on any POST. SimpleUpdate is an action endpoint, not a resource modification, so the BMC rejects If-Match with 412 Precondition Failed regardless of whether the ETag value is current. Fix: call DisableEtagMatch(true) on the UpdateService entity before calling PostWithResponse in the shared upgradeVersion helper. This applies to all vendors (Dell, HPE, Lenovo, local) since they all go through the same code path. Also add @odata.etag to the mock UpdateService fixture and enforce the correct 412 behaviour in handleSimpleUpdate so that the test suite would catch any future regression. Fixes ironcore-dev#1015 Signed-off-by: Andrew Dodds <andrew.dodds@sap.com>
Contributor
📝 WalkthroughWalkthroughThe UpdateService mock now exposes an ETag and rejects conditional SimpleUpdate requests. The firmware upgrade path disables ETag matching before posting, with a regression test verifying that no ChangesETag handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
afritzler
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Dell iDRAC returns @odata.etag on the UpdateService resource from schema version v1_15_0 onwards (confirmed on R770 v1_15_0 and R6715 v1_16_0). gofish's Entity.PostWithResponse automatically includes that ETag as an If-Match header on any POST. SimpleUpdate is an action endpoint, not a resource modification, so the BMC rejects If-Match with 412 Precondition Failed regardless of whether the ETag value is current.
Fixes #1015
Summary by CodeRabbit
Bug Fixes
Tests