Add PhoneLookupMode test config builder#532
Conversation
- Add Verification().PhoneLookupMode() builder method for ToolchainConfig tests - Update go.mod to reference toolchainapi with phone-lookup types Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Feny Mehta <fbm3307@gmail.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🧰 Additional context used📓 Path-based instructions (1)**⚙️ CodeRabbit configuration file
Files:
🔀 Multi-repo context codeready-toolchain/api, codeready-toolchain/host-operator, codeready-toolchain/toolchain-e2e[::codeready-toolchain/api::]
[::codeready-toolchain/host-operator::]
[::codeready-toolchain/toolchain-e2e::]
Conclusion:
🔇 Additional comments (1)
WalkthroughBumps the direct require of github.com/codeready-toolchain/api and trims several indirect pins in go.mod, and adds two fluent setters—PhoneLookupMode and PhoneLookupExcludedCountries—on RegistrationServiceVerificationOption in test config. ChangesDependency updates and test configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@go.mod`:
- Line 126: Remove the forbidden replace directive that swaps the protected
module github.com/codeready-toolchain/api for github.com/fbm3307/toolchainapi in
go.mod; either delete the replace line entirely or move it out of the committed
go.mod into a local-only workflow (e.g., a developer-only script or a replace in
a temporary local go.mod) so the repository no longer contains the replace
directive for the protected module and CI will pass.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: 89d9e1fc-8867-4876-9797-b8f73ec26907
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (2)
go.modpkg/test/config/toolchainconfig.go
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: GolangCI Lint
- GitHub Check: test
- GitHub Check: Verify Dependencies
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.
Files:
pkg/test/config/toolchainconfig.gogo.mod
🧠 Learnings (1)
📚 Learning: 2025-10-24T10:18:07.200Z
Learnt from: MatousJobanek
Repo: codeready-toolchain/toolchain-common PR: 496
File: pkg/owners/fetcher_test.go:29-32
Timestamp: 2025-10-24T10:18:07.200Z
Learning: In the codeready-toolchain repositories, the import pattern `controllerruntime "sigs.k8s.io/controller-runtime"` should be kept for consistency across the codebase, even if specific functions like SetControllerReference are used from sub-packages like controllerutil.
Applied to files:
go.mod
🪛 GitHub Actions: ci-check-gomod / 0_go.mod replacements.txt
go.mod
[error] 1-1: CI check failed: go.mod contains forbidden module replacements for protected modules. Error: 'the above replacement(s) are not allowed in go.mod' (go list -m all piped to grep -E detects replacements matching PROTECTED_MODULES).
🔀 Multi-repo context codeready-toolchain/api, codeready-toolchain/host-operator, codeready-toolchain/toolchain-e2e
[::codeready-toolchain/api::] — repository clone failed; could not fetch files (network/clone error). Unable to verify new phone-lookup types or consumers in this repo. Please provide access or ensure repo is reachable so I can inspect api PR #509.
[::codeready-toolchain/host-operator::] — no matches for PhoneLookupMode / PhoneLookup / RegistrationService.Verification found.
[::codeready-toolchain/toolchain-e2e::]
- testsupport/wait/host.go:1690 — returns comparison against actual.Spec.Host.RegistrationService.Verification.Enabled
- testsupport/wait/host.go:1694 — marshals actual.Spec.Host.RegistrationService.Verification.Enabled
Implication: toolchain-e2e references RegistrationService.Verification.Enabled in host objects and may need updates if the underlying types in github.com/codeready-toolchain/api (the module replaced in go.mod) change shape (e.g., new enum/field for PhoneLookupMode). Verify that the api changes are backward-compatible for Verification.* fields.
🔇 Additional comments (1)
pkg/test/config/toolchainconfig.go (1)
508-513: LGTM!
Signed-off-by: Feny Mehta <fbm3307@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
- Add Verification().PhoneLookupExcludedCountries() builder method - Bump toolchainapi replace for annotation reduction and new field Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Feny Mehta <fbm3307@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Feny Mehta <fbm3307@gmail.com>
Signed-off-by: Feny Mehta <fbm3307@gmail.com>
|



related Prs:
api : codeready-toolchain/api#509
Registration-Service: codeready-toolchain/registration-service#595
host operator: codeready-toolchain/host-operator#1268
toolchain-e2e: codeready-toolchain/toolchain-e2e#1285
Summary by CodeRabbit