bito-code-review[bot] commented on code in PR #40507:
URL: https://github.com/apache/superset/pull/40507#discussion_r3463870773


##########
helm/superset/templates/deployment-mcp.yaml:
##########
@@ -0,0 +1,198 @@
+{{/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/}}
+
+{{- if .Values.supersetMcp.enabled -}}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ template "superset.fullname" . }}-mcp
+  namespace: {{ .Release.Namespace }}
+  labels:
+    app: {{ template "superset.name" . }}-mcp
+    chart: {{ template "superset.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
+    {{- if .Values.supersetMcp.deploymentLabels }}
+      {{- toYaml .Values.supersetMcp.deploymentLabels | nindent 4 }}
+    {{- end }}
+  {{- if .Values.supersetMcp.deploymentAnnotations }}
+  annotations: {{- toYaml .Values.supersetMcp.deploymentAnnotations | nindent 
4 }}
+  {{- end }}
+spec:
+  replicas: {{ .Values.supersetMcp.replicaCount }}
+  {{- if .Values.supersetMcp.strategy }}
+  strategy: {{- toYaml .Values.supersetMcp.strategy | nindent 4 }}
+  {{- end }}
+  selector:
+    matchLabels:
+    {{- include "supersetMcp.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      annotations:
+        checksum/superset_config.py: {{ include "superset-config" . | 
sha256sum }}
+        checksum/superset_bootstrap.sh: {{ tpl .Values.bootstrapScript . | 
sha256sum }}
+        checksum/connections: {{ .Values.supersetNode.connections | toYaml | 
sha256sum }}
+        checksum/extraConfigs: {{ .Values.extraConfigs | toYaml | sha256sum }}
+        checksum/extraSecrets: {{ .Values.extraSecrets | toYaml | sha256sum }}
+        checksum/extraSecretEnv: {{ .Values.extraSecretEnv | toYaml | 
sha256sum }}
+        checksum/configOverrides: {{ .Values.configOverrides | toYaml | 
sha256sum }}
+        checksum/configOverridesFiles: {{ .Values.configOverridesFiles | 
toYaml | sha256sum }}
+        {{- if .Values.supersetMcp.forceReload }}
+        # Optionally force the thing to reload
+        force-reload: {{ randAlphaNum 5 | quote }}
+        {{- end }}
+        {{- if .Values.supersetMcp.podAnnotations }}
+          {{- toYaml .Values.supersetMcp.podAnnotations | nindent 8 }}
+        {{- end }}
+        {{- if .Values.supersetMcp.forceReload }}
+        force-reload: {{ randAlphaNum 5 | quote }}
+        {{- end }}

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Duplicate force-reload annotation</b></div>
   <div id="fix">
   
   The `force-reload` annotation is declared twice when 
`.Values.supersetMcp.forceReload` is true. Lines 59-62 add it first, then lines 
66-68 add an identical annotation. The second block overwrites the first, 
making lines 59-62 unreachable dead code. Compare to `deployment.yaml` (line 
62) and `deployment-worker.yaml` (line 62) which only have a single 
`force-reload` block.
   </div>
   
   
   <details>
   <summary>
   <b>Code suggestion</b>
   </summary>
   <blockquote>Check the AI-generated fix before applying</blockquote>
   <div id="code">
   
   
   ```
    --- helm/superset/templates/deployment-mcp.yaml
    +++ helm/superset/templates/deployment-mcp.yaml
    @@ -63,9 +63,6 @@ spec:
             {{- if .Values.supersetMcp.podAnnotations }}
               {{- toYaml .Values.supersetMcp.podAnnotations | nindent 8 }}
             {{- end }}
    -        {{- if .Values.supersetMcp.forceReload }}
    -        force-reload: {{ randAlphaNum 5 | quote }}
    -        {{- end }}
           labels:
             app: "{{ template "superset.name" . }}-mcp"
             release: {{ .Release.Name }}
   ```
   
   </div>
   </details>
   
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #6f39ba</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to