codeant-ai-for-open-source[bot] commented on code in PR #43437:
URL: https://github.com/apache/superset/pull/43437#discussion_r3839352612
##########
Dockerfile:
##########
@@ -243,6 +265,20 @@ RUN --mount=type=cache,target=${SUPERSET_HOME}/.cache/uv \
uv pip install -e .
RUN python -m compileall /app/superset
+# --- Realtime WebSocket server (part of the official image) ---------------
+# The realtime transport (superset-websocket) is a Node service. Bundle the
+# Node runtime plus the built server and its production dependencies so the
+# official image can launch it via an alternate entrypoint
+# (docker/entrypoints/run-websocket.sh) rather than needing a separate image.
+RUN /app/docker/apt-install.sh libstdc++6
+COPY --from=superset-websocket /usr/local/bin/node /usr/local/bin/node
+COPY --from=superset-websocket --chown=superset:superset \
+ /app/superset-websocket/dist /app/superset-websocket/dist
+COPY --from=superset-websocket --chown=superset:superset \
+ /app/superset-websocket/node_modules /app/superset-websocket/node_modules
+COPY --from=superset-websocket --chown=superset:superset \
+ /app/superset-websocket/package.json /app/superset-websocket/package.json
Review Comment:
**Suggestion:** The final image keeps `/app` as the working directory and
switches to the unprivileged `superset` user. When `LOG_TO_FILE=true` and the
default relative `LOG_FILENAME=app.log` are used, Winston attempts to create
`/app/app.log`, but `/app` is not writable by `superset`, causing file logging
to emit a permission error. Set a writable WebSocket working/log directory or
use a writable absolute log path. [possible bug]
<details>
<summary><b>Severity Level:</b> Minor ๐งน</summary>
```mdx
- โ ๏ธ Official-image file logging cannot create its default log file.
- โ ๏ธ Direct `docker run` deployments receive Winston permission errors.
- โ ๏ธ Compose deployments avoid this through an explicit root override.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
<details>
<summary><b>Prompt for AI Agent ๐ค </b></summary>
```mdx
This is a comment left during a code review.
**Path:** Dockerfile
**Line:** 280:280
**Comment:**
*Possible Bug: The final image keeps `/app` as the working directory
and switches to the unprivileged `superset` user. When `LOG_TO_FILE=true` and
the default relative `LOG_FILENAME=app.log` are used, Winston attempts to
create `/app/app.log`, but `/app` is not writable by `superset`, causing file
logging to emit a permission error. Set a writable WebSocket working/log
directory or use a writable absolute log path.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43437&comment_hash=bb75dadb7bc1430bfbb93190247e9022da3813365a5952d624d9919d8291eb6c&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43437&comment_hash=bb75dadb7bc1430bfbb93190247e9022da3813365a5952d624d9919d8291eb6c&reaction=dislike'>๐</a>
##########
docker/entrypoints/run-websocket.sh:
##########
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+#
+# 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.
+#
+# Launch the realtime WebSocket server (superset-websocket) bundled in the
+# official image. Run it with:
+#
+# docker run <superset-image> /app/docker/entrypoints/run-websocket.sh
+#
+# Configure via environment variables (see superset-websocket/src/config.ts for
+# the full set), which must match the Flask app's WEBSOCKET_* config:
+# PORT, REDIS_HOST, REDIS_PORT, REDIS_PASSWORD, REDIS_SSL,
+# JWT_SECRET (== WEBSOCKET_JWT_SECRET),
+# JWT_COOKIE_NAME (== WEBSOCKET_JWT_COOKIE_NAME, default superset-ws-token),
+# ALLOWED_ORIGINS.
Review Comment:
**Suggestion:** The comment claims to document the full configuration
surface, but it omits supported overrides including `REDIS_USERNAME`,
`LOG_TO_FILE`, `LOG_FILENAME`, `LOG_LEVEL`, and the connection, timeout,
buffer, and StatsD settings defined by `config.ts`. This gives operators an
incomplete and factually incorrect configuration contract for the bundled
server. [comment mismatch]
<details>
<summary><b>Severity Level:</b> Minor ๐งน</summary>
```mdx
- โ ๏ธ Entrypoint comments omit supported operational configuration variables.
- โ ๏ธ Operators may miss Redis, logging, monitoring, or limit settings.
- โ ๏ธ README already points users to `src/config.ts` for the full set.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
<details>
<summary><b>Prompt for AI Agent ๐ค </b></summary>
```mdx
This is a comment left during a code review.
**Path:** docker/entrypoints/run-websocket.sh
**Line:** 25:30
**Comment:**
*Comment Mismatch: The comment claims to document the full
configuration surface, but it omits supported overrides including
`REDIS_USERNAME`, `LOG_TO_FILE`, `LOG_FILENAME`, `LOG_LEVEL`, and the
connection, timeout, buffer, and StatsD settings defined by `config.ts`. This
gives operators an incomplete and factually incorrect configuration contract
for the bundled server.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43437&comment_hash=47d0b069362274717d65624c12441a7554f27f5c4c1ae2095d0eae15b7f8bb78&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43437&comment_hash=47d0b069362274717d65624c12441a7554f27f5c4c1ae2095d0eae15b7f8bb78&reaction=dislike'>๐</a>
--
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]