Skip to content

SANDBOX-1889: update CRD default phoneLookupMode to disabled#1274

Merged
fbm3307 merged 2 commits into
codeready-toolchain:masterfrom
fbm3307:phone-lookup-default-disabled
Jul 9, 2026
Merged

SANDBOX-1889: update CRD default phoneLookupMode to disabled#1274
fbm3307 merged 2 commits into
codeready-toolchain:masterfrom
fbm3307:phone-lookup-default-disabled

Conversation

@fbm3307

@fbm3307 fbm3307 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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

  • Bug Fixes
    • Updated the default phone lookup setting to disabled, so new configurations no longer use the previous default.
    • Aligned the documented default value with the actual behavior shown in the configuration schema.

Generated CRD update reflecting the default phoneLookupMode change
from "log" to "disabled" in the API types.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Walkthrough

This 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.

Changes

ToolchainConfig CRD Update

Layer / File(s) Summary
phoneLookupMode default change
config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml
The CRD schema's phoneLookupMode field default is changed from "log" to "disabled", with the description text updated to reflect the new default.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested labels: feature

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating the CRD default phoneLookupMode to disabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the feature New feature or request label Jul 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Keep phoneLookupMode default aligned with the Go type and config fallback. config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml now defaults this field to disabled, but the ToolchainConfig markers still declare log and the runtime fallback still returns PhoneLookupModeLog. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 715f8ae and 469fb6e.

📒 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

View job details

##[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

View job details

##[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-405 still declares // +kubebuilder:default="log" for Spec.Host.RegistrationService.Verification.PhoneLookupMode.
  • api/v1alpha1/zz_generated.openapi.go:2948-2950 still documents the field as “Defaults to log.”

codeready-toolchain/member-operator

  • api/v1alpha1/toolchainconfig_types.go:400-405 still has the kubebuilder:default="log" annotation.
  • api/v1alpha1/zz_generated.openapi.go:2948-2950 still says the default is log.

codeready-toolchain/toolchain-common

  • pkg/configuration/configuration.go:332-336 returns toolchainv1alpha1.PhoneLookupModeLog when PhoneLookupMode is unset.
  • pkg/configuration/configuration_test.go:72 expects the default to be PhoneLookupModeLog.

codeready-toolchain/registration-service

  • pkg/configuration/configuration.go:332-336 also defaults unset PhoneLookupMode to PhoneLookupModeLog.
  • pkg/configuration/configuration_test.go:72 expects PhoneLookupModeLog as the default.
  • pkg/verification/service/verification_service.go:237-266 treats disabled as skip, enabled as enforce, and everything else via the configured mode; so a default change affects runtime behavior if config is omitted.

@openshift-ci

openshift-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [MatousJobanek,alexeykazakov,fbm3307,metlos]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

@fbm3307 fbm3307 merged commit f1b715f into codeready-toolchain:master Jul 9, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants