Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .evergreen/buildvariants-and-tasks.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ buildvariants:
tasks:
<% for (const group of E2E_TEST_GROUPS) { %>
<% if (['test-packaged-app-macos-11-arm', 'test-packaged-app-macos-11-x64'].includes(buildVariant.name)) { %>
- name: test-packaged-app-macos13-<%= group.number %>
- name: test-packaged-app-macos-11-<%= group.number %>
Copy link
Contributor

@lerouxb lerouxb Aug 13, 2025

Choose a reason for hiding this comment

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

Oof sorry. Indeed must have been a typo. All I can think of is that maybe my brain went "13 is < 14" since mongodb latest stopping being produced for mac < 14 at 8.0.6 onwards. And 11 happens to be the only version < 14 that we're running? I don't know 🤷

<% } else { %>
- name: test-packaged-app-<%= group.number %>
<% } %>
Expand Down Expand Up @@ -508,7 +508,7 @@ tasks:
e2e_test_group: <%= group.number %>
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'

- name: test-packaged-app-macos13-<%= group.number %>
- name: test-packaged-app-macos-11-<%= group.number %>
tags:
- required-for-publish
- run-on-pr
Expand Down
18 changes: 9 additions & 9 deletions .evergreen/buildvariants-and-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ buildvariants:
- name: package-compass
variant: package-macos-arm
tasks:
- name: test-packaged-app-macos13-1
- name: test-packaged-app-macos13-2
- name: test-packaged-app-macos13-3
- name: test-packaged-app-macos-11-1
- name: test-packaged-app-macos-11-2
- name: test-packaged-app-macos-11-3
- name: test-packaged-app-macos-11-x64
display_name: Test Packaged App MacOS x64 11
run_on: macos-11-gui
Expand All @@ -221,9 +221,9 @@ buildvariants:
- name: package-compass
variant: package-macos-x64
tasks:
- name: test-packaged-app-macos13-1
- name: test-packaged-app-macos13-2
- name: test-packaged-app-macos13-3
- name: test-packaged-app-macos-11-1
- name: test-packaged-app-macos-11-2
- name: test-packaged-app-macos-11-3
- name: test-packaged-app-macos-14-arm
display_name: Test Packaged App MacOS arm64 14
run_on: macos-14-arm64-gui
Expand Down Expand Up @@ -1294,7 +1294,7 @@ tasks:
e2e_test_groups: 3
e2e_test_group: 1
debug: compass-e2e-tests*,electron*,hadron*,mongo*
- name: test-packaged-app-macos13-1
- name: test-packaged-app-macos-11-1
tags:
- required-for-publish
- run-on-pr
Expand Down Expand Up @@ -1344,7 +1344,7 @@ tasks:
e2e_test_groups: 3
e2e_test_group: 2
debug: compass-e2e-tests*,electron*,hadron*,mongo*
- name: test-packaged-app-macos13-2
- name: test-packaged-app-macos-11-2
tags:
- required-for-publish
- run-on-pr
Expand Down Expand Up @@ -1394,7 +1394,7 @@ tasks:
e2e_test_groups: 3
e2e_test_group: 3
debug: compass-e2e-tests*,electron*,hadron*,mongo*
- name: test-packaged-app-macos13-3
- name: test-packaged-app-macos-11-3
tags:
- required-for-publish
- run-on-pr
Expand Down
16 changes: 2 additions & 14 deletions .evergreen/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,23 +149,11 @@ functions:
<<: *compass-env
script: |
set -e
eval $(.evergreen/print-compass-env.sh)
# Make all the dirs
mkdir -p $ARTIFACTS_PATH
.evergreen/install-node.sh
- command: shell.exec
type: setup
params:
working_dir: src
shell: bash
env:
<<: *compass-env
script: |
set -e
eval $(.evergreen/print-compass-env.sh)
.evergreen/preinstall.sh
.evergreen/print-debug-info.sh
# Make sure install worked
echo "Using node version:";
Expand Down
26 changes: 4 additions & 22 deletions .evergreen/preinstall.sh → .evergreen/install-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,12 @@

set -e

echo "========================="
echo "Important Environment Variables"
echo "========================="
echo "PLATFORM: $PLATFORM"
echo "ARCH: $ARCH"
echo "NODE_JS_VERSION: $NODE_JS_VERSION"
echo "NPM_VERSION: $NPM_VERSION"
echo "APPDATA: $APPDATA"
echo "PATH: $PATH"

# these are super useful if you want to run the smoke tests locally
echo "export DEV_VERSION_IDENTIFIER=$DEV_VERSION_IDENTIFIER"
echo "export EVERGREEN_BUCKET_KEY_PREFIX=$EVERGREEN_BUCKET_KEY_PREFIX"
echo "export EVERGREEN_BUCKET_NAME=$EVERGREEN_BUCKET_NAME"

echo "IS_OSX: $IS_OSX"
echo "IS_LINUX: $IS_LINUX"
echo "IS_WINDOWS: $IS_WINDOWS"
echo "IS_RHEL: $IS_RHEL"
echo "IS_UBUNTU: $IS_UBUNTU"
SCRIPTDIR="$(cd $(dirname "$0"); pwd)"

echo "DOCKER_CONFIG: $DOCKER_CONFIG"
source $SCRIPTDIR/set-platform-env.sh

SCRIPTDIR="$(cd $(dirname "$0"); pwd)"
# Ensure the .deps directory exists
mkdir -p .deps

if [ -n "$IS_WINDOWS" ]; then
echo "Installing nodejs v$NODE_JS_VERSION for windows..."
Expand Down
10 changes: 7 additions & 3 deletions .evergreen/print-compass-env.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env node
'use strict';
const path = require('path');
const path = require('node:path');
const fs = require('node:fs');

/*
This script writes a bash script that can be eval()'d in evergreen to modify the
Expand Down Expand Up @@ -84,7 +84,11 @@ function printCompassEnv() {
// to be a non-cygwin path
const npmCacheDir = path.resolve(__dirname, '..', '.deps', '.npm-cache');

printVar('ARTIFACTS_PATH', `${newPWD}/.deps`);
const artifactsPath = path.resolve(newPWD, '.deps');
Copy link

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

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

The variable newPWD is used but not defined in the visible code. This will cause a ReferenceError when the script runs.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

probably because:

const originalPWD = process.env.PWD;
  let newPWD = originalPWD;

which.. should be fine? I guess we can ?? '' to shut it up. Add an assertion if that makes it feel better.

if (!fs.existsSync(artifactsPath)) {
fs.mkdirSync(artifactsPath, { recursive: true });
}

printVar('NPM_CACHE_DIR', npmCacheDir);

// all npm var names need to be lowercase
Expand Down
31 changes: 7 additions & 24 deletions .evergreen/print-compass-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,7 @@

set -e

if [[ $OSTYPE == "cygwin" ]]; then
export PLATFORM='win32'
export IS_WINDOWS=true
export ARCH=x64
elif [[ $(uname) == Darwin ]]; then
export PLATFORM='darwin'
export IS_OSX=true
if [ `uname -m` = x86_64 ]; then
export ARCH=x64
else
export ARCH=arm64
fi
else
export PLATFORM='linux'
export IS_LINUX=true
export ARCH=x64
if [[ $(cat /etc/*release | grep ^NAME | grep Red) ]]; then
export IS_RHEL=true
elif [[ $(cat /etc/*release | grep ^NAME | grep Ubuntu) ]]; then
export IS_UBUNTU=true
fi
fi
source .evergreen/set-platform-env.sh

export BASHPATH="$PATH"
export OSTYPE="$OSTYPE"
Expand All @@ -49,5 +28,9 @@ if [[ "${EVERGREEN_PROJECT}" == "10gen-compass-main" ]]; then
fi
fi


.evergreen/print-compass-env.js
# We cannot rely on node from the PATH, as the script we're calling is setting up that PATH.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

if [ -n "$IS_WINDOWS" ]; then
.deps/node.exe .evergreen/print-compass-env.js
else
.deps/bin/node .evergreen/print-compass-env.js
fi
24 changes: 24 additions & 0 deletions .evergreen/print-debug-info.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#! /usr/bin/env bash

echo "========================="
echo "Important Environment Variables"
echo "========================="
echo "PLATFORM: $PLATFORM"
echo "ARCH: $ARCH"
echo "NODE_JS_VERSION: $NODE_JS_VERSION"
echo "NPM_VERSION: $NPM_VERSION"
echo "APPDATA: $APPDATA"
echo "PATH: $PATH"

# these are super useful if you want to run the smoke tests locally
echo "export DEV_VERSION_IDENTIFIER=$DEV_VERSION_IDENTIFIER"
echo "export EVERGREEN_BUCKET_KEY_PREFIX=$EVERGREEN_BUCKET_KEY_PREFIX"
echo "export EVERGREEN_BUCKET_NAME=$EVERGREEN_BUCKET_NAME"

echo "IS_OSX: $IS_OSX"
echo "IS_LINUX: $IS_LINUX"
echo "IS_WINDOWS: $IS_WINDOWS"
echo "IS_RHEL: $IS_RHEL"
echo "IS_UBUNTU: $IS_UBUNTU"

echo "DOCKER_CONFIG: $DOCKER_CONFIG"
24 changes: 24 additions & 0 deletions .evergreen/set-platform-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#! /usr/bin/env bash

if [[ $OSTYPE == "cygwin" ]]; then
export PLATFORM='win32'
export IS_WINDOWS=true
export ARCH=x64
elif [[ $(uname) == Darwin ]]; then
export PLATFORM='darwin'
export IS_OSX=true
if [ `uname -m` = x86_64 ]; then
export ARCH=x64
else
export ARCH=arm64
fi
else
export PLATFORM='linux'
export IS_LINUX=true
export ARCH=x64
if [[ $(cat /etc/*release | grep ^NAME | grep Red) ]]; then
export IS_RHEL=true
elif [[ $(cat /etc/*release | grep ^NAME | grep Ubuntu) ]]; then
export IS_UBUNTU=true
fi
fi
Loading