Add BMCSettingsApplyResultEntry type to BMCSettings status for ETag-based drift detection#994
Add BMCSettingsApplyResultEntry type to BMCSettings status for ETag-based drift detection#994atd9876 wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 34 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (8)
📝 WalkthroughWalkthroughBMCSettings status now stores per-key Redfish URI, ETag, and resolved-value hash metadata. Generated apply configurations, schemas, deep-copy support, CRD definitions, and API documentation were updated accordingly. ChangesBMCSettings apply-result metadata
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Suggested labels: 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 |
c6fb400 to
5db0319
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@api/v1alpha1/bmcsettings_types.go`:
- Around line 177-178: Update the AppliedETags documentation comment to state
that it stores the URI, ETag, and ValueHash from the last successful apply for
each settings key, while retaining the existing drift-detection context.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3a58f8bc-6b59-49ec-806c-99ee92591046
⛔ Files ignored due to path filters (1)
dist/chart/templates/crd/metal.ironcore.dev_bmcsettings.yamlis excluded by!**/dist/**
📒 Files selected for processing (8)
api/v1alpha1/applyconfiguration/api/v1alpha1/bmcsettingsapplyresultentry.goapi/v1alpha1/applyconfiguration/api/v1alpha1/bmcsettingsstatus.goapi/v1alpha1/applyconfiguration/internal/internal.goapi/v1alpha1/applyconfiguration/utils.goapi/v1alpha1/bmcsettings_types.goapi/v1alpha1/zz_generated.deepcopy.goconfig/crd/bases/metal.ironcore.dev_bmcsettings.yamldocs/api-reference/api.md
5db0319 to
72eeb51
Compare
72eeb51 to
628ffa7
Compare
…ased drift detection
Add the BMCSettingsApplyResultEntry struct to api/v1alpha1/bmcsettings_types.go
and the AppliedETags field to BMCSettingsStatus:
type BMCSettingsApplyResultEntry struct {
URI string `json:"uri,omitempty"`
ETag string `json:"etag,omitempty"`
ValueHash string `json:"valueHash,omitempty"`
}
AppliedETags map[string]BMCSettingsApplyResultEntry `json:"appliedETags,omitempty"`
- URI: the Redfish resource URI from the apply response (Location header for
POST-created resources; request URI for PATCH)
- ETag: drift-detection token after the last successful apply — either a real
ETag returned by the BMC (e.g. W/"20B77DA6") or a SHA-256 hash of the GET
response prefixed with "hash:sha256:" for BMCs that do not return ETag headers
- ValueHash: SHA-256 of the effective (resolved) value at apply time, used to
detect desired-state changes from ConfigMap/Secret rotation without relying
on metadata.generation
The type is named BMCSettingsApplyResultEntry (rather than ApplyResultEntry) to
follow the existing sub-type naming convention (BMCSettingsSpec, BMCSettingsStatus,
BMCSettingsSetStatus, etc.) and to scope it clearly to the BMCSettings resource.
Regenerate CRD manifests, Helm chart, API docs, and deepcopy/applyconfiguration
code via `make manifests generate helm docs`. No controller logic changes in this commit.
Fixes ironcore-dev#915
Part of ironcore-dev#858
Signed-off-by: Andrew Dodds <andrew.dodds@sap.com>
628ffa7 to
5a4095b
Compare
Add the BMCSettingsApplyResultEntry struct to api/v1alpha1/bmcsettings_types.go and the AppliedETags field to BMCSettingsStatus:
type BMCSettingsApplyResultEntry struct {
URI string
json:"uri,omitempty"ETag string
json:"etag,omitempty"ValueHash string
json:"valueHash,omitempty"}
AppliedETags map[string]BMCSettingsApplyResultEntry
json:"appliedETags,omitempty"The type is named BMCSettingsApplyResultEntry (rather than ApplyResultEntry) to follow the existing sub-type naming convention (BMCSettingsSpec, BMCSettingsStatus, BMCSettingsSetStatus, etc.) and to scope it clearly to the BMCSettings resource.
Regenerate CRD manifests and deepcopy/applyconfiguration code via
make manifests generate. No controller logic changes in this commit.Fixes #915
Part of #858
Summary by CodeRabbit
New Features
Documentation