Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,43 @@ jobs:
strategy:
matrix:
include:
- name: Node 20
- name: Node 20, Parse Server 8
NODE_VERSION: 20.19.0
- name: Node 22
PARSE_SERVER_VERSION: 8
- name: Node 22, Parse Server 8
NODE_VERSION: 22.12.0
- name: Node 24
PARSE_SERVER_VERSION: 8
- name: Node 24, Parse Server 8
NODE_VERSION: 24.1.0
PARSE_SERVER_VERSION: 8
Comment on lines +86 to +88

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check parse-server v9 and v8 package.json engines field
echo "=== Parse Server v9 (latest in 9.x) ==="
curl -s https://registry.npmjs.org/parse-server | jq '.versions | keys | map(select(startswith("9."))) | .[-1]' -r | head -1 > /tmp/ps9_latest.txt
PS9_VERSION=$(cat /tmp/ps9_latest.txt)
echo "Latest v9: $PS9_VERSION"
curl -s "https://registry.npmjs.org/parse-server/$PS9_VERSION" | jq '.engines // empty'

echo ""
echo "=== Parse Server v8 (latest in 8.x) ==="
curl -s https://registry.npmjs.org/parse-server | jq '.versions | keys | map(select(startswith("8."))) | .[-1]' -r > /tmp/ps8_latest.txt
PS8_VERSION=$(cat /tmp/ps8_latest.txt)
echo "Latest v8: $PS8_VERSION"
curl -s "https://registry.npmjs.org/parse-server/$PS8_VERSION" | jq '.engines // empty'

Repository: parse-community/Parse-SDK-JS

Length of output: 367


Node 24.1.0 violates Parse Server's engines constraint (requires >=24.11.0)

Both Parse Server v8 (8.6.2) and v9 (9.3.0-alpha.6) explicitly require Node.js 24 >=24.11.0 <25.0.0. Pinning Node 24.1.0 will cause npm install/npm ci to fail with an engine error, preventing the workflow from running — consistent with the PR author's report that this step currently fails.

Update the pinned version to 24.11.0 or later:

🔧 Proposed fix
           - name: Node 24, Parse Server 8
-            NODE_VERSION: 24.1.0
+            NODE_VERSION: 24.11.0
             PARSE_SERVER_VERSION: 8
           - name: Node 24, Parse Server 9
-            NODE_VERSION: 24.1.0
+            NODE_VERSION: 24.11.0
             PARSE_SERVER_VERSION: 9
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 86 - 88, The CI step "Node 24, Parse
Server 8" is pinned to NODE_VERSION: 24.1.0 which violates Parse Server's
engines (requires >=24.11.0); update the NODE_VERSION value used in that job
(refer to the job name "Node 24, Parse Server 8" and the NODE_VERSION
environment variable) to 24.11.0 or a newer 24.x release so npm install/ci won't
fail due to engine constraints.

- name: Node 20, Parse Server 9
NODE_VERSION: 20.19.0
PARSE_SERVER_VERSION: 9
- name: Node 22, Parse Server 9
NODE_VERSION: 22.12.0
PARSE_SERVER_VERSION: 9
- name: Node 24, Parse Server 9
NODE_VERSION: 24.1.0
PARSE_SERVER_VERSION: 9
fail-fast: false
name: Build - ${{ matrix.name }}
steps:
- name: Fix usage of insecure GitHub protocol
run: sudo git config --system url."https://github".insteadOf "git://github"
- uses: actions/checkout@v4
- name: Use Node.js
- name: Use Node.js ${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.NODE_VERSION }}
cache: npm
- run: npm ci
# Run unit tests
- run: npm test -- --maxWorkers=4
# Run integration tests
- run: npm run test:mongodb
- name: Install Parse Server ${{ matrix.PARSE_SERVER_VERSION }}
run: npm i -DE parse-server@${{ matrix.PARSE_SERVER_VERSION }}
- name: Install dependencies
run: npm ci
Comment on lines +109 to +112

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

npm i -DE followed by npm ci makes the first install entirely redundant

npm i -DE parse-server@${{ matrix.PARSE_SERVER_VERSION }} installs all dependencies (including parse-server) into node_modules, then updates both package.json and package-lock.json. The very next npm ci step deletes node_modules and reinstalls from scratch using those just-updated files. The entire work done by npm i is discarded.

The clean pattern for this use case is to run npm ci first to get a reproducible baseline, then overlay parse-server on top without touching the lock file:

♻️ Proposed fix
-    - name: Install Parse Server ${{ matrix.PARSE_SERVER_VERSION }}
-      run: npm i -DE parse-server@${{ matrix.PARSE_SERVER_VERSION }}
-    - name: Install dependencies
-      run: npm ci
+    - name: Install dependencies
+      run: npm ci
+    - name: Install Parse Server ${{ matrix.PARSE_SERVER_VERSION }}
+      run: npm install --no-save parse-server@${{ matrix.PARSE_SERVER_VERSION }}

This also removes the unintended side-effect of mutating package.json and package-lock.json in the checkout, and avoids the double-download that contributes to the extra CI time dplewis flagged.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 109 - 112, The "Install Parse Server
${{ matrix.PARSE_SERVER_VERSION }}" step is redundant because it runs npm i
before the "Install dependencies" npm ci which then deletes node_modules; fix by
switching the order and avoiding mutation of lockfiles: run the "Install
dependencies" (npm ci) first, then run the "Install Parse Server ${{
matrix.PARSE_SERVER_VERSION }}" step but install parse-server without updating
package.json/package-lock (e.g., use npm install --no-save parse-server@${{
matrix.PARSE_SERVER_VERSION }} or npm i --no-save parse-server@...), so the
"Install Parse Server" step overlays the installed tree without touching
lockfiles or being erased by npm ci.

- name: Run unit tests
run: npm test -- --maxWorkers=4
- name: Run integration tests
run: npm run test:mongodb
env:
CI: true
Comment on lines +113 to 118

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

CI: true env var scoped only to the integration test step, not unit tests

env: CI: true is placed under the npm run test:mongodb step. The preceding npm test step runs without CI=true, so any test-framework behavior gated on that variable (e.g., disabling interactive watch mode, strict warning-as-error modes) will differ between the two steps. Move it to a job-level env: block so both steps share the same environment.

♻️ Proposed fix
     timeout-minutes: 30
+    env:
+      CI: true
     strategy:
       ...
     steps:
     ...
-    - name: Run integration tests
-      run: npm run test:mongodb
-      env:
-        CI: true
+    - name: Run integration tests
+      run: npm run test:mongodb
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 113 - 118, The CI environment variable
CI: true is only set for the "Run integration tests" step, causing the "Run unit
tests" step (the npm test -- --maxWorkers=4 step) to run with a different
environment; move the CI: true assignment from the step-level under the "Run
integration tests" step to a job-level env: block so both steps ("Run unit
tests" and "Run integration tests") inherit CI=true and run with consistent
test-framework behavior.

- name: Upload code coverage
Expand All @@ -106,6 +122,8 @@ jobs:
# Set to `true` once codecov token bug is fixed; https://github.com/parse-community/parse-server/issues/9129
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true