Skip to content

Commit 73aee9c

Browse files
authored
ci: fixing flaky CI (#1302)
This PR will apply the same fix as we did for `.github/workflows/react.yml` to stablize the CI jobs. The underlying issue is that electron binary installation is expensive and would some times flake out. The fix here is to skip the binary setup for workflows that do not need it. The reason this is a problem is that we need to do a `workspace ... install` on contract test installations (as `workspaces focus` does some funny things to non-prod dependencies that may interfere with building the contract tests). Unfortunately, in `yarn`, `workspace... install` does the same thing as `yarn install` (installs all deps). <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/launchdarkly/js-core/pull/1302" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open in Devin Review"> </picture> </a> <!-- devin-review-badge-end --> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk CI-only change that alters dependency install environment for contract-test services; main risk is an unexpected package needing Electron in these jobs. > > **Overview** > Reduces flakiness in the `server-node` and `shopify-oxygen` GitHub Actions workflows by setting `ELECTRON_SKIP_BINARY_DOWNLOAD=1` for the contract-test service `yarn workspace ... install` step. > > This avoids unnecessary Electron binary downloads during CI installs while keeping the rest of the contract-test build and execution flow unchanged. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c320ff7. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent dbb2762 commit 73aee9c

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/server-node.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
workspace_name: '@launchdarkly/node-server-sdk'
3333
workspace_path: packages/sdk/server-node
3434
- name: Install contract test service dependencies
35+
env:
36+
ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
3537
run: yarn workspace @launchdarkly/node-server-sdk-contract-tests install --no-immutable
3638
- name: Build shared contract test utils (server)
3739
run: yarn workspace @launchdarkly/js-contract-test-utils build:server

.github/workflows/shopify-oxygen.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
workspace_name: '@launchdarkly/shopify-oxygen-sdk'
2828
workspace_path: packages/sdk/shopify-oxygen
2929
- name: Install contract test service dependencies
30+
env:
31+
ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
3032
run: yarn workspace @launchdarkly/shopify-oxygen-contract-tests install --no-immutable
3133
- name: Build shared contract test utils
3234
run: yarn workspace @launchdarkly/js-contract-test-utils build:server

0 commit comments

Comments
 (0)