-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix nil pointer #643
base: main
Are you sure you want to change the base?
fix nil pointer #643
Conversation
WalkthroughThis pull request removes the dashboard container image configuration from both Changes
Sequence Diagram(s)sequenceDiagram
participant T as Template Processor
participant CM as "white-label" ConfigMap
T->>CM: Query ConfigMap in "cozy-dashboard" namespace
alt ConfigMap exists
CM-->>T: Return locale value
T->>T: Set $locale with retrieved value
else ConfigMap missing
T->>T: Initialize $locale as empty
end
T->>T: Set displayHtmlName and displayName using $locale
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/system/keycloak-configure/templates/configure-kk.yaml (1)
33-36
: Conditional Locale Assignment and Indentation WarningInitializing
$locale
with an empty string and then conditionally assigning it using the$wlConfigmap
is an effective safeguard against nil pointer exceptions. However, YAMLlint has flagged an indentation warning on line 35. Consider adjusting the indentation of this template directive to align with the YAML formatting expectations, ensuring that linting tools do not raise unnecessary warnings.🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 35-35: wrong indentation: expected 0 but found 2
(indentation)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
packages/core/platform/bundles/paas-full.yaml
(0 hunks)packages/core/platform/bundles/paas-hosted.yaml
(0 hunks)packages/system/dashboard/values.yaml
(0 hunks)packages/system/keycloak-configure/templates/configure-kk.yaml
(3 hunks)
💤 Files with no reviewable changes (3)
- packages/system/dashboard/values.yaml
- packages/core/platform/bundles/paas-full.yaml
- packages/core/platform/bundles/paas-hosted.yaml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
packages/system/keycloak-configure/templates/configure-kk.yaml
[warning] 35-35: wrong indentation: expected 0 but found 2
(indentation)
🔇 Additional comments (2)
packages/system/keycloak-configure/templates/configure-kk.yaml (2)
10-10
: Addition of $wlConfigmap VariableThe new variable
$wlConfigmap
retrieves the "white-label" ConfigMap from the "cozy-dashboard" namespace. This retrieval is key to conditionally determining the locale later in the template, which helps avoid nil pointer issues when the ConfigMap is missing.
91-94
: Updated Display Name Fields in ClusterKeycloakRealmThe conditional block that adds the new
displayHtmlName
anddisplayName
fields based on the value of$locale
is well implemented. Ensure that any downstream components referencing the old field (displayNameHtml
) are updated accordingly so that the renaming does not introduce integration issues.
Summary by CodeRabbit