MAO: Validate GCP disk license URLs at admission - #1553
redhat-chai-bot wants to merge 1 commit into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (54)
📒 Files selected for processing (3)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. WalkthroughThe webhook now validates GCP disk license URLs against supported formats. Tests cover valid and invalid license values. The Go module replace block now maps ChangesGCP license validation
OTE-tests module replacement
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The validation accepts the license forms supported by the selected API and rejects invalid forms as intended. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 golangci-lint (2.13.2)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@redhat-chai-bot: all tests passed! 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. |
|
/hold Holding this PR until QE testing has been performed on the implementation to prove it works. AI-generated. Review for accuracy. |
Summary
Extend the existing Machine validating webhook to validate
GCPDisk.Licensesfor GCP provider specs.The validation accepts both the full Google Compute license URI and the short self-link form, while preserving nil/empty backward compatibility. Invalid host, path, project ID, and license resource-name values are rejected at the indexed provider-spec field path.
Implementation
validateGCPDiskswebhook path; no new webhook server is introduced.Validation
make vendormake crds-syncGOFLAGS=-mod=vendor go test ./pkg/webhooks -run '^TestValidateGCPProviderSpec$' -count=1make unitmake lintmake vetgit diff --checkmake checkAll completed successfully.
Related
AI-generated. Review for accuracy.
@damdo requested in Slack thread
Warning
Content scanning did not attest this change.
The scanner could not produce a verdict for the pushed content (
never_attempted), so it has not been checked for credentials or malware.Content scanning currently fails open, so this did not hold the change request for review — please review the diff with that in mind.
Summary by CodeRabbit
Bug Fixes
Tests