Evergreen - #2012
Conversation
|
|
||
| // 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) { |
There was a problem hiding this comment.
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-crypttarball signature verification to translate Windows paths for Cygwingpgand improve error diagnostics. - Adjust MQL
asStringnested 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.
|
FYI A number of tests (timing related) seem to be struggling with windows. Reviewing. |
a310f10 to
5398b95
Compare
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.
|
@nhachicha @vbabanin This is ready for review! Note the evergreen failures are related to: SERVER-132246 (see #dbx-devs). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (2)
mongodb-crypt/build.gradle.kts:187
- On Windows,
drive.lowercase()is locale-sensitive (e.g., Turkish locale turnsIinto a dotlessı), which can produce an invalid/cygdrive/<drive>/...path for some drive letters. UseLocale.ROOTfor deterministic ASCII lowercasing.
return "/cygdrive/${drive.lowercase()}/${rest.replace('\\', '/')}"
driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedTestModifications.java:258
- Same as above: use
ClusterFixture.WINDOWS_CSOT_TIMEOUT_MULTIPLIERinstead of duplicating10, so the factor stays consistent across all Windows-scaling transforms.
def.transform("JAVA-6057: retryable CSOT tests cannot populate minPoolSize under the tight client-level "
+ "timeoutMS on the slower Windows TLS hosts, where background connection establishment "
+ "exceeds the timeout",
(entitiesArray, definition) -> scaleForWindows(entitiesArray, definition, 10))
.when(ClusterFixture::isWindows)
.file("client-side-operations-timeout", "timeoutMS behaves correctly for retryable operations");
- Restore the `whenFailureContains("timeout")` predicate on the tailable
non-awaitData retry, which was dropped when the retry block was moved.
Without it the test was retried on any failure, not just timeout flakes.
- Fix the Javadoc link to ClusterFixture#scaleForWindows(int) (was `long`).
- Use ClusterFixture.WINDOWS_CSOT_TIMEOUT_MULTIPLIER instead of a hard-coded
10 in the unified transforms, so the prose and unified scaling cannot
diverge.
- Narrow the shutdown-hook catch in Fixture from Exception to MongoException
and log the ignored failure rather than swallowing it silently.
|
Windows Evergreen build: https://spruce.corp.mongodb.com/version/6a673ec35539fb00075e9338 |
Various build fixes for evergreen.