SANDBOX-1889: update CRD default phoneLookupMode to disabled#1274
Conversation
Generated CRD update reflecting the default phoneLookupMode change from "log" to "disabled" in the API types. Co-authored-by: Cursor <cursoragent@cursor.com>
WalkthroughThis change updates the ToolchainConfig CRD schema, changing the default value of the phoneLookupMode field from "log" to "disabled" and updating its description text to match the new default. ChangesToolchainConfig CRD Update
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml (1)
367-377: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winKeep
phoneLookupModedefault aligned with the Go type and config fallback.config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yamlnow defaults this field todisabled, but theToolchainConfigmarkers still declarelogand the runtime fallback still returnsPhoneLookupModeLog. That leaves the API schema and actual behavior inconsistent for omitted values.🤖 Prompt for 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. In `@config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml` around lines 367 - 377, The default for phoneLookupMode is inconsistent between the CRD schema and the runtime/config definitions. Update the ToolchainConfig source that defines the phoneLookupMode default and fallback so it matches the intended API behavior, and make sure the generated CRD in config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml is regenerated from that source rather than edited independently. Check the phoneLookupMode markers, the PhoneLookupMode fallback logic, and any related config getter so omitted values resolve to the same default everywhere.Source: Linked repositories
🤖 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.
Outside diff comments:
In `@config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml`:
- Around line 367-377: The default for phoneLookupMode is inconsistent between
the CRD schema and the runtime/config definitions. Update the ToolchainConfig
source that defines the phoneLookupMode default and fallback so it matches the
intended API behavior, and make sure the generated CRD in
config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml is
regenerated from that source rather than edited independently. Check the
phoneLookupMode markers, the PhoneLookupMode fallback logic, and any related
config getter so omitted values resolve to the same default everywhere.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: b1d9e1da-75ca-4ff8-9684-94cc74debd37
📒 Files selected for processing (1)
config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
codeready-toolchain/registration-service(manual)codeready-toolchain/member-operator(manual)codeready-toolchain/api(manual)codeready-toolchain/toolchain-common(manual)codeready-toolchain/host-operator(manual)codeready-toolchain/toolchain-e2e(manual)
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: GolangCI Lint
- GitHub Check: test
⚠️ CI failures not shown inline (2)
GitHub Actions: publish-components-for-e2e-tests / Build & push operator bundles & dashboard image for e2e tests: SANDBOX-1889: update CRD default phoneLookupMode to disabled
Conclusion: failure
##[group]Run actions/checkout@v7
with:
ref: phone-lookup-default-disabled
repository: fbm3307/host-operator
fetch-depth: 0
***REDACTED***
ssh-strict: true
ssh-user: git
persist-credentials: true
clean: true
sparse-checkout-cone-mode: true
fetch-tags: false
show-progress: true
lfs: false
submodules: false
set-safe-directory: true
allow-unsafe-pr-checkout: false
env:
GOPATH: /tmp/go
##[endgroup]
##[error]Refusing to check out fork pull request code from a 'pull_request_target' workflow. This workflow runs with the base repository's GITHUB_TOKEN, secrets, default-branch cache scope, and runner access. Fetching and executing a fork's code in that trusted context commonly leads to "pwn request" vulnerabilities. To opt in, review the risks at https://gh.io/securely-using-pull_request_target and set 'allow-unsafe-pr-checkout: true' on the actions/checkout step.
GitHub Actions: publish-components-for-e2e-tests / 0_Build & push operator bundles & dashboard image for e2e tests.txt: SANDBOX-1889: update CRD default phoneLookupMode to disabled
Conclusion: failure
##[group]Run actions/checkout@v7
with:
ref: phone-lookup-default-disabled
repository: fbm3307/host-operator
fetch-depth: 0
***REDACTED***
ssh-strict: true
ssh-user: git
persist-credentials: true
clean: true
sparse-checkout-cone-mode: true
fetch-tags: false
show-progress: true
lfs: false
submodules: false
set-safe-directory: true
allow-unsafe-pr-checkout: false
env:
GOPATH: /tmp/go
##[endgroup]
##[error]Refusing to check out fork pull request code from a 'pull_request_target' workflow. This workflow runs with the base repository's GITHUB_TOKEN, secrets, default-branch cache scope, and runner access. Fetching and executing a fork's code in that trusted context commonly leads to "pwn request" vulnerabilities. To opt in, review the risks at https://gh.io/securely-using-pull_request_target and set 'allow-unsafe-pr-checkout: true' on the actions/checkout step.
🧰 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:
config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml
🔀 Multi-repo context
Linked repositories findings
codeready-toolchain/api
api/v1alpha1/toolchainconfig_types.go:400-405still declares// +kubebuilder:default="log"forSpec.Host.RegistrationService.Verification.PhoneLookupMode.api/v1alpha1/zz_generated.openapi.go:2948-2950still documents the field as “Defaults tolog.”
codeready-toolchain/member-operator
api/v1alpha1/toolchainconfig_types.go:400-405still has thekubebuilder:default="log"annotation.api/v1alpha1/zz_generated.openapi.go:2948-2950still says the default islog.
codeready-toolchain/toolchain-common
pkg/configuration/configuration.go:332-336returnstoolchainv1alpha1.PhoneLookupModeLogwhenPhoneLookupModeis unset.pkg/configuration/configuration_test.go:72expects the default to bePhoneLookupModeLog.
codeready-toolchain/registration-service
pkg/configuration/configuration.go:332-336also defaults unsetPhoneLookupModetoPhoneLookupModeLog.pkg/configuration/configuration_test.go:72expectsPhoneLookupModeLogas the default.pkg/verification/service/verification_service.go:237-266treatsdisabledas skip,enabledas enforce, and everything else via the configured mode; so a default change affects runtime behavior if config is omitted.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexeykazakov, fbm3307, MatousJobanek, metlos The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|



Generated CRD update reflecting the default phoneLookupMode change from "log" to "disabled" in the API types.
Related PRs:
API : codeready-toolchain/api#515
registration service: codeready-toolchain/registration-service#604
Toolchain-e2e: codeready-toolchain/toolchain-e2e#1292
Assisted By: Cursor
Summary by CodeRabbit