@samitouri / QOS-React / commits / 28b7f0bb71

[ci] Remove references to CIRCLE_NODE_{TOTAL,INDEX}

These env variables were used for circlci parallelization and can now be removed. ghstack-source-id: 224c47194db28f26db847c6ccd63eb7b869c5395 Pull Request resolved: https://github.com/facebook/react/pull/30501

Lauren Tan committed Jul 29, 2024 at 12:55 UTC 28b7f0bb714e09119dd8f102a590d41eb6335952
3 files changed +2 -36
packages/react/src/__tests__/ReactClassEquivalence-test.js
-4
@@ -44,10 +44,6 @@ function runJest(testFile) {
44 cwd,
45 env: Object.assign({}, process.env, {
46 REACT_CLASS_EQUIVALENCE_TEST: 'true',
47 - // Remove these so that the test file is not filtered out by the mechanism
48 - // we use to parallelize tests in CI
49 - CIRCLE_NODE_TOTAL: '',
50 - CIRCLE_NODE_INDEX: '',
47 }),
48 },
49 );
scripts/rollup/build-all-release-channels.js
+1 -21
@@ -124,24 +124,6 @@ async function main() {
124 default:
125 throw new Error(`Unknown release channel ${argv.releaseChannel}`);
126 }
127 - } else if (argv.ci === 'circleci') {
128 - // In CI, we use multiple concurrent processes. Allocate half the processes to
129 - // build the stable channel, and the other half for experimental. Override
130 - // the environment variables to "trick" the underlying build script.
131 - const total = parseInt(process.env.CIRCLE_NODE_TOTAL, 10);
132 - const halfTotal = Math.floor(total / 2);
133 - const index = parseInt(process.env.CIRCLE_NODE_INDEX, 10);
134 - if (index < halfTotal) {
135 - const nodeTotal = halfTotal;
136 - const nodeIndex = index;
137 - buildForChannel('stable', nodeTotal, nodeIndex);
138 - processStable('./build');
139 - } else {
140 - const nodeTotal = total - halfTotal;
141 - const nodeIndex = index - halfTotal;
142 - buildForChannel('experimental', nodeTotal, nodeIndex);
143 - processExperimental('./build');
144 - }
127 } else {
128 // Running locally, no concurrency. Move each channel's build artifacts into
129 // a temporary directory so that they don't conflict.
@@ -165,7 +147,7 @@ async function main() {
147 }
148 }
149
168 -function buildForChannel(channel, nodeTotal, nodeIndex) {
150 +function buildForChannel(channel) {
151 const {status} = spawnSync(
152 'node',
153 ['./scripts/rollup/build.js', ...process.argv.slice(2)],
@@ -174,8 +156,6 @@ function buildForChannel(channel, nodeTotal, nodeIndex) {
156 env: {
157 ...process.env,
158 RELEASE_CHANNEL: channel,
177 - CIRCLE_NODE_TOTAL: nodeTotal,
178 - CIRCLE_NODE_INDEX: nodeIndex,
159 },
160 }
161 );
scripts/rollup/stats.js
+1 -11
@@ -18,17 +18,7 @@ const currentBuildResults = {
18 };
19
20 function saveResults() {
21 - if (process.env.CIRCLE_NODE_TOTAL) {
22 - // In CI, write the bundle sizes to a subdirectory and append the node index
23 - // to the filename. A downstream job will consolidate these into a
24 - // single file.
25 - const nodeIndex = process.env.CIRCLE_NODE_INDEX;
26 - mkdirp.sync('build/sizes');
27 - fs.writeFileSync(
28 - join('build', 'sizes', `bundle-sizes-${nodeIndex}.json`),
29 - JSON.stringify(currentBuildResults, null, 2)
30 - );
31 - } else if (process.env.CI === 'github') {
21 + if (process.env.CI === 'github') {
22 mkdirp.sync('build/sizes');
23 fs.writeFileSync(
24 join('build', 'sizes', `bundle-sizes-${process.env.NODE_INDEX}.json`),