Skip to content

Commit cc6dea3

Browse files
authored
Merge branch 'main' into ni/oidc-bump
2 parents 4b9737c + 06242f9 commit cc6dea3

File tree

5 files changed

+61
-22
lines changed

5 files changed

+61
-22
lines changed

.evergreen/install-node-source.sh

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,25 @@ else
1515
echo "[INFO] Choosing v3 because OS_ARCH is $OS_ARCH"
1616
export TOOLCHAIN_PATH='/opt/mongodbtoolchain/v3/bin'
1717
fi
18-
export PATH="$TOOLCHAIN_PATH:/opt/mongodbtoolchain/v4/bin:/opt/mongodbtoolchain/v3/bin:${ORIGINAL_PATH}"
18+
export PATH="$TOOLCHAIN_PATH:${ORIGINAL_PATH}"
1919

20-
export PATH="/opt/mongodbtoolchain/v4/bin:/opt/mongodbtoolchain/v3/bin:${ORIGINAL_PATH}"
21-
export CC=gcc
22-
export CXX=g++
20+
21+
if [ `uname` = Darwin ]; then
22+
echo "Using clang version:"
23+
(which clang && clang --version)
24+
25+
echo "Using clang++ version:"
26+
(which clang++ && clang++ --version)
27+
else
28+
export CC=gcc
29+
export CXX=g++
30+
31+
echo "Using gcc version:"
32+
(which gcc && gcc --version)
33+
34+
echo "Using g++ version:"
35+
(which g++ && g++ --version)
36+
fi
2337

2438
NODE_JS_TARBALL_FILE="node-v${NODE_JS_VERSION}.tar.gz"
2539
NODE_JS_TARBALL_PATH="${EVGDIR}/${NODE_JS_TARBALL_FILE}"
@@ -29,12 +43,6 @@ NODE_JS_SOURCE_PATH="${EVGDIR}/node-v${NODE_JS_VERSION}"
2943
# scripts to simply do `nvm use`
3044
NODE_JS_INSTALL_DIR="${NVM_DIR}/versions/node/v${NODE_JS_VERSION}"
3145

32-
echo "Using gcc version:"
33-
(which gcc && gcc --version)
34-
35-
echo "Using g++ version:"
36-
(which g++ && g++ --version)
37-
3846
echo "Using python3 version:"
3947
(which python3 && python3 --version) || true
4048

.evergreen/setup-env.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ set -e
22
set -x
33

44
OS_ARCH="$(uname "-m")"
5-
if [ "$OS_ARCH" = "ppc64le" ] || [ "$OS_ARCH" = "ppc64" ] ; then
5+
if [ "$OS_ARCH" = "ppc64le" ] || [ "$OS_ARCH" = "ppc64" ]; then
66
echo "[INFO] Choosing v4 because OS_ARCH is $OS_ARCH"
77
export TOOLCHAIN_PATH='/opt/mongodbtoolchain/v4/bin'
88
else
@@ -38,14 +38,22 @@ if [ "$OS" != "Windows_NT" ]; then
3838
set -x
3939
export PATH="$NVM_BIN:$PATH"
4040

41-
export CC=gcc
42-
export CXX=g++
41+
if [ `uname` = Darwin ]; then
42+
echo "Using clang version:"
43+
(which clang && clang --version)
4344

44-
echo "Using gcc version:"
45-
(which gcc && gcc --version)
45+
echo "Using clang++ version:"
46+
(which clang++ && clang++ --version)
47+
else
48+
export CC=gcc
49+
export CXX=g++
4650

47-
echo "Using g++ version:"
48-
(which g++ && g++ --version)
51+
echo "Using gcc version:"
52+
(which gcc && gcc --version)
53+
54+
echo "Using g++ version:"
55+
(which g++ && g++ --version)
56+
fi
4957

5058
if [ -x "$BASEDIR/git-2/git" ]; then
5159
export GIT_EXEC_PATH="$BASEDIR/git-2"

THIRD_PARTY_NOTICES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The following third-party software is used by and included in **mongosh**.
2-
This document was automatically generated on Wed Feb 26 2025.
2+
This document was automatically generated on Sun Mar 02 2025.
33

44
## List of dependencies
55

packages/build/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ Dylan Richardson <[email protected]>
2424
mongodb-devtools-bot[bot] <189715634+mongodb-devtools-bot[bot]@users.noreply.github.com>
2525
2626
27+
Alena Khineika <[email protected]>

packages/build/src/homebrew/generate-formula.ts

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,37 @@
11
import * as semver from 'semver';
22
import type { GithubRepo } from '@mongodb-js/devtools-github-repo';
33

4+
/**
5+
* When sending requests via Octokit, a situation can arise where the server closes the connection,
6+
* but the client still believes it’s open and attempts to write to it,
7+
* what leads to receiving an EPIPE error from the OS, indicating the connection has already been closed.
8+
* In such cases, retrying the request can help establish a new, functional connection.
9+
*/
10+
async function getFormulaFromRepositoryWithRetry(
11+
homebrewCore: GithubRepo,
12+
remainingRetries = 3
13+
) {
14+
try {
15+
return await homebrewCore.getFileContent('Formula/m/mongosh.rb', 'master');
16+
} catch (error: any) {
17+
if (error.message.includes('EPIPE') && remainingRetries > 0) {
18+
console.error(error);
19+
return await getFormulaFromRepositoryWithRetry(
20+
homebrewCore,
21+
remainingRetries - 1
22+
);
23+
} else {
24+
throw error;
25+
}
26+
}
27+
}
28+
429
export async function generateUpdatedFormula(
530
context: { version: string; sha: string },
631
homebrewCore: GithubRepo,
732
isDryRun: boolean
833
): Promise<string | null> {
9-
const currentFormula = await homebrewCore.getFileContent(
10-
'Formula/m/mongosh.rb',
11-
'master'
12-
);
34+
const currentFormula = await getFormulaFromRepositoryWithRetry(homebrewCore);
1335

1436
const urlMatch = /url "([^"]+)"/g.exec(currentFormula.content);
1537
const shaMatch = /sha256 "([^"]+)"/g.exec(currentFormula.content);

0 commit comments

Comments
 (0)