fix invalid ifname and add a test for webhook-whereabouts #231
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.45) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 413 lines diff across 5 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.361
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #231"
general
weight: 0.35
tamilmani1989
<!-- Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
https://git.k8s.io/community/contributors/guide/first-contribution.md#your-first-contribution
and developer guide
https://git.k8s.io/community/contributors/devel/development.md#development-guide
2. Please label this pull request according to what type of issue you are
addressing, especially if this is a release targeted pull request. For
reference on required PR/issue labels, read here:
https://git.k8s.io/community/contributors/devel/sig-release/release.md#issuepr-kind-label
3. Ensure you have added or ran the appropriate tests for your PR:
https://git.k8s.io/community/contributors/devel/sig-testing/testing.md
4. If the PR is unfinished, see how to mark it:
https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests
-->
What type of PR is this?
<!--
Add one of the following kinds:
/kind bug
/kind dependency
/kind cleanup
/kind documentation
/kind feature
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
/kind bug
What this PR does / why we need it:
webhook-whereabouts passes req.Device.Name verbatim as CNI_IFNAME when invoking the whereabouts IPAM plugin.
For PCI devices such as SR-IOV VFs, Device.Name is PCI-derived (pkg/names.NormalizePCIAddress: 0000:27:00.2 → pci-0000-27-00-2, 16 chars). This exceeds the CNI interface-name limit (IFNAMSIZ - 1 = 15), so CNI's interface-name validation rejects it and the IPAM ADD fails — IP allocation does not work for these devices.
This PR fixes the bug using the following approach:
Device.Name already valid (short, non-PCI names) → used verbatim;
PCI name → strip the pci- prefix (pci-0000-27-00-2 → 0000-27-00-2), re-validating the result so we never emit an over-length name on the assumption it fit;
Which issue(s) this PR is related to:
<!--
Please link relevant issues to help with tracking.
To automatically close the linked issue(s) when this PR is merged,
add the word "Fixes" before the issue number or link.
Do not use "Fixes" if the PR is of kind
failing-testorflake.Reference KEPs when applicable in addition to specific issues.
Examples:
Fixes #<issue number>
<issue link> (issue in a different repository)
KEP: https://github.com/kubernetes/enhancements/issues/<kep-issue-number>
If there is no associated issue, then write "N/A".
-->
Fixes #225
Special notes for your reviewer:
None.
Does this PR introduce a user-facing change?
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires
additional action from users switching to the new release, include the string
"action required".
For more information on release notes see: https://git.k8s.io/community/contributors/guide/release-notes.md
-->
``
release-note
``NOTE