-
Notifications
You must be signed in to change notification settings - Fork 67
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
fix: suppress experimental warning for node 23 MONGOSH-1895 #2258
Changes from 14 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,39 @@ | ||
name: "Smoke Test Homebrew install" | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
pull_request: # TODO: remove pull_request trigger | ||
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. Waiting on IT to create the webhook, after which I'll clean up the TODOs in this file. |
||
|
||
jobs: | ||
smoke-test-homebrew: | ||
name: Test on ${{ matrix.runner }} | ||
runs-on: ${{ matrix.runner}} | ||
strategy: | ||
matrix: | ||
runner: [macos-13, macos-14, macos-15] | ||
fail-fast: false | ||
steps: | ||
- run: brew install mongosh | ||
- run: mongosh --smokeTests | ||
- name: Report failure | ||
# TODO: replace with failure() | ||
if: ${{ success() }} | ||
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. Open TODO? 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. Yeah, I'll fix that before we merge - just wanted to test it first once I get the slack webhook from IT. |
||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_MONGOSH_DEVEL_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"text": "Homebrew smoke test failed on macOS ${{ matrix.runner }}" | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "Failed run: [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" | ||
} | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: "Run Smoke Tests" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
smoke-tests: | ||
name: "OS: ${{ matrix.runner }}, node@${{ matrix.node }}" | ||
strategy: | ||
matrix: | ||
runner: [ubuntu, macos, windows] | ||
node: [20.x, 22.x, 23.x] | ||
fail-fast: false | ||
runs-on: ${{ matrix.runner }}-latest | ||
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.
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" | ||
} | ||
} | ||
} | ||
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. Missing newline at end of file? 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. Ugh, will need to take a look at my vscode settings - I thought it was prettier that removes it 😬 |
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', | ||
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/); | ||
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_DOWNLOAD
had 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.