Skip to content

fix: limit build times for export and website to 5m#4400

Open
jloh02 wants to merge 2 commits into
masterfrom
fix/limit-build
Open

fix: limit build times for export and website to 5m#4400
jloh02 wants to merge 2 commits into
masterfrom
fix/limit-build

Conversation

@jloh02
Copy link
Copy Markdown
Member

@jloh02 jloh02 commented May 20, 2026

Closes #4368

We should limit our build times in order not to incur fees for additional builds and handle long builds accordingly

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
nusmods-export Ignored Ignored Preview May 20, 2026 3:36pm
nusmods-website Ignored Ignored Preview May 20, 2026 3:36pm

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 20, 2026

Confidence Score: 5/5

Safe to merge — both configs now enforce a hard 5-minute build cap with guaranteed SIGKILL escalation, and the export config is brought in line with the website config.

The change is minimal and targeted: two config files receive the same timeout --kill-after=30s 5m wrapper. The --kill-after flag ensures the process is forcibly killed if it ignores SIGTERM, and the non-zero exit codes from timeout (124/137) correctly surface as Vercel build failures. No logic, dependencies, or application code is affected.

No files require special attention.

Important Files Changed

Filename Overview
export/vercel.json Adds installCommand (pnpm install --frozen-lockfile) and wraps buildCommand with timeout --kill-after=30s 5m to cap build duration at 5 minutes with guaranteed SIGKILL escalation.
website/vercel.json Wraps existing buildCommand with timeout --kill-after=30s 5m to enforce the same 5-minute cap as export, consistent with the new export config.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Vercel triggers build] --> B[installCommand\npnpm install --frozen-lockfile]
    B --> C[buildCommand\ntimeout --kill-after=30s 5m pnpm build]
    C --> D{pnpm build finishes\nwithin 5 minutes?}
    D -- Yes --> E[Exit 0\nBuild succeeds]
    D -- No --> F[timeout sends SIGTERM\nat 5 m]
    F --> G{Process exits\nwithin 30 s?}
    G -- Yes --> H[Exit 124\nBuild fails - timeout]
    G -- No --> I[timeout sends SIGKILL\nat 5 m 30 s]
    I --> J[Exit 137\nBuild fails - killed]
Loading

Reviews (2): Last reviewed commit: "Apply suggestions from code review" | Re-trigger Greptile

Comment thread website/vercel.json Outdated
Comment thread export/vercel.json Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.40%. Comparing base (988c6fd) to head (f6007cf).
⚠️ Report is 228 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4400      +/-   ##
==========================================
+ Coverage   54.52%   56.40%   +1.88%     
==========================================
  Files         274      317      +43     
  Lines        6076     6962     +886     
  Branches     1455     1679     +224     
==========================================
+ Hits         3313     3927     +614     
- Misses       2763     3035     +272     

☔ 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.

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@jloh02 jloh02 requested a review from leslieyip02 May 21, 2026 04:43
@ravern
Copy link
Copy Markdown
Member

ravern commented May 22, 2026

@greptileai review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: limit vercel build duration

2 participants