-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add Windows CI testing #1935
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
base: main
Are you sure you want to change the base?
Add Windows CI testing #1935
Changes from all commits
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 | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,9 +1,16 @@ | ||||||||||||||||||||||||||||||||||||||||||||
| # Java configurations for evergreen | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| export JDK8="/opt/java/jdk8" | ||||||||||||||||||||||||||||||||||||||||||||
| export JDK11="/opt/java/jdk11" | ||||||||||||||||||||||||||||||||||||||||||||
| export JDK17="/opt/java/jdk17" | ||||||||||||||||||||||||||||||||||||||||||||
| export JDK21="/opt/java/jdk21" | ||||||||||||||||||||||||||||||||||||||||||||
| if [ "Windows_NT" == "$OS" ]; then | ||||||||||||||||||||||||||||||||||||||||||||
| export JDK8="/cygdrive/c/java/jdk8" | ||||||||||||||||||||||||||||||||||||||||||||
| export JDK11="/cygdrive/c/java/jdk11" | ||||||||||||||||||||||||||||||||||||||||||||
| export JDK17="/cygdrive/c/java/jdk17" | ||||||||||||||||||||||||||||||||||||||||||||
| export JDK21="/cygdrive/c/java/jdk21" | ||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||
| export JDK8="/opt/java/jdk8" | ||||||||||||||||||||||||||||||||||||||||||||
| export JDK11="/opt/java/jdk11" | ||||||||||||||||||||||||||||||||||||||||||||
| export JDK17="/opt/java/jdk17" | ||||||||||||||||||||||||||||||||||||||||||||
| export JDK21="/opt/java/jdk21" | ||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||
| # note that `JDK21_GRAALVM` is used in `run-graalvm-native-image-app.sh` | ||||||||||||||||||||||||||||||||||||||||||||
| # by dynamically constructing the variable name | ||||||||||||||||||||||||||||||||||||||||||||
| export JDK21_GRAALVM="/opt/java/jdk21-graalce" | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+8
to
16
|
||||||||||||||||||||||||||||||||||||||||||||
| else | |
| export JDK8="/opt/java/jdk8" | |
| export JDK11="/opt/java/jdk11" | |
| export JDK17="/opt/java/jdk17" | |
| export JDK21="/opt/java/jdk21" | |
| fi | |
| # note that `JDK21_GRAALVM` is used in `run-graalvm-native-image-app.sh` | |
| # by dynamically constructing the variable name | |
| export JDK21_GRAALVM="/opt/java/jdk21-graalce" | |
| # note that `JDK21_GRAALVM` is used in `run-graalvm-native-image-app.sh` | |
| # by dynamically constructing the variable name | |
| export JDK21_GRAALVM="/cygdrive/c/java/jdk21-graalce" | |
| else | |
| export JDK8="/opt/java/jdk8" | |
| export JDK11="/opt/java/jdk11" | |
| export JDK17="/opt/java/jdk17" | |
| export JDK21="/opt/java/jdk21" | |
| # note that `JDK21_GRAALVM` is used in `run-graalvm-native-image-app.sh` | |
| # by dynamically constructing the variable name | |
| export JDK21_GRAALVM="/opt/java/jdk21-graalce" | |
| fi |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,68 @@ | ||||||||||||
| /* | ||||||||||||
| * Copyright 2008-present MongoDB, Inc. | ||||||||||||
| * | ||||||||||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||||||||||||
| * you may not use this file except in compliance with the License. | ||||||||||||
| * You may obtain a copy of the License at | ||||||||||||
| * | ||||||||||||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||||||||||||
| * | ||||||||||||
| * Unless required by applicable law or agreed to in writing, software | ||||||||||||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||||||||||||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||||||||||
| * See the License for the specific language governing permissions and | ||||||||||||
| * limitations under the License. | ||||||||||||
| */ | ||||||||||||
|
|
||||||||||||
| package com.mongodb.internal; | ||||||||||||
|
|
||||||||||||
| import com.mongodb.lang.Nullable; | ||||||||||||
|
|
||||||||||||
| import java.util.HashMap; | ||||||||||||
| import java.util.Map; | ||||||||||||
| import java.util.function.UnaryOperator; | ||||||||||||
|
|
||||||||||||
| /** | ||||||||||||
| * Centralized access to environment variables. All production code should use | ||||||||||||
| * this class instead of calling {@link System#getenv(String)} directly. | ||||||||||||
|
Comment on lines
+26
to
+27
|
||||||||||||
| * Centralized access to environment variables. All production code should use | |
| * this class instead of calling {@link System#getenv(String)} directly. | |
| * Centralized access to environment variables for driver-core production code. | |
| * Production code in this module should use this class instead of calling | |
| * {@link System#getenv(String)} directly. |
Copilot
AI
Apr 9, 2026
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.
EnvironmentProvider uses a mutable static envLookup without any synchronization/volatile semantics. If envOverride() is used while other threads call getEnv, reads can observe stale values and overrides can be lost/reset unexpectedly (especially if overrides are opened/closed out of order). Consider making the override mechanism thread-safe (e.g., use a synchronized stack/AtomicReference/volatile, or a ThreadLocal override for tests) and/or guard against non-LIFO close ordering.
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.
The comment above says MongoDB 8.0 binaries are affected on Windows and the fix is only available starting from 8.2, but this Windows CSFLE matrix still schedules
version: [ "8.0", "latest" ]. This looks inconsistent and may cause avoidable Windows CI failures; consider using 8.2 here as well (or clarify why CSFLE is exempt).