Uh oh!
There was an error while loading. Please reload this page.
Make cluster type overwritable - #184
Conversation
Fix test
34347ed to
a33d6b8CompareUh oh!
There was an error while loading. Please reload this page.
…to mc/cluster-type-overwritable
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
…to mc/cluster-type-overwritable
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThis PR consolidates cluster type detection by migrating from repeated environment queries at runtime to a single configured value set during initialization. ClusterType becomes a string-backed YAML-serializable enum, the defaults API reads from config instead of taking a separate parameter, and all deployment logic uses the configured value consistently. ChangesClusterType Configuration Consolidation
Sequence DiagramsequenceDiagram
participant Deploy as Deployer.Deploy
participant Operator as operator.go
participant Summary as Deployment Summary
Deploy->>Deploy: Check d.config.Roxie.ClusterType for OpenShift4
Deploy->>Operator: deployCentralOperator with config
Operator->>Operator: Use d.config.Roxie.ClusterType for pull secrets
Operator->>Operator: Use d.config.Roxie.ClusterType for Konflux image rewriting
Deploy->>Summary: Display cluster type from d.config.Roxie.ClusterType
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. 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 `@cmd/deploy.go`:
- Around line 350-355: The code only treats types.ClusterTypeUnknown as missing,
but an unset YAML ClusterType unparses to "" so auto-detection is skipped;
update the check around deploySettings.Roxie.ClusterType (the block that calls
env.GetCurrentClusterType()) to treat both empty string and
types.ClusterTypeUnknown as "unknown" (e.g., if deploySettings.Roxie.ClusterType
== "" || deploySettings.Roxie.ClusterType == types.ClusterTypeUnknown) so
getDefaultsForClusterType() receives a valid clusterType; keep the later
assignment to clusterType := deploySettings.Roxie.ClusterType unchanged.
🪄 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: Path: .coderabbit.yml
Review profile: CHILL
Plan: Enterprise
Run ID: 55f138e1-5c57-4633-8146-9ab97ffd84eb
📒 Files selected for processing (10)
cmd/deploy.gointernal/clusterdefaults/clusterdefaults.gointernal/clusterdefaults/clusterdefaults_test.gointernal/deployer/config.gointernal/deployer/deploy_via_operator.gointernal/deployer/deployer.gointernal/deployer/operator.gointernal/env/env_test.gointernal/types/cluster_type.gointernal/types/cluster_type_test.go
Uh oh!
There was an error while loading. Please reload this page.
…rwritable' into mc/cluster-type-overwritable
This is useful for testing.
A follow-up PR (#186) introduces OpenShift4-specific (non Infra!) specific behaviour, this PR allows testing this change.
Summary by CodeRabbit
Bug Fixes
Refactor
Tests