A platform for community discussion. Free, open, simple.
DEV: Drop the low-memory handling from the ember build (#44894)
David Taylor4a8bfcbe9b7b
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 6cff232a54e..5a9291d61db 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -65,7 +65,6 @@ jobs:S3_SYSTEM_TEST_ACCESS_KEY_ID: minioadminS3_SYSTEM_TEST_SECRET_ACCESS_KEY: minioadminDISCOURSE_TURBO_RSPEC_RETRY_AND_LOG_FLAKY_TESTS: ${{ (matrix.build_type == 'system' || matrix.build_type == 'backend') && '1' }}- CHEAP_SOURCE_MAPS: "1"DBUS_SESSION_BUS_ADDRESS: "unix:path=/dev/null"EMBER_ENV: developmentDISCOURSE_CI_MINIFY: ${{ matrix.build_type == 'system' && '1' || '' }}diff --git a/script/assemble_ember_build.rb b/script/assemble_ember_build.rbindex 70d81be5773..dc57b89e55b 100755--- a/script/assemble_ember_build.rb+++ b/script/assemble_ember_build.rb@@ -9,7 +9,6 @@ require "open3"require "json"require "time"require "parallel"-require "etc"require_relative "../lib/version"@@ -55,14 +54,6 @@ def core_tree_hashendend-def node_heap_size_limit- capture("node", "-e", "console.log(v8.getHeapStatistics().heap_size_limit/1024/1024)").to_f-end--def low_memory_environment?- node_heap_size_limit < 2048-end-def resolved_ember_envENV["EMBER_ENV"] || "development"end@@ -145,18 +136,6 @@ endbuild_cmd = %w[pnpm build]build_env = { "CI" => "1", "SKIP_DB_AND_REDIS" => "1" }-if Etc.nprocessors > 2- # Anything more than 2 doesn't seem to improve build times- build_env["JOBS"] ||= "2"-end--if low_memory_environment?- log "Node.js heap_size_limit is less than 2048MB. Setting --max-old-space-size=2048 and CHEAP_SOURCE_MAPS=1"- build_env["NODE_OPTIONS"] = "--max_old_space_size=2048"- build_env["CHEAP_SOURCE_MAPS"] = "1"- build_env["JOBS"] = "1"-end-core_build_reusable =existing_core_build_usable? ||(!ci_minify? && download_prebuild_assets! && existing_core_build_usable?)