codeant-ai-for-open-source[bot] commented on code in PR #45909:
URL: https://github.com/apache/superset/pull/45909#discussion_r4428987821


##########
.github/workflows/pre-commit.yml:
##########
@@ -174,8 +174,22 @@ jobs:
         uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # 
v7.1.0
         with:
           node-version-file: "superset-frontend/.nvmrc"
-          cache: "npm"
-          cache-dependency-path: "superset-frontend/package-lock.json"
+
+      # Not setup-node's built-in `cache: npm`: it keys on the exact
+      # package-lock.json hash with no fallback, so every lockfile change
+      # makes npm ci re-download every tarball (including xlsx from
+      # cdn.sheetjs.com), exposing the install to any registry/CDN outage
+      # at that moment, which is how runs 40649064300 and 40679638770
+      # failed. Restoring from the prefix instead cuts the downloads to the
+      # changed packages.
+      - name: Cache npm
+        if: steps.changed_files.outputs.needs_node == 'true'

Review Comment:
   **Suggestion:** Websocket-only changes set `needs_node` but skip `npm ci`; 
this can save a cache with only `npx` data at the lockfile key, which later 
frontend runs cannot update.
   
   **Assessment:** ๐ŸŸ  `Major` ยท ๐Ÿ” `Occurrence: Rarely` ยท ๐Ÿท๏ธ `Cache`
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
 [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=68fd7cfacc15468491dd903c4799f641&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=68fd7cfacc15468491dd903c4799f641&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:** 186:186
   **Comment:**
        *Cache: Websocket-only changes set `needs_node` but skip `npm ci`; this 
can save a cache with only `npx` data at the lockfile key, which later frontend 
runs cannot update.
   
   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%2F45909&comment_hash=2dc1d44b6baf6823a12aa3c4f86a49a8e2fa3ba273ab1ca992efb76f12598fef&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45909&comment_hash=2dc1d44b6baf6823a12aa3c4f86a49a8e2fa3ba273ab1ca992efb76f12598fef&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]

  • [PR] fix(ci... sadpandajoe (via GitHub) via notifications
    • Re: [P... netlify[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... hainenber (via GitHub) via notifications
    • Re: [P... sadpandajoe (via GitHub) via notifications
    • Re: [P... geido (via GitHub) via notifications
    • Re: [P... hainenber (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... sadpandajoe (via GitHub) via notifications
    • Re: [P... sadpandajoe (via GitHub) via notifications

Reply via email to