Skip to content
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

fix(tests): update VSCode runner to use 24.04 #2344

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
8 changes: 6 additions & 2 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3597,9 +3597,13 @@ functions:
set -e
{
source .evergreen/setup-env.sh
(cd scripts/docker && docker build -t ubuntu22.04-xvfb -f ubuntu22.04-xvfb.Dockerfile .)
(cd scripts/docker && docker build -t ubuntu24.04-xvfb -f ubuntu24.04-xvfb.Dockerfile .)
apt list --installed
sudo apt-get update
sudo apt-get install -y curl=7.68.0-1ubuntu2.22 libcurl4=7.68.0-1ubuntu2.22 libcurl4-openssl-dev=7.68.0-1ubuntu2.22
Copy link
Contributor

Choose a reason for hiding this comment

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

Were these lines supposed to go into the dockerfile config? Because otherwise this here would be affecting the global scope of the evergreen host, which we'd almost never want to do

Copy link
Contributor Author

@gagik gagik Feb 26, 2025

Choose a reason for hiding this comment

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

yeah, not meant to be here it's actually leftover from previous evergreen.yml.in.
Good reminder that evergreen maintains state though, that's one thing I find weird coming from GitHub Actions.


docker run \
--rm -v $PWD:/tmp/build ubuntu22.04-xvfb \
--rm -v $PWD:/tmp/build ubuntu24.04-xvfb \
-c 'cd /tmp/build && ./testing/test-vscode.sh'
}
test_connectivity:
Expand Down
4 changes: 2 additions & 2 deletions .evergreen/evergreen.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ functions:
set -e
{
source .evergreen/setup-env.sh
(cd scripts/docker && docker build -t ubuntu22.04-xvfb -f ubuntu22.04-xvfb.Dockerfile .)
(cd scripts/docker && docker build -t ubuntu24.04-xvfb -f ubuntu24.04-xvfb.Dockerfile .)
docker run \
--rm -v $PWD:/tmp/build ubuntu22.04-xvfb \
--rm -v $PWD:/tmp/build ubuntu24.04-xvfb \
-c 'cd /tmp/build && ./testing/test-vscode.sh'
}
test_connectivity:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
Expand All @@ -11,6 +11,6 @@ RUN echo "deb-src https://deb.nodesource.com/node_20.x jammy main" | tee -a /etc

# Install Node.js and vscode dependencies
RUN apt-get update
RUN apt-get -y -qq install nodejs libnss3 gnupg libxkbfile1 libsecret-1-0 libsecret-1-dev libgtk-3-0 libxss1 libgbm1 libasound2 xvfb build-essential pkg-config
RUN apt-get -y -qq install nodejs libnss3 gnupg libxkbfile1 libsecret-1-0 libsecret-1-dev libgtk-3-0t64 libxss1 libgbm1 libasound2t64 xvfb build-essential pkg-config

ENTRYPOINT [ "bash" ]
6 changes: 6 additions & 0 deletions testing/reproduce.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file is not meant to be included, just a script to reproduce the issue like in evergreen.

(cd scripts/docker && docker build -t ubuntu24.04-xvfb -f ubuntu24.04-xvfb.Dockerfile .)
docker run \
--rm -v $PWD:/tmp/build ubuntu24.04-xvfb \
-c 'cd /tmp/build && ./testing/test-vscode.sh'
7 changes: 5 additions & 2 deletions testing/test-vscode.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
set -x
set -e

# just to make sure: we are in the mongosh root dir
test -x packages && grep -q '"name": "mongosh"' package.json
npm -v
Expand All @@ -10,9 +11,11 @@ test_root_dir=/tmp/mongosh-vscode-test
export SEGMENT_KEY=GtEn04CBjn39g6A0BxldDf81YGFONOz7 # fresh from /dev/urandom
rm -rf "$test_root_dir" && mkdir -p "$test_root_dir"
cd "$test_root_dir"
git clone --depth=10 https://github.com/mongodb-js/vscode.git
git clone --depth=10 https://github.com/mongodb-js/vscode.git --branch gagik/vscode-debug
cd vscode
npm install --force

npm ci --omit=optional

rm -rf node_modules/@mongosh node_modules/mongodb
(cd node_modules && ln -s "$mongosh_root_dir/packages" @mongosh && ln -s "$mongosh_root_dir/node_modules/mongodb" mongodb)
# This test can require a lot of memory so we bump the maximum size.
Expand Down