Skip to content
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

Merged
merged 16 commits into from
Nov 12, 2024

Conversation

nirinchev
Copy link
Contributor

@nirinchev nirinchev commented Nov 12, 2024

  • Suppresses experimental warnings on node 23
  • Updates smoke test to catch those from stderr
  • Adds smoke tests on gha with node 20/22/23
  • Adds a smoke test on gha to run brew install mongosh and then smoke test it
  • Posts a slack message when the homebrew test fails (needs webhook url - requested here: https://help-it.mongodb.com/hc/en-us/requests/492654).

@nirinchev nirinchev changed the title fix: suppress experimental warning for node 23 fix: suppress experimental warning for node 23 MONGOSH-1895 Nov 12, 2024
@nirinchev nirinchev force-pushed the ni/experimental-warning branch from 41ba8b9 to d24f7a3 Compare November 12, 2024 08:11
@nirinchev nirinchev force-pushed the ni/experimental-warning branch from 6d8c714 to b5ac5cc Compare November 12, 2024 08:28
@@ -7132,7 +7132,7 @@ functions:
{
export NODE_JS_VERSION=${node_js_version}
source .evergreen/setup-env.sh
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
export PUPPETEER_SKIP_DOWNLOAD="true"
Copy link
Contributor Author

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.

on:
schedule:
- cron: "0 0 * * *"
pull_request: # TODO: remove pull_request trigger
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

@@ -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',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing to pipe indiscriminately so that we can then validate there's no warnings in stderr.

executable,
actualExitCode,
args: args.map((arg) => redactURICredentials(arg)),
};
try {
assert.match(includeStderr ? `${stdout}\n${stderr}` : stdout, output);
assert.doesNotMatch(stderr, /ExperimentalWarning/);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm tempted to change this to match more broadly just Warning, but I'm not sure if that might result in false positives.

Copy link
Contributor

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple small comments, nothing big/blocking!

- run: mongosh --smokeTests
- name: Report failure
# TODO: replace with failure()
if: ${{ success() }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

package.json Outdated
@@ -167,4 +169,4 @@
"overrides": {
"cookie": "^0.7.2"
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline at end of file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 😬

.github/workflows/smoke-tests.yml Outdated Show resolved Hide resolved
packages/cli-repl/src/run.ts Outdated Show resolved Hide resolved
@nirinchev
Copy link
Contributor Author

I've removed the homebrew smoke test workflow and will re-add it in a separate PR. Addressed comments as well, so I'm going to go ahead and merge this so we can reap some of the benefits, particularly around reduced CI times due to the chromium downloads (in my tests, shaves 3-4 minutes from each npm ci).

@nirinchev nirinchev merged commit 1bc517a into main Nov 12, 2024
12 of 13 checks passed
@nirinchev nirinchev deleted the ni/experimental-warning branch November 12, 2024 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants