Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): further consolidate NODE_OPTIONS #12217

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ jobs:
if: ${{ matrix.command == 'frontend' && needs.setup.outputs.frontend_change == 'true' }}
run: |
./gradlew :datahub-frontend:build :datahub-web-react:build --parallel
env:
NODE_OPTIONS: "--max-old-space-size=4096"
- name: Gradle compile (jdk8) for legacy Spark
if: ${{ matrix.command == 'except_metadata_ingestion' && needs.setup.outputs.backend_change == 'true' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/contributor-open-pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get and Format Username (PR only)
if: github.event_name == 'pull_request'
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/docker-unified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,6 @@ jobs:
run: |
./gradlew :datahub-frontend:dist -x test -x yarnTest -x yarnLint --parallel
mv ./datahub-frontend/build/distributions/datahub-frontend-*.zip datahub-frontend.zip
env:
NODE_OPTIONS: "--max-old-space-size=4096"
- name: Build and push
uses: ./.github/actions/docker-custom-build-and-push
with:
Expand Down
2 changes: 1 addition & 1 deletion datahub-web-react/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ task yarnServe(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {

task yarnTest(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
// Explicitly runs in non-watch mode.
args = ['run', 'test', 'run']
args = ['run', project.hasProperty('withCoverage') ? 'test-coverage' : 'test', 'run']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where is this property being set? We would want the coverage to be generated when gradle runs the test task (like all other projects).

}

task yarnLint(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
Expand Down
11 changes: 6 additions & 5 deletions datahub-web-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,19 @@
"scripts": {
"analyze": "source-map-explorer 'dist/assets/*.js'",
"start": "yarn run generate && vite",
"ec2-dev": "yarn run generate && CI=true;export CI;vite",
"build": "yarn run generate && NODE_OPTIONS='--max-old-space-size=4096 --openssl-legacy-provider' CI=false vite build",
"test": "vitest",
"generate": "graphql-codegen --config codegen.yml",
"ec2-dev": "yarn run generate && CI=true vite",
"build": "yarn run generate && CI=false NODE_OPTIONS='--max-old-space-size=5120 --openssl-legacy-provider' vite build",
"test": "NODE_OPTIONS='--max-old-space-size=5120 --openssl-legacy-provider' vitest",
"test-coverage": "yarn test run --coverage",
"generate": "NODE_OPTIONS='--max-old-space-size=5120 --openssl-legacy-provider' graphql-codegen --config codegen.yml",
"lint": "eslint . --ext .ts,.tsx --quiet && yarn format-check && yarn type-check",
"lint-fix": "eslint '*/**/*.{ts,tsx}' --quiet --fix && yarn format",
"format-check": "prettier --check src",
"format": "prettier --write src",
"type-check": "tsc --noEmit",
"type-watch": "tsc -w --noEmit",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"build-storybook": "NODE_OPTIONS='--max-old-space-size=5120 --openssl-legacy-provider' storybook build"
},
"browserslist": {
"production": [
Expand Down
5 changes: 5 additions & 0 deletions datahub-web-react/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ export default defineConfig(({ mode }) => {
envPrefix: 'REACT_APP_',
build: {
outDir: 'dist',
target: 'esnext',
minify: 'esbuild',
reportCompressedSize: false,
// Limit number of worker threads to reduce CPU pressure
workers: 3, // default is number of CPU cores
},
server: {
open: false,
Expand Down
Loading