Repository: facebook/react
Pull request: [ci] Remove references to CIRCLE_NODE_{TOTAL,INDEX}

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* __->__ #30501
* #30500
* #30499

These env variables were used for circlci parallelization and can now be
removed.

Changed files:
filename: packages/react/src/__tests__/ReactClassEquivalence-test.js
patch: @@ -44,10 +44,6 @@ function runJest(testFile) {
       cwd,
       env: Object.assign({}, process.env, {
         REACT_CLASS_EQUIVALENCE_TEST: 'true',
-        // Remove these so that the test file is not filtered out by the mechanism
-        // we use to parallelize tests in CI
-        CIRCLE_NODE_TOTAL: '',
-        CIRCLE_NODE_INDEX: '',
       }),
     },
   );

filename: scripts/rollup/build-all-release-channels.js
patch: @@ -124,24 +124,6 @@ async function main() {
       default:
         throw new Error(`Unknown release channel ${argv.releaseChannel}`);
     }
-  } else if (argv.ci === 'circleci') {
-    // In CI, we use multiple concurrent processes. Allocate half the processes to
-    // build the stable channel, and the other half for experimental. Override
-    // the environment variables to "trick" the underlying build script.
-    const total = parseInt(process.env.CIRCLE_NODE_TOTAL, 10);
-    const halfTotal = Math.floor(total / 2);
-    const index = parseInt(process.env.CIRCLE_NODE_INDEX, 10);
-    if (index < halfTotal) {
-      const nodeTotal = halfTotal;
-      const nodeIndex = index;
-      buildForChannel('stable', nodeTotal, nodeIndex);
-      processStable('./build');
-    } else {
-      const nodeTotal = total - halfTotal;
-      const nodeIndex = index - halfTotal;
-      buildForChannel('experimental', nodeTotal, nodeIndex);
-      processExperimental('./build');
-    }
   } else {
     // Running locally, no concurrency. Move each channel's build artifacts into
     // a temporary directory so that they don't conflict.
@@ -165,7 +147,7 @@ async function main() {
   }
 }
 
-function buildForChannel(channel, nodeTotal, nodeIndex) {
+function buildForChannel(channel) {
   const {status} = spawnSync(
     'node',
     ['./scripts/rollup/build.js', ...process.argv.slice(2)],
@@ -174,8 +156,6 @@ function buildForChannel(channel, nodeTotal, nodeIndex) {
       env: {
         ...process.env,
         RELEASE_CHANNEL: channel,
-        CIRCLE_NODE_TOTAL: nodeTotal,
-        CIRCLE_NODE_INDEX: nodeIndex,
       },
     }
   );

filename: scripts/rollup/stats.js
patch: @@ -18,17 +18,7 @@ const currentBuildResults = {
 };
 
 function saveResults() {
-  if (process.env.CIRCLE_NODE_TOTAL) {
-    // In CI, write the bundle sizes to a subdirectory and append the node index
-    // to the filename. A downstream job will consolidate these into a
-    // single file.
-    const nodeIndex = process.env.CIRCLE_NODE_INDEX;
-    mkdirp.sync('build/sizes');
-    fs.writeFileSync(
-      join('build', 'sizes', `bundle-sizes-${nodeIndex}.json`),
-      JSON.stringify(currentBuildResults, null, 2)
-    );
-  } else if (process.env.CI === 'github') {
+  if (process.env.CI === 'github') {
     mkdirp.sync('build/sizes');
     fs.writeFileSync(
       join('build', 'sizes', `bundle-sizes-${process.env.NODE_INDEX}.json`),