Skip to content

Evergreen#2012

Draft
rozza wants to merge 6 commits into
mongodb:mainfrom
rozza:evergreen
Draft

Evergreen#2012
rozza wants to merge 6 commits into
mongodb:mainfrom
rozza:evergreen

Conversation

@rozza

@rozza rozza commented Jul 9, 2026

Copy link
Copy Markdown
Member

Various build fixes for evergreen.

  1. GPG path handling - windows builds.
  2. 8.2 fix MQL asString version - windows builds (the only tests run against 8.2 MongoDB)
  3. Added a default OS - OIDC failure and Publish Snapshots
  4. Updated Sync shutdown hook - Caused Netty failures.

@rozza

rozza commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@rozza
rozza marked this pull request as ready for review July 9, 2026 12:44
@rozza
rozza requested a review from a team as a code owner July 9, 2026 12:44
@rozza
rozza requested review from nhachicha and vbabanin July 9, 2026 12:44
Comment thread mongodb-crypt/build.gradle.kts

// Run gpg capturing both streams; on non-zero exit throw with the captured output appended so the
// underlying gpg diagnostic is visible instead of Gradle's opaque "finished with non-zero exit value N".
fun runGpg(vararg args: String, onFailure: (String) -> String) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice 👍

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR applies a set of Evergreen/CI robustness fixes, primarily targeting Windows-host differences (GPG path semantics and environment detection) and reducing shutdown-time test flakiness, while also adjusting MQL asString functional tests to align with server-version behavior.

Changes:

  • Update mongodb-crypt tarball signature verification to translate Windows paths for Cygwin gpg and improve error diagnostics.
  • Adjust MQL asString nested conversion tests to use 8.3 as the version boundary.
  • Harden Evergreen environment setup and sync test shutdown cleanup to avoid failures from missing env vars / shutdown-time exceptions.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
mongodb-crypt/build.gradle.kts Adds Windows/Cygwin-aware GPG path translation and improved GPG exec diagnostics for libmongocrypt signature verification.
driver-sync/src/test/functional/com/mongodb/client/Fixture.java Wraps shutdown-hook database drop in a try/catch to prevent shutdown-time failures.
driver-core/src/test/functional/com/mongodb/client/model/mql/TypeMqlValuesFunctionalTest.java Shifts asString nested test gating from 8.2 to 8.3 to match server behavior.
.evergreen/setup-env.bash Defaults OS when unset to avoid set -u unbound variable failures, improving cross-platform behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread mongodb-crypt/build.gradle.kts
@rozza

rozza commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

FYI A number of tests (timing related) seem to be struggling with windows. Reviewing.

@rozza
rozza force-pushed the evergreen branch 2 times, most recently from a310f10 to 5398b95 Compare July 22, 2026 16:32
@rozza
rozza marked this pull request as draft July 23, 2026 09:15
rozza added 6 commits July 23, 2026 10:17
The gpg on the Evergreen Windows hosts is a Cygwin build that only
understands POSIX paths. Handed native Windows paths (C:\dir) it treats
them as relative, mangles the keyring location, and fails to find a
writable keyring. Translate drive-letter paths to the Cygwin form
(C:\dir -> /cygdrive/c/dir) on Windows for every gpg path argument
(homedir, public key, signatures, tarballs); other platforms are
unchanged.

Also surface gpg stdout/stderr and the gnupgHome/publicKey state on
failure so future gpg issues are diagnosable instead of showing only
Gradle's opaque non-zero exit value.
Should fix publishing of snapshots.

JAVA-6057
Brings it inline with the reactive streams shutdown hook.
Ensures tests don't fail on shutdown with a DatabaseDropPending exception
CSOT prose and unified tests are calibrated for fast Linux CI hosts; on
Windows + TLS a fresh client's connection establishment consumes the tight
timeout budgets, so a command under test times out during setup (or the
wrong command times out).

Add ClusterFixture.isWindows()/scaleForWindows() plus a unified
scaleForWindows(entities, definition, factor) transform, and apply
Windows-only timeout scaling (and a value-agnostic floor for the
success-family getMore-refresh tests) to the affected CSOT tests. The
non-Windows RTT retries are retained for other TLS runs. All Windows CSOT
adjustments are grouped at the end of the CSOT section.
…ationTimeoutException

With timeoutMS set, socket timeouts should surface as MongoOperationTimeoutException.
The read path translates a bare java.net.SocketTimeoutException, but the write path
only handled MongoSocketWriteTimeoutException, so a bare SocketTimeoutException during
a send fell through to MongoSocketWriteException. On Windows + TLS a blocking SSLSocket
write surfaces the socket read-timeout as a bare SocketTimeoutException, reproducing the
inconsistency.

In throwTranslatedWriteException, when timeoutMS is set, wrap a bare SocketTimeoutException
in a MongoSocketWriteTimeoutException and then MongoOperationTimeoutException, mirroring
translateReadException. Confined to the timeoutMS path.
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.

3 participants