-
Notifications
You must be signed in to change notification settings - Fork 90
chore: add nightly Node.js variant MONGOSH-2969 #2725
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
nbbeeken
wants to merge
9
commits into
main
Choose a base branch
from
MONGOSH-2969-node-latest
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
08889a9
wip: nightly node variant + v26 patches
nbbeeken 2c6425c
chore: keep mongosh.code-workspace untouched by personal customizations
nbbeeken 14a6aea
chore(evergreen): activate gcc-toolset for nightly Node.js builds
nbbeeken 9a48e43
chore(evergreen): move nightly Node.js variant to RHEL 10
nbbeeken 4c796ff
chore(evergreen): disable nightly Node.js variant for initial submission
nbbeeken e547108
chore(evergreen): test mongosh source against Node.js nightly (no com…
nbbeeken e6b0524
fix(cli-repl,e2e-tests): make e2e suite green on Node.js nightly
nbbeeken 1980987
test(e2e): skip native-addon-dependent tests on Node.js nightly
nbbeeken 0ccad22
fix(e2e-tests): update TODO references for Node.js nightly issues
nbbeeken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,6 +63,15 @@ describe('e2e', function () { | |
|
|
||
| describe('--build-info', function () { | ||
| it('shows build info in JSON format', async function () { | ||
| // TODO(MONGOSH-3334): Under Node.js nightlies the glibc-version | ||
| // native addon's dlsym for `gnu_get_libc_version` returns null on | ||
| // some builders (e.g. ubuntu2004), so mongosh reports | ||
| // runtimeGlibcVersion = "N/A" while Node.js's process.report still | ||
| // sees the host's glibc. Investigate the addon's loader behavior | ||
| // under the nightly's prebuilt binary and re-enable. | ||
| if (process.version.includes('-nightly')) { | ||
| return this.skip(); | ||
| } | ||
|
Collaborator
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. Do we create separate tickets for these?
Contributor
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. Yes, created! |
||
| const shell = startTestShell(this, { args: ['--build-info'] }); | ||
| await shell.waitForSuccessfulExit(); | ||
|
|
||
|
|
@@ -772,6 +781,14 @@ describe('e2e', function () { | |
| }); | ||
|
|
||
| it('sets device ID for telemetry', async function () { | ||
| // TODO(MONGOSH-3334): Under Node.js nightlies the native-machine-id | ||
| // addon throws on some builders (e.g. ubuntu2004), so mongosh's | ||
| // telemetry deviceId falls back to the literal string "unknown". | ||
| // Pairs with the glibc-version skip in --build-info above; both | ||
| // point at the same loader/dlsym behavior under the nightly binary. | ||
| if (process.version.includes('-nightly')) { | ||
| return this.skip(); | ||
| } | ||
| const deviceId = ( | ||
| await shell.executeLine( | ||
| 'db._mongo._instanceState.evaluationListener.ioProvider.loggingAndTelemetry.deviceId' | ||
|
|
@@ -1377,19 +1394,19 @@ describe('e2e', function () { | |
| }); | ||
| await shell.waitForSuccessfulExit(); | ||
|
|
||
| // Check that: | ||
| // - the script runs in the expected environment | ||
| // - async promise tracking is enabled if and only if we are running in REPL mode | ||
| // The latter is particularly important because the performance benefits of | ||
| // avoiding REPL mode mostly stem from the lack of async promise tracking. | ||
| // Check that the script runs in the expected environment. | ||
| // We used to also assert executionAsyncId > 1 in REPL mode as a | ||
| // proxy for "async promise tracking is enabled" — that was an | ||
| // observable side effect of REPL loading the `domain` module. | ||
| // nodejs/node#61227 removed REPL's domain dependency, so on Node | ||
| // v26+ both modes report executionAsyncId === 0 and the proxy no | ||
| // longer distinguishes them. | ||
| const result = EJSON.parse(shell.output); | ||
| expect(result.usingPlainVMContext).to.deep.equal( | ||
| !jsContextFlags.includes('--jsContext=repl') | ||
| ); | ||
| if (result.usingPlainVMContext) { | ||
| expect(result.executionAsyncId).to.equal(0); | ||
| } else { | ||
| expect(result.executionAsyncId).to.be.greaterThan(1); | ||
| } | ||
| shell.assertNoErrors(); | ||
| }); | ||
|
|
@@ -2313,6 +2330,13 @@ describe('e2e', function () { | |
| }); | ||
|
|
||
| it('shows an update notification if a newer version is available', async function () { | ||
| // TODO(MONGOSH-3335): the update notification doesn't surface in | ||
| // the captured shell output on Node.js nightlies — needs a closer | ||
| // look at how the update-fetch interacts with the local httpServer | ||
| // fixture under the nightly's HTTP/fetch implementation. | ||
| if (process.version.includes('-nightly')) { | ||
| return this.skip(); | ||
| } | ||
| { | ||
| const shell = await startNodbTestShellAndWaitForPrompt( | ||
| this, | ||
|
|
||
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nvm feels a bit like overkill for downloading and extracting from https://nodejs.org/download/nightly/ for a single architecture and target OS
(aside: the ticket itself wasn't asking for nightlies, but I don't mind using them as long as the team is okay with that overall)
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.
I guess I just went with the second half of the OR and didn't think too much about it 😅 latest node would def be easier, but I'm wondering if we're a good canary in the coal mine with how deeply we integrate with the platform that nightlies could be more interesting, could also be more noisy...