image-configurator: no ImageConfig collected #24
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.71) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.71 · 501 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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
Diff Size
diff_size
0.372
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.071
Real PR Conversation Timeline
1 comments
"Review active on #24"
general
weight: 0.35
johnbelamaric
Summary
Changed
Reconcileto returnreconcile.TerminalErrorand stop whencollectImageConfigscannot collect any validImageConfigmatching the pod containers.Also added two filters so that this driver only reacts to what it is responsible for:
Why configs with empty
Requestsare skippedWhen an
ImageConfigis authored without arequestsfield, it is impossible to tell which request the config was intended for. Such a config would be applied uniformly to every request, which easily leads to the error case of "multipleImageConfigs targeting the same container with different images". For example, with theResourceClaimTemplatebelow, the second config has norequestsand would be applied together with the first one, producing two different images (ubuntu:latestandfedora:latest) for the same containerapp.<details>
<summary>Example ResourceClaimTemplate</summary>
</details>
Changes
_driver-image-configurator/internal/controller/pod_controller.go_
imageConfigsis empty, returnreconcile.TerminalErrorinstead of returningniland completing successfully.Error message:
collectImageConfigs, skip entries inStatus.Allocation.Devices.ConfigwhoseRequestsfield is empty.collectPendingBindingResultsto skip results whereresult.Driver != DriverName, so results from other drivers are consistently ignored._dra-driver-image-configurator/internal/controller/pod_controller_test.go_
Requestsfields and correspondingwithResult(...)calls to existing test fixtures so they satisfy the new matching logic."test-driver"toDriverNameso they pass the driver filter.TestReconcilewere swapped by mistake relative to what the tests actually verified. This PR swaps the names back so they match the fixtures:-
"nothing happens if claim has no pending binding results"→
"returns an error and reconcile stops in case of no image configs"(the fixture actually exercises the no-ImageConfig case; also updated to expect the new
TerminalErrorbehavior).-
"nothing happens if claim has no ImageConfig"→
"nothing happens if claim has no pending binding results"(the fixture actually exercises the no-pending-binding-results case).
"nothing happens if claims result has different driver"that verifies nothing happens when the claim only contains results for a different driver.errMsg/wantRequeuefields toTestReconcileto enable assertions on the error path.