Skip to content

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Oct 7, 2025

Summary by CodeRabbit

  • New Features

    • Improved CI parallelization and shard-aware job naming for faster, clearer test runs.
  • Bug Fixes

    • More robust handling of binary paths and change-stream edge cases to reduce rare failures.
    • Prevented unintended data mutation and tightened minor version-handling resilience.
  • Chores

    • Streamlined test scripts and updated dependency resolution.
    • Added Prettier ignore rules, relaxed selected lint rules, and small build script formatting cleanup.

@fengmk2 fengmk2 requested a review from Copilot October 7, 2025 06:11
@graphite-app
Copy link

graphite-app bot commented Oct 7, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • MQ - adds this PR to the back of the merge queue
  • Hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables test sharding in GitHub Actions to parallelize test execution across multiple workers, reducing CI build time by distributing tests across 5 shards for the main test jobs.

Key changes:

  • Updated @eggjs/scripts dependency from fixed version to beta to support test sharding
  • Added test sharding configuration with 5 parallel workers for PostgreSQL and MySQL test jobs
  • Added environment variables to enable test shard coordination

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
package.json Updated @eggjs/scripts to beta version to support test sharding functionality
.github/workflows/nodejs.yml Added test sharding matrix configuration and environment variables for parallel test execution

@gemini-code-assist
Copy link

Summary of Changes

Hello @fengmk2, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on updating a key development dependency, @eggjs/scripts, to its beta release. This update is a preparatory step, intended to introduce the necessary features or stability required to implement and enable test sharding, thereby improving the efficiency of the testing process.

Highlights

  • Dependency Update for Test Sharding: The @eggjs/scripts dependency has been updated from ^4.0.0 to the "beta" version in package.json, which is a foundational step towards enabling test sharding.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/nodejs.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Warning

Rate limit exceeded

@fengmk2 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 53 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between ea728cd and f196523.

📒 Files selected for processing (1)
  • .docker/build.sh (1 hunks)

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a CI typecheck job and converts several test jobs to shard-aware matrices with CI_NODE_INDEX/CI_NODE_TOTAL and shard-aware naming (one gated to master); simplifies npm test scripts and bumps @eggjs/scripts to beta; adds .prettierignore; applies defensive/nullish checks, lint-suppression comments, makes ModelConvertor non-mutating, small service refactor, and a tsconfig comment.

Changes

Cohort / File(s) Summary
CI workflow restructuring
.github/workflows/nodejs.yml
Added top-level typecheck job; centralized matrix strategy for test jobs (test-postgresql-fs-nfs, test-mysql57-fs-nfs, test-mysql57-s3-nfs) using shardIndex/shardTotal; injects CI_NODE_INDEX/CI_NODE_TOTAL env vars; shard-aware job naming; test-mysql57-s3-nfs gated to master with a reduced matrix.
NPM scripts & dependency
package.json
Removed lint/typecheck from the top-level test script and removed lint from test:postgresql (scripts now call local test targets directly); bumped @eggjs/scripts from ^4.0.0 to beta.
Prettier ignore
.prettierignore
Added ignore entries: CHANGELOG.md, __snapshots__, pnpm-lock.yaml, node_modules.
Lint rules change
.oxlintrc.json
Added allowances for no-param-reassign and unicorn/prefer-at (retains unicorn/no-array-sort).
Adapter defensive tweaks
app/common/adapter/binary/FirefoxBinary.ts, app/common/adapter/changesStream/CnpmjsorgChangesStream.ts
Use nullish coalescing for trailing-path extraction and optional chaining (last?.gmt_modified) to guard against undefined values.
Service minor refactor
app/core/service/FixNoPaddingVersionService.ts
Introduced local lastVersion variable and used it for next-id calculation; removed an ESLint disable comment.
Controllers lint-suppression
app/port/controller/PackageVersionFileController.ts, app/port/controller/package/SavePackageVersionController.ts
Added inline oxlint disable comments before parameter reassignment operations; no runtime behavior change.
Model conversion non-mutating
app/repository/util/ModelConvertor.ts
Stop mutating input data; create entityData = data ?? {} and use it for lodashSet and constructor payload.
TS config comment
tsconfig.json
Added a comment noting leoric supports ES2021 before the target; no compiler option changes.
Docker build script formatting
.docker/build.sh
Combined npm install step into a single chained line with a non-failing `npminstall -c

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as Developer
    participant GH as GitHub Actions
    participant Type as Typecheck Job
    participant Shard as Sharded Test Jobs

    Dev->>GH: Push / Open PR
    GH->>Type: checkout → setup-node(22) → install → lint → typecheck → build
    par Sharded tests
      GH->>Shard: Start matrix shards (node-version/os, shardIndex/shardTotal)
      Shard->>Shard: set env CI_NODE_INDEX / CI_NODE_TOTAL
      Shard-->>GH: Report shard result
    end
    GH-->>Dev: CI statuses per job/shard
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • elrrrrrrr
  • killagu

Poem

I hop through shards with nimble paws,
Guarded paths and trimmed-up laws.
CI hums, scripts running light,
Payloads safe and tests take flight.
A rabbit cheers — tidy code, goodnight 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “test: enable test shard” succinctly captures the primary change of the pull request, which is to introduce sharding for test jobs in CI; it is directly related to the core update and is concise without extraneous details.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link

socket-security bot commented Oct 7, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​eggjs/​scripts@​4.0.0 ⏵ 5.0.0-beta.27100 +28100100 +1100 +16100

View full report

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the @eggjs/scripts dependency to use the beta tag, presumably to enable test sharding. While this may enable new functionality, using a distribution tag like beta introduces risks to build reproducibility and stability. My review comment suggests pinning the dependency to a specific pre-release version to mitigate these risks.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (2)
app/port/controller/package/SavePackageVersionController.ts (1)

120-121: Consider using a local variable instead of reassigning the parameter.

While the lint suppression is valid, reassigning function parameters can make code harder to reason about. Consider using a local variable instead.

Apply this diff to refactor:

-    // oxlint-disable-next-line no-param-reassign
-    fullname = fullname.trim();
+    const trimmedFullname = fullname.trim();
-    if (fullname !== pkg.name) {
+    if (trimmedFullname !== pkg.name) {
       throw new UnprocessableEntityError(
-        `fullname(${fullname}) not match package.name(${pkg.name})`
+        `fullname(${trimmedFullname}) not match package.name(${pkg.name})`
       );
     }

Then update all subsequent references to fullname to use trimmedFullname instead (lines 132, 182, etc.).

app/port/controller/PackageVersionFileController.ts (1)

168-169: Consider using a local variable instead of reassigning the parameter.

While the lint suppression is valid, reassigning function parameters can make code harder to reason about. Consider using a local variable instead.

Apply this diff to refactor:

-    // oxlint-disable-next-line no-param-reassign
-    path = `/${path}`;
+    const absolutePath = `/${path}`;
     const packageVersion = await this.#getPackageVersion(
       ctx,
       fullname,
       scope,
       name,
       versionSpec
     );
-    if (path.endsWith('/')) {
-      const directory = path.slice(0, -1);
+    if (absolutePath.endsWith('/')) {
+      const directory = absolutePath.slice(0, -1);
       const files = await this.#listFilesByDirectory(packageVersion, directory);

Then update all subsequent references to path to use absolutePath instead (lines 177, 179, 194, 196, 203, 206, 212).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a05dbe and 13d07ea.

📒 Files selected for processing (11)
  • .oxlintrc.json (1 hunks)
  • app/common/adapter/binary/FirefoxBinary.ts (1 hunks)
  • app/common/adapter/changesStream/CnpmjsorgChangesStream.ts (1 hunks)
  • app/core/service/CreateHookTriggerService.ts (1 hunks)
  • app/core/service/FixNoPaddingVersionService.ts (1 hunks)
  • app/port/controller/PackageVersionFileController.ts (1 hunks)
  • app/port/controller/package/SavePackageVersionController.ts (1 hunks)
  • app/repository/util/ModelConvertor.ts (2 hunks)
  • test/common/adapter/binary/ChromeForTestingBinary.test.ts (1 hunks)
  • test/common/adapter/binary/EdgedriverBinary.test.ts (1 hunks)
  • tsconfig.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • test/common/adapter/binary/ChromeForTestingBinary.test.ts
  • test/common/adapter/binary/EdgedriverBinary.test.ts
  • app/core/service/FixNoPaddingVersionService.ts
  • app/core/service/CreateHookTriggerService.ts
🧰 Additional context used
📓 Path-based instructions (2)
app/port/controller/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Place HTTP controllers under app/port/controller/

Files:

  • app/port/controller/PackageVersionFileController.ts
  • app/port/controller/package/SavePackageVersionController.ts
app/repository/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Place data access repositories under app/repository/

Files:

  • app/repository/util/ModelConvertor.ts
🧬 Code graph analysis (1)
app/repository/util/ModelConvertor.ts (1)
app/repository/PackageRepository.ts (1)
  • model (230-251)
🪛 Biome (2.1.2)
.oxlintrc.json

[error] 19-19: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 19-19: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 19-19: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 19-19: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 20-20: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 20-20: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 20-20: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: test on mysql (node@20, shard@2/3)
  • GitHub Check: test on mysql (node@22, shard@2/3)
  • GitHub Check: test on mysql (node@22, shard@0/3)
  • GitHub Check: test on mysql (node@24, shard@0/3)
  • GitHub Check: test on mysql (node@20, shard@1/3)
  • GitHub Check: test on postgresql (node@24, shard@2/3)
  • GitHub Check: test on mysql (node@22, shard@1/3)
  • GitHub Check: test on postgresql (node@24, shard@1/3)
  • GitHub Check: test on postgresql (node@20, shard@1/3)
  • GitHub Check: test on postgresql (node@24, shard@0/3)
  • GitHub Check: test on postgresql (node@22, shard@1/3)
  • GitHub Check: test on postgresql (node@20, shard@2/3)
  • GitHub Check: test on postgresql (node@22, shard@0/3)
  • GitHub Check: test on postgresql (node@22, shard@2/3)
  • GitHub Check: test on postgresql (node@20, shard@0/3)
  • GitHub Check: test-mysql57-s3-nfs (20, ubuntu-latest)
  • GitHub Check: test-mysql57-s3-nfs (22, ubuntu-latest)
  • GitHub Check: build-and-push-image
🔇 Additional comments (5)
tsconfig.json (1)

4-4: LGTM! ES2022 target enables modern syntax.

Updating the target to ES2022 enables Array.prototype.at() and other modern features used throughout this PR. The change is appropriate and aligns with the codebase modernization effort.

app/common/adapter/binary/FirefoxBinary.ts (1)

94-95: LGTM! Clean refactor with proper fallback.

The change to parts.at(-1) ?? '' is more readable than parts[parts.length - 1]. The ?? '' fallback correctly handles the edge case where href is just '/' (resulting in an empty parts array).

app/common/adapter/changesStream/CnpmjsorgChangesStream.ts (1)

56-57: LGTM! Defensive refactor with modern syntax.

The changes to use results.at(-1) and optional chaining last?.gmt_modified are appropriate. While the guard condition at line 54 (results?.length >= limit) ensures the array is non-empty, the optional chaining adds defensive safety without any downside.

.oxlintrc.json (1)

19-20: LGTM!

The lint rule additions are appropriate and align with the inline suppressions added in the controller files.

Note: The static analysis hints from Biome are false positives—Biome is attempting to parse an oxlint configuration file, which uses a different schema.

app/repository/util/ModelConvertor.ts (1)

120-136: Excellent refactor to eliminate input mutation!

The change from reassigning the data parameter to creating a local entityData variable is a significant improvement. This prevents side effects by ensuring the original input object is never mutated, which aligns with functional programming principles and makes the code more predictable.

@codecov
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.16%. Comparing base (2e51399) to head (f196523).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
app/core/service/FixNoPaddingVersionService.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #839      +/-   ##
==========================================
- Coverage   95.31%   95.16%   -0.15%     
==========================================
  Files         197      197              
  Lines       23904    23906       +2     
  Branches     2188     2301     +113     
==========================================
- Hits        22784    22751      -33     
- Misses       1120     1155      +35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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)
app/core/service/FixNoPaddingVersionService.ts (1)

24-27: Use explicit bigint conversion instead of as unknown as number.

Replace the double‐cast with one of the following, depending on whether you need a number or a bigint:

// to number
id = Number(lastVersion.id) + 1;

// or to stay in bigint
id = lastVersion.id + 1n;

Adjust the type of id accordingly.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 13d07ea and 48f26d9.

📒 Files selected for processing (5)
  • .oxlintrc.json (1 hunks)
  • app/common/adapter/binary/FirefoxBinary.ts (1 hunks)
  • app/common/adapter/changesStream/CnpmjsorgChangesStream.ts (1 hunks)
  • app/core/service/FixNoPaddingVersionService.ts (1 hunks)
  • tsconfig.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/common/adapter/changesStream/CnpmjsorgChangesStream.ts
  • tsconfig.json
🧰 Additional context used
📓 Path-based instructions (1)
app/core/service/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Place business logic services under app/core/service/

Files:

  • app/core/service/FixNoPaddingVersionService.ts
🪛 Biome (2.1.2)
.oxlintrc.json

[error] 19-19: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 19-19: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 19-19: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 19-19: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 20-20: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 20-20: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 20-20: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 20-20: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 21-21: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 21-21: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)


[error] 21-21: End of file expected

Use an array for a sequence of values: [1, 2]

(parse)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: test on mysql (node@24, shard@2/3)
  • GitHub Check: test on postgresql (node@24, shard@0/3)
  • GitHub Check: test on mysql (node@24, shard@0/3)
  • GitHub Check: test on mysql (node@24, shard@1/3)
  • GitHub Check: test on postgresql (node@22, shard@1/3)
  • GitHub Check: test on mysql (node@22, shard@2/3)
  • GitHub Check: test on mysql (node@20, shard@1/3)
  • GitHub Check: test on postgresql (node@20, shard@1/3)
  • GitHub Check: test on mysql (node@22, shard@0/3)
  • GitHub Check: test on postgresql (node@20, shard@2/3)
  • GitHub Check: test on postgresql (node@24, shard@1/3)
  • GitHub Check: test on postgresql (node@24, shard@2/3)
  • GitHub Check: test on mysql (node@20, shard@0/3)
  • GitHub Check: test on mysql (node@22, shard@1/3)
  • GitHub Check: test on postgresql (node@22, shard@2/3)
  • GitHub Check: test on postgresql (node@22, shard@0/3)
  • GitHub Check: test on postgresql (node@20, shard@0/3)
  • GitHub Check: test-mysql57-s3-nfs (20, ubuntu-latest)
  • GitHub Check: test-mysql57-s3-nfs (22, ubuntu-latest)
  • GitHub Check: build-and-push-image
🔇 Additional comments (2)
.oxlintrc.json (1)

19-21: LGTM!

The lint rule relaxations are appropriate for project-specific needs. The Biome parse errors flagged in static analysis are false positives—JSON5 comments are valid in oxlint configuration files.

app/common/adapter/binary/FirefoxBinary.ts (1)

95-95: LGTM!

The nullish coalescing operator provides a safe fallback when parts is empty (e.g., when href is / or contains only separators). This defensive approach prevents potential undefined values from propagating.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 23d8fca and ea728cd.

📒 Files selected for processing (1)
  • .docker/build.sh (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Create and publish a Docker image
.docker/build.sh

[error] 1-1: Command failed with exit code 1: /bin/sh -c .docker/build.sh

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: test on mysql (node@24, shard@0/3)
  • GitHub Check: test on postgresql (node@24, shard@2/3)
  • GitHub Check: test on postgresql (node@24, shard@1/3)
  • GitHub Check: test on postgresql (node@22, shard@1/3)
  • GitHub Check: test on postgresql (node@22, shard@2/3)
  • GitHub Check: test on postgresql (node@20, shard@0/3)
  • GitHub Check: test on mysql (node@24, shard@1/3)
  • GitHub Check: test on postgresql (node@22, shard@0/3)
  • GitHub Check: test on postgresql (node@24, shard@0/3)
  • GitHub Check: test on mysql (node@24, shard@2/3)
  • GitHub Check: test on postgresql (node@20, shard@2/3)
  • GitHub Check: test on postgresql (node@20, shard@1/3)
  • GitHub Check: test on mysql (node@22, shard@1/3)
  • GitHub Check: test on mysql (node@22, shard@0/3)
  • GitHub Check: test on mysql (node@20, shard@1/3)
  • GitHub Check: test on mysql (node@20, shard@2/3)
  • GitHub Check: test on mysql (node@22, shard@2/3)
  • GitHub Check: test on mysql (node@20, shard@0/3)

.docker/build.sh Outdated
Comment on lines 3 to 5
node -v && npm -v \
&& npm install -g npminstall --registry=https://registry.npmmirror.com \
&& (npminstall -c || true) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Don’t gate the build on npm install -g npminstall.

Chaining everything with && means a transient/global install failure now aborts the script before (npminstall -c || true) can fall back, whereas previously the script kept going. The CI Docker build is already failing with exit 1 because of this regression. Please either drop the && before this step or wrap it in a tolerant guard (e.g., (npm install -g … || true)), so the build remains resilient.

🤖 Prompt for AI Agents
In .docker/build.sh around lines 3 to 5, the script currently uses "&& npm
install -g npminstall ..." which gates the rest of the build on a
potentially-failing global install; change this to be tolerant so transient
failures don't abort the script: either remove the preceding "&&" so the command
is not required to succeed for subsequent commands, or wrap the install in a
tolerant guard like "(npm install -g npminstall --registry=... || true)" so the
failure is ignored and execution continues to the fallback "(npminstall -c ||
true)".

@fengmk2 fengmk2 merged commit 324511d into master Oct 7, 2025
24 of 26 checks passed
@fengmk2 fengmk2 deleted the test-shard branch October 7, 2025 14:14
fengmk2 pushed a commit that referenced this pull request Oct 15, 2025
[skip ci]

## 4.10.0 (2025-10-15)

* feat: Add time field to abbreviated metadata for pnpm time-based resolution (#834) ([2e51399](2e51399)), closes [#834](#834)
* feat: mirror microsoft/ripgrep-prebuilt binary (#842) ([606c983](606c983)), closes [#842](#842) [#841](#841)
* docs: Add comprehensive internal API documentation for direct HTTP requests (#832) ([5b1da74](5b1da74)), closes [#832](#832) [#709](#709)
* docs: Enhance Copilot instructions with DDD architecture [skip ci] (#838) ([cb93141](cb93141)), closes [#838](#838) [#837](#837)
* test: enable test shard (#839) ([324511d](324511d)), closes [#839](#839)
* refactor: use tegg and egg v4 beta (#836) ([c7df471](c7df471)), closes [#836](#836)
@github-actions
Copy link

🎉 This PR is included in version 4.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants