-
Notifications
You must be signed in to change notification settings - Fork 84
fix: suppress experimental warning for node 23 MONGOSH-1895 #2258
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
Changes from 9 commits
cfbd54b
8abbacf
af0735f
6b1721c
39f9f56
d24f7a3
4be67ff
b5ac5cc
4b760f2
93cd859
3d39d46
b043049
4ee41a0
a3a2220
50cd72d
78ceaaa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: "Run Smoke Tests" | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| schedule: | ||
| - cron: "0 0 * * *" | ||
|
|
||
| jobs: | ||
| smoke-tests: | ||
| strategy: | ||
| matrix: | ||
| runner: [ubuntu-latest, macos-latest, windows-latest] | ||
| node: [20.x, 22.x, 23.x] | ||
| fail-fast: false | ||
| runs-on: ${{ matrix.runner }} | ||
| timeout-minutes: 15 | ||
| env: | ||
| npm_config_loglevel: verbose | ||
| npm_config_foreground_scripts: "true" | ||
| PUPPETEER_SKIP_DOWNLOAD: "true" | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
| cache: "npm" | ||
|
|
||
| - name: Install npm@10 | ||
| run: npm install -g npm@10 | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run smoke tests | ||
| run: npm run test-smoke | ||
nirinchev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ | |
| "author": "Compass Team <[email protected]>", | ||
| "scripts": { | ||
| "bootstrap-with-chromium": "npm install && npm run compile", | ||
| "bootstrap": "npx cross-env PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 npm install && npm run compile", | ||
| "bootstrap": "npx cross-env PUPPETEER_SKIP_DOWNLOAD=1 npm install && npm run compile", | ||
| "clean": "lerna clean -y && rm -Rf node_modules", | ||
| "check": "lerna run check --since HEAD --exclude-dependents", | ||
| "check-ci": "npm run check --workspaces --if-present", | ||
|
|
@@ -26,6 +26,8 @@ | |
| "test-evergreen-expansions": "bash .evergreen/compilation-context-expansions.test.sh", | ||
| "replace-package": "node scripts/replace-package.js", | ||
| "test-nodedriver": "bash .evergreen/test-node-driver.sh", | ||
| "pretest-smoke": "npm run compile-cli", | ||
| "test-smoke": "npm run test-smoke -w @mongosh/cli-repl", | ||
| "compile": "npm run compile --workspaces --if-present", | ||
| "compile-cli": "lerna run compile --scope @mongosh/cli-repl --include-dependencies", | ||
| "prestart-cli": "npm run compile-cli", | ||
|
|
@@ -167,4 +169,4 @@ | |
| "overrides": { | ||
| "cookie": "^0.7.2" | ||
| } | ||
| } | ||
| } | ||
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -397,7 +397,7 @@ async function runSmokeTest({ | |
| // eslint-disable-next-line | ||
| const { spawn } = require('child_process') as typeof import('child_process'); | ||
| const proc = spawn(executable, [...args], { | ||
| stdio: ['pipe', 'pipe', includeStderr ? 'pipe' : 'inherit'], | ||
| stdio: 'pipe', | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changing to |
||
| }); | ||
| let stdout = ''; | ||
| let stderr = ''; | ||
|
|
@@ -420,13 +420,14 @@ async function runSmokeTest({ | |
| input, | ||
| output, | ||
| stdout, | ||
| stderr, | ||
| stderr: includeStderr ? stderr : '', | ||
| executable, | ||
| actualExitCode, | ||
| args: args.map((arg) => redactURICredentials(arg)), | ||
| }; | ||
| try { | ||
| assert.match(includeStderr ? `${stdout}\n${stderr}` : stdout, output); | ||
| assert.doesNotMatch(stderr, /ExperimentalWarning/); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm tempted to change this to match more broadly just |
||
| if (exitCode !== undefined) { | ||
| assert.strictEqual(actualExitCode, exitCode); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently,
PUPPETEER_SKIP_CHROMIUM_DOWNLOADhad been deprecated and it seems to have been removed altogether (couldn't find any reference to it in the puppeteer version we're using). See puppeteer/puppeteer#11069.