Skip to content

SANDBOX-1769 | docs: design of the "disabled integrations" feature#1255

Open
MikelAlejoBR wants to merge 2 commits intocodeready-toolchain:masterfrom
MikelAlejoBR:SANDBOX-1769-docs-feature-enabled-integrations-ho
Open

SANDBOX-1769 | docs: design of the "disabled integrations" feature#1255
MikelAlejoBR wants to merge 2 commits intocodeready-toolchain:masterfrom
MikelAlejoBR:SANDBOX-1769-docs-feature-enabled-integrations-ho

Conversation

@MikelAlejoBR
Copy link
Copy Markdown

@MikelAlejoBR MikelAlejoBR commented Apr 10, 2026

These are the design documents used for the "disabled integrations" feature, which aims at showing or hiding the available integrations in Sandbox depending on the configuration specified in the ToolchainConfig resource.

Related PRs

Jira ticket

[SANDBOX-1769]

Summary by CodeRabbit

  • Documentation
    • Added a design proposal for a configuration-driven way to hide broken or unwanted downstream integrations in the Developer Sandbox UI.
    • Specified a denylist-style configuration (empty = all enabled) and how that configuration will be delivered to the UI via the existing UI configuration response.
    • Recorded resolved design questions, validation approach, and an implementation and rollout plan with testing guidance.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

Walkthrough

Adds two proposal documents specifying a denylist disabledIntegrations string-list on ToolchainConfig.spec.host.registrationService and that the registration service’s JWT-protected GET /api/v1/uiconfig will include a normalized disabledIntegrations array (nil[]). UI changes are out of scope.

Changes

Cohort / File(s) Summary
Integration Visibility Design
docs/proposals/enabled-integrations-design.md
New proposal defining an “Integration Visibility Configuration”: adds disabledIntegrations to ToolchainConfig.spec.host.registrationService, enumerates integration identifiers via a typed enum, normalizes JSON response (nil[]), and outlines implementation steps (API types, CRD regen, registration-service controller + unit tests).
Design Questions / Decisions
docs/proposals/enabled-integrations-questions.md
New Q&A recording resolved choices: denylist approach, []string CRD type with kubebuilder enum validation, placement under spec.host.registrationService, reuse of existing JWT GET /api/v1/uiconfig endpoint, JSON property named disabledIntegrations, and empty array semantics meaning “nothing disabled”.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly references the specific feature being documented ('disabled integrations') and accurately describes the main change (design documentation for this feature).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
docs/proposals/enabled-integrations-design.md (1)

44-47: Document config propagation behavior for incident response.

Lines 44-47 describe cache-based loading, but the doc does not define expected propagation timing (or fallback behavior if refresh fails). Since this feature is meant for operational mitigation, add explicit expectations (refresh trigger/interval and stale-config behavior) so operators can rely on it during outages.

As per coding guidelines, “Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.”

Also applies to: 108-108

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/proposals/enabled-integrations-design.md` around lines 44 - 47, Document
expected propagation timing and stale-config behavior for the
disabledIntegrations flow: state that how often Registration service refreshes
ToolchainConfig (the refresh interval or that it reacts to watch events), how
commonconfig.LoadLatest is triggered (poll interval or event-driven), what
constitutes a successful refresh, and the fallback when refresh fails (e.g.,
continue serving last-known disabledIntegrations from GET /api/v1/uiconfig,
expose a “lastUpdated” timestamp and an “staleAfter” threshold, and define
operator actions if data is stale). Reference
ToolchainConfig.disabledIntegrations, the Registration service’s use of
commonconfig.LoadLatest, the JWT-secured GET /api/v1/uiconfig endpoint, and the
UI hide behavior in the doc so operators know timing and recovery expectations.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/proposals/enabled-integrations-design.md`:
- Around line 53-57: The doc currently allows "free-form" integration
identifiers which risks drift and invalid values; update the proposal to list
canonical integration IDs (e.g., "openshift-lightspeed", "devspaces", "workato")
and add a contract section for validation: require backend to validate entries
in disabledIntegrations against the canonical set, return a clear error for
unknown IDs, and define expected behavior (ignore unknown with warning vs.
reject request) and UI display rules for validation errors so both backend and
UI stay in sync.

In `@docs/proposals/enabled-integrations-questions.md`:
- Around line 29-47: Document and implement identifier validation semantics for
the disabledIntegrations []string: declare the canonical source of truth for
allowed IDs (an enum in the CRD schema or a registry/lookup like an integrations
registry), specify where validation runs (CRD OpenAPI schema enum, admission
webhook, or registration-service guardrail in ValidateIntegrationIDs), and
define the runtime behavior for unknown values (reject on apply with a clear
error, or accept with a logged warning and no-op). Update the proposal text to
reference the specific symbols/places to change: the disabledIntegrations field,
the CRD schema enum, the admission webhook handler
(validateAdmissionReview/ValidateIntegrationIDs), or the registration-service
registration guard so reviewers know where validation is enforced and what
client-visible errors/logging will occur.

---

Nitpick comments:
In `@docs/proposals/enabled-integrations-design.md`:
- Around line 44-47: Document expected propagation timing and stale-config
behavior for the disabledIntegrations flow: state that how often Registration
service refreshes ToolchainConfig (the refresh interval or that it reacts to
watch events), how commonconfig.LoadLatest is triggered (poll interval or
event-driven), what constitutes a successful refresh, and the fallback when
refresh fails (e.g., continue serving last-known disabledIntegrations from GET
/api/v1/uiconfig, expose a “lastUpdated” timestamp and an “staleAfter”
threshold, and define operator actions if data is stale). Reference
ToolchainConfig.disabledIntegrations, the Registration service’s use of
commonconfig.LoadLatest, the JWT-secured GET /api/v1/uiconfig endpoint, and the
UI hide behavior in the doc so operators know timing and recovery expectations.
🪄 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: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: f7c077c4-4df4-49eb-8109-87a7f6978e51

📥 Commits

Reviewing files that changed from the base of the PR and between 0f504c6 and 2b57f1a.

📒 Files selected for processing (2)
  • docs/proposals/enabled-integrations-design.md
  • docs/proposals/enabled-integrations-questions.md

Comment thread docs/proposals/enabled-integrations-design.md Outdated
Comment thread docs/proposals/enabled-integrations-questions.md
@MikelAlejoBR MikelAlejoBR changed the title SANDBOX-1769 | docs: design of the "enabled integrations" feature SANDBOX-1769 | docs: design of the "disabled integrations" feature Apr 14, 2026
Comment on lines +117 to +121
2. Run code generation (`make generate`) to update DeepCopy methods and CRD manifests.

### Phase 2: Host operator (`codeready-toolchain/host-operator`)

1. Bump the `codeready-toolchain/api` dependency in `go.mod` to pick up the new field, then run `make generate manifests` to regenerate the CRD YAML in `config/crd/bases/`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just a detail - make generate dispatches the generated CRDs as well, there is no manifests target.
probably a room for improving either a command, or a skill, or some other file

These are the design documents used for the "disabled integrations"
feature, which aims at showing or hiding the available integrations in
Sandbox depending on the configuration specified in the ToolchainConfig
resource.

SANDBOX-1769
@MikelAlejoBR MikelAlejoBR force-pushed the SANDBOX-1769-docs-feature-enabled-integrations-ho branch from 58f28b9 to f7ada0a Compare April 15, 2026 15:32
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/proposals/enabled-integrations-design.md (1)

23-23: Optional: Add language identifier to fenced code block.

The ASCII diagram would satisfy the markdown linter by adding a language identifier (e.g., text or leave it as-is since the diagram is clear without it).

📝 Markdown linter fix (optional)
-```
+```text
 ┌──────────────┐       ┌──────────────────┐       ┌─────────────────────┐
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/proposals/enabled-integrations-design.md` at line 23, The fenced code
block containing the ASCII diagram should include a language identifier (e.g.,
add "text" after the opening ``` of the diagram block) so the markdown linter
recognizes it as a plain-text/code fence; update the opening fence in the ASCII
diagram block (the fenced code block that begins with ``` and contains the box
diagram) to be ```text (or another suitable identifier) and leave the diagram
content unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/proposals/enabled-integrations-design.md`:
- Line 23: The fenced code block containing the ASCII diagram should include a
language identifier (e.g., add "text" after the opening ``` of the diagram
block) so the markdown linter recognizes it as a plain-text/code fence; update
the opening fence in the ASCII diagram block (the fenced code block that begins
with ``` and contains the box diagram) to be ```text (or another suitable
identifier) and leave the diagram content unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: d16d747b-50b8-4c63-b4a1-ad1b03571df6

📥 Commits

Reviewing files that changed from the base of the PR and between 2b57f1a and f7ada0a.

📒 Files selected for processing (2)
  • docs/proposals/enabled-integrations-design.md
  • docs/proposals/enabled-integrations-questions.md


## Overview

Developer Sandbox integrates with several downstream services (e.g. OpenShift Lightspeed, DevSpaces, Workato, etc.). When one of these downstream integrations experiences issues, there is currently no way to hide it from customers without a code change and redeployment.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I don't know what Workato is but I feel like we should develop an integration with them

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Oh, actually it's a thing... Whoops

@sonarqubecloud
Copy link
Copy Markdown

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 16, 2026

@MikelAlejoBR: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e e2f9ebd link true /test e2e

Full PR test history. Your PR dashboard.

Details

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

Copy link
Copy Markdown
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

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

Looks good 👍

Comment on lines +81 to +87
const (
IntegrationOpenShift IntegrationName = "openshift"
IntegrationOpenShiftAI IntegrationName = "openshift-ai"
IntegrationDevSpaces IntegrationName = "devspaces"
IntegrationAnsibleAutomationPlatform IntegrationName = "ansible-automation-platform"
IntegrationOpenShiftVirtualization IntegrationName = "openshift-virtualization"
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not really sure if we need all those constants here - basically we could avoid maintaining another list of trial names ( which is already present in the UI code ) , if possible I would just add the field as list of strings and we can configure the names manually IMHO.

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 17, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexeykazakov, MatousJobanek, mfrancisc, MikelAlejoBR

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,mfrancisc]

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants