Skip to content

Add node-config-schema.json to expected files in v22.x #4084

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

Open
wants to merge 3 commits into
base: main
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
1 change: 1 addition & 0 deletions ansible/www-standalone/tools/promote/expected_assets/v22.x
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
docs/
docs/apilinks.json
docs/api/
docs/node-config-schema.json
node-{VERSION}-aix-ppc64.tar.gz
node-{VERSION}-darwin-arm64.tar.gz
node-{VERSION}-darwin-arm64.tar.xz
Expand Down
46 changes: 23 additions & 23 deletions ansible/www-standalone/tools/promote/test/check_r2_assets.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { exit } from 'node:process';
const testcases = [
{
name: 'No rclone',
version: 'v22.12.0',
version: 'v22.16.0',
expectedStdout: '',
setup: async function setup (context) {
const command = `rclone lsjson ${context.r2StagingDir} --no-modtime --no-mimetype -R --max-depth 2`;
Expand All @@ -29,36 +29,36 @@ const testcases = [
},
{
name: 'Everything is in staging, nothing in dist, good to go',
version: 'v22.12.0',
version: 'v22.16.0',
expectedStdout:
'... Checking R2 assets\n' +
'... Expecting a total of 47 assets for v22.x\n' +
'... 47 assets waiting in R2 staging\n' +
'... 0 assets already promoted in R2\n' +
' \u001b[32m\u001b[1m✓\u001b[22m\u001b[39m Complete set of expected assets in place for v22.x\n',
setup: async function setup (context) {
context.rcloneLs[context.r2StagingDir] = await fixture('all-present-v22.12.0.json');
context.rcloneLs[context.r2StagingDir] = await fixture('all-present-v22.16.0.json');
}
},
{
name: 'Not quite everything is in staging, missing two assets, nothing in dist',
version: 'v22.12.0',
version: 'v22.16.0',
expectedStdout:
'... Checking R2 assets\n' +
'... Expecting a total of 47 assets for v22.x\n' +
'... 45 assets waiting in R2 staging\n' +
'... 0 assets already promoted in R2\n' +
' \x1B[33m\x1B[1m⚠\x1B[22m\x1B[39m The following assets are expected for v22.x but are currently missing from R2 staging:\n' +
' • node-v22.12.0-linux-armv7l.tar.gz\n' +
' • node-v22.12.0-linux-armv7l.tar.xz\n' +
' • node-v22.16.0-linux-armv7l.tar.gz\n' +
' • node-v22.16.0-linux-armv7l.tar.xz\n' +
' \u001b[33mPromote if you are certain this is the the correct course of action\u001b[39m\n',
setup: async function setup (context) {
context.rcloneLs[context.r2StagingDir] = await fixture('partial-v22.12.0.json');
context.rcloneLs[context.r2StagingDir] = await fixture('partial-v22.16.0.json');
}
},
{
name: 'Everything is in staging and everything in dist',
version: 'v22.12.0',
version: 'v22.16.0',
expectedStdout:
'... Checking R2 assets\n' +
'... Expecting a total of 47 assets for v22.x\n' +
Expand All @@ -67,13 +67,13 @@ const testcases = [
' \u001b[32m\u001b[1m✓\u001b[22m\u001b[39m Complete set of expected assets in place for v22.x\n' +
' \u001b[33mPromote if you are certain this is the the correct course of action\u001b[39m\n',
setup: async function setup (context) {
context.rcloneLs[context.r2StagingDir] = await fixture('all-present-v22.12.0.json');
context.rcloneLs[context.r2DistDir] = await fixture('all-present-v22.12.0.json');
context.rcloneLs[context.r2StagingDir] = await fixture('all-present-v22.16.0.json');
context.rcloneLs[context.r2DistDir] = await fixture('all-present-v22.16.0.json');
}
},
{
name: 'Everything is in dist except for the armv7l files, but they are in staging',
version: 'v22.12.0',
version: 'v22.16.0',
expectedStdout:
'... Checking R2 assets\n' +
'... Expecting a total of 47 assets for v22.x\n' +
Expand All @@ -82,13 +82,13 @@ const testcases = [
' \u001b[32m\u001b[1m✓\u001b[22m\u001b[39m Complete set of expected assets in place for v22.x\n' +
' \u001b[33mPromote if you are certain this is the the correct course of action\u001b[39m\n',
setup: async function setup (context) {
context.rcloneLs[context.r2StagingDir] = await fixture('all-present-v22.12.0.json');
context.rcloneLs[context.r2DistDir] = await fixture('partial-v22.12.0.json');
context.rcloneLs[context.r2StagingDir] = await fixture('all-present-v22.16.0.json');
context.rcloneLs[context.r2DistDir] = await fixture('partial-v22.16.0.json');
}
},
{
name: 'Everything is in dist except for the armv7l files, but they are in staging. Ignores SHASUMS in staging.',
version: 'v22.12.0',
version: 'v22.16.0',
expectedStdout:
'... Checking R2 assets\n' +
'... Expecting a total of 47 assets for v22.x\n' +
Expand All @@ -97,13 +97,13 @@ const testcases = [
' \u001b[32m\u001b[1m✓\u001b[22m\u001b[39m Complete set of expected assets in place for v22.x\n' +
' \u001b[33mPromote if you are certain this is the the correct course of action\u001b[39m\n',
setup: async function setup (context) {
context.rcloneLs[context.r2StagingDir] = await fixture('with-shasums-v22.12.0.json');
context.rcloneLs[context.r2DistDir] = await fixture('partial-v22.12.0.json');
context.rcloneLs[context.r2StagingDir] = await fixture('with-shasums-v22.16.0.json');
context.rcloneLs[context.r2DistDir] = await fixture('partial-v22.16.0.json');
}
},
{
name: 'Everything is in dist except for the armv7l files, but they are in staging. Ignores SHASUMS in dist.',
version: 'v22.12.0',
version: 'v22.16.0',
expectedStdout:
'... Checking R2 assets\n' +
'... Expecting a total of 47 assets for v22.x\n' +
Expand All @@ -112,13 +112,13 @@ const testcases = [
' \u001b[32m\u001b[1m✓\u001b[22m\u001b[39m Complete set of expected assets in place for v22.x\n' +
' \u001b[33mPromote if you are certain this is the the correct course of action\u001b[39m\n',
setup: async function setup (context) {
context.rcloneLs[context.r2StagingDir] = await fixture('with-shasums-v22.12.0.json');
context.rcloneLs[context.r2DistDir] = await fixture('partial-with-shasums-v22.12.0.json');
context.rcloneLs[context.r2StagingDir] = await fixture('with-shasums-v22.16.0.json');
context.rcloneLs[context.r2DistDir] = await fixture('partial-with-shasums-v22.16.0.json');
}
},
{
name: 'Unexpected files in dist',
version: 'v22.12.0',
version: 'v22.16.0',
expectedStdout:
'... Checking R2 assets\n' +
'... Expecting a total of 47 assets for v22.x\n' +
Expand All @@ -132,7 +132,7 @@ const testcases = [
' https://github.com/nodejs/build/tree/main/ansible/www-standalone/tools/promote/expected_assets/v22.x\n' +
' \u001b[33mPromote if you are certain this is the the correct course of action\u001b[39m\n',
setup: async function setup (context) {
context.rcloneLs[context.r2StagingDir] = await fixture('all-present-v22.12.0.json');
context.rcloneLs[context.r2StagingDir] = await fixture('all-present-v22.16.0.json');
context.rcloneLs[context.r2DistDir] = await fixture('unexpected-files.json');
}
},
Expand Down Expand Up @@ -201,7 +201,7 @@ describe(`${basename(import.meta.filename, '.mjs')} tests`, async () => {
captureConsole(context);
const exitFunc = context.mock.fn();
process.exit = exitFunc;
await check_r2_assets.checkArgs([ process.execPath, 'check_r2_assets.mjs', 'foo', 'v22.12.0' ]);
await check_r2_assets.checkArgs([ process.execPath, 'check_r2_assets.mjs', 'foo', 'v22.16.0' ]);
process.exit = exit;
restoreConsole();
assert.strictEqual(exitFunc.mock.callCount(), 1);
Expand All @@ -214,7 +214,7 @@ describe(`${basename(import.meta.filename, '.mjs')} tests`, async () => {
captureConsole(context);
const exitFunc = context.mock.fn();
process.exit = exitFunc;
await check_r2_assets.checkArgs([ process.execPath, 'check_r2_assets.mjs', 'v22.12.0', 'bar' ]);
await check_r2_assets.checkArgs([ process.execPath, 'check_r2_assets.mjs', 'v22.16.0', 'bar' ]);
process.exit = exit;
restoreConsole();
assert.strictEqual(exitFunc.mock.callCount(), 1);
Expand Down
Loading