codeant-ai-for-open-source[bot] commented on code in PR #45610:
URL: https://github.com/apache/superset/pull/45610#discussion_r4345029048
##########
.github/workflows/pre-commit.yml:
##########
@@ -151,6 +126,56 @@ jobs:
} >> "$GITHUB_OUTPUT"
fi
+ # The frontend and docs hooks are the only ones that need node_modules,
+ # and prek only runs hooks whose file filters match the changed files.
+ # Skip the installs (about 30 s for superset-frontend, 60 s for docs)
+ # when nothing under those trees changed; "all" (schedules, or no diff
+ # base) still installs both.
+ - name: Determine which node dependencies the hooks need
+ id: node_deps
+ env:
+ MODE: ${{ steps.changed_files.outputs.mode }}
+ CHANGED_FILES: ${{ steps.changed_files.outputs.files }}
+ run: |
+ set -euo pipefail
+ frontend=false; docs=false
+ if [ "${MODE}" = "all" ]; then
+ frontend=true; docs=true
+ elif [ "${MODE}" = "files" ]; then
+ if printf '%s\n' "${CHANGED_FILES}" | grep -qE
'^(superset-frontend|superset-websocket)/'; then frontend=true; fi
Review Comment:
**Suggestion:** `grep -qE` exits after an early match; with `pipefail`, a
large `printf` can get SIGPIPE, making this condition false and skipping
required installs.
**Assessment:** ๐ `Major` ยท ๐ `Occurrence: Rarely` ยท ๐ท๏ธ `Logic error`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=94fafb961ef8452980cc03cae6ebd4f7&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=94fafb961ef8452980cc03cae6ebd4f7&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent ๐ค </b></summary>
```mdx
This is a comment left during a code review.
**Path:** .github/workflows/pre-commit.yml
**Line:** 145:145
**Comment:**
*Logic Error: `grep -qE` exits after an early match; with `pipefail`, a
large `printf` can get SIGPIPE, making this condition false and skipping
required installs.
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%2F45610&comment_hash=3cdcf1bce192dfe439f6f78b2b3d10633cb7e2c21237b536b50ef19f5ccc678f&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45610&comment_hash=3cdcf1bce192dfe439f6f78b2b3d10633cb7e2c21237b536b50ef19f5ccc678f&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]