[release-4.21] OCPBUGS-105505: fix(upsert): add desired-state hash to detect spec field removals - #9268
[release-4.21] OCPBUGS-105505: fix(upsert): add desired-state hash to detect spec field removals#9268muraee wants to merge 2 commits into
Conversation
DeepDerivative treats nil/empty fields as "don't care", making it impossible to detect when spec fields like nodeSelector, tolerations, or container args are explicitly removed. This has been a recurring class of bugs (e.g., OCPBUGS-65879). Add a SHA-256 hash of the desired manifest state as a lightweight annotation (~64 bytes). On each reconcile the hash is computed before metadata merging and compared against the stored value. When they differ, an update is forced — catching removals that DeepDerivative misses. This replaces the earlier full-JSON last-applied-configuration approach (PR openshift#7713) which was held due to etcd size explosion at fleet scale and security concerns from embedding Secret data in annotations. A hash has none of these costs. DeepDerivative is retained as a fallback for drift detection, and the existing label-count removal workaround is preserved since hash- based detection cannot drive three-way metadata merges. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
regenerate fixtures with desired-state-hash annotation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@muraee: This pull request references Jira Issue OCPBUGS-105505, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: muraee The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/jira refresh |
|
@muraee: This pull request references Jira Issue OCPBUGS-105505, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Scheduling required tests: |
|
/verified bypass |
|
@muraee: The DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/retest-required |
|
/hold Revision b56d20f was retested 3 times: holding |
|
@muraee: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/retest-required |
manual backport of #7713