Skip to content

Re-enable experimental support for esbuild

Warren Gifford requested to merge tr/enable-esbuild into main

Created by: umpox

Problem

esbuild was removed in this PR: https://github.com/sourcegraph/sourcegraph/pull/28784 as it caused yarn install commands to hang in CI.

Solution

I thought this would be related to postinstall as the dependency installed fine, it would only hang when building the dependencies at the final step of the command. This is quite difficult to debug as it only happens in CI (and will poison an agent if occurs), and yarn doesn't seem to output logs from postinstall commands.

Upgrading esbuild should fix this, as it appears to have been a known bug that was recently fixed: https://github.com/evanw/esbuild/pull/1621. Esbuild would try to fetch from the NPM registry directly which has been reported to hang in some environments.

I have tested this by repeating the yarn install commands directly on a buildkite agent. Once I was confident that it did not cause the issue, I started (through normal CI) 50 runs of yarn install across different agents to double check - there were no failures.

Closes https://github.com/sourcegraph/sourcegraph/issues/28785

Merge request reports

Loading