fix(oidc): treat empty desired thumbprints as no opinion #212
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 308 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.343
Real PR Conversation Timeline
1 comments
"Review active on #212"
general
weight: 0.35
blacksoxx
Issue #, if available: related to aws-controllers-k8s/community#2450 (same symptom, fixed for the create path) and aws-controllers-k8s/community#3123 (same class of bug on EKS adopt-or-create)
Description of changes:
An
OpenIDConnectProvideradopted withservices.k8s.aws/adoption-policy: adopt-or-create(andadoption-fields: {"arn": ...}) never syncs when its spec leavesthumbprintsempty:1. The adoption reads the provider by ARN and marks the CR adopted.
2. The delta compares the empty desired
Thumbprintswith the list IAM computed at creation, and reports a difference.3.
customUpdateOpenIDConnectProvidercallsUpdateOpenIDConnectProviderThumbprintwith an emptyThumbprintList, which the SDK rejects client side:4. The CR stays
ACK.Recoverable/Ready=Falseand retries forever.Late initialization (#159, the fix for community#2450) fills
Spec.Thumbprintsafter a create, but on the adopt path the delta runs first, so it never gets the chance.Thumbprints are optional on
CreateOpenIDConnectProvider, so an empty desired list carries no opinion. This marksThumbprintscompare.is_ignored(asURLalready is) and compares them incustomPreCompareonly when the desired spec lists any. Explicit thumbprints are still enforced, and late initialization still records the computed ones after a create.Reproduced against v1.11.2: a provider created out of band (tagged, with a thumbprint), then a CR with
adopt-or-create+adoption-fields, nothumbprints. The CR is adopted and then loops on the error above.Testing:
TestNewResourceDeltaThumbprints(empty desired, equal, changed, added, and desired-but-not-in-AWS); the empty-desired case fails onmainand passes with this change.go test ./pkg/resource/open_id_connect_provider/passes.Note:
delta.gois edited by hand to match whatis_ignoredgenerates (the Thumbprints block removed, as forURL);apis/v1alpha1/ack-generate-metadata.yamlis not regenerated, as I could not run the code generator here. Happy to regenerate it if you prefer that in this PR.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
🤖 Generated with Claude Code