From f03e179b69c86868da2a9bf8ab1fd239a3e40ba1 Mon Sep 17 00:00:00 2001 From: gagik Date: Sun, 2 Feb 2025 11:10:34 +0100 Subject: [PATCH 1/4] fix(tests): update VSCode runner to use 24.04 --- .evergreen.yml | 4 ++-- .evergreen/evergreen.yml.in | 4 ++-- ...buntu22.04-xvfb.Dockerfile => ubuntu24.04-xvfb.Dockerfile} | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename scripts/docker/{ubuntu22.04-xvfb.Dockerfile => ubuntu24.04-xvfb.Dockerfile} (97%) diff --git a/.evergreen.yml b/.evergreen.yml index 1f4ef74f16..d79b645206 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -3597,9 +3597,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: diff --git a/.evergreen/evergreen.yml.in b/.evergreen/evergreen.yml.in index 30ca79aa1c..5f2b1013f3 100644 --- a/.evergreen/evergreen.yml.in +++ b/.evergreen/evergreen.yml.in @@ -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: diff --git a/scripts/docker/ubuntu22.04-xvfb.Dockerfile b/scripts/docker/ubuntu24.04-xvfb.Dockerfile similarity index 97% rename from scripts/docker/ubuntu22.04-xvfb.Dockerfile rename to scripts/docker/ubuntu24.04-xvfb.Dockerfile index ce599c03d9..da3f7a51bf 100644 --- a/scripts/docker/ubuntu22.04-xvfb.Dockerfile +++ b/scripts/docker/ubuntu24.04-xvfb.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update From bd95c2cee256d39421a91b9eb59c8f6261b494f4 Mon Sep 17 00:00:00 2001 From: gagik Date: Sun, 2 Feb 2025 11:42:47 +0100 Subject: [PATCH 2/4] fix: adjust libasound and libgtk dependencies for 24.04 --- scripts/docker/ubuntu24.04-xvfb.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/ubuntu24.04-xvfb.Dockerfile b/scripts/docker/ubuntu24.04-xvfb.Dockerfile index da3f7a51bf..10808d68f1 100644 --- a/scripts/docker/ubuntu24.04-xvfb.Dockerfile +++ b/scripts/docker/ubuntu24.04-xvfb.Dockerfile @@ -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" ] From a485f2aef6797adefd91bc8b3a9c80371bd1813f Mon Sep 17 00:00:00 2001 From: gagik Date: Wed, 12 Feb 2025 14:48:21 +0100 Subject: [PATCH 3/4] fix: install specific curl packages --- .evergreen.yml | 4 ++++ testing/test-vscode.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/.evergreen.yml b/.evergreen.yml index d79b645206..44db146d61 100644 --- a/.evergreen.yml +++ b/.evergreen.yml @@ -3598,6 +3598,10 @@ functions: { source .evergreen/setup-env.sh (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 + docker run \ --rm -v $PWD:/tmp/build ubuntu24.04-xvfb \ -c 'cd /tmp/build && ./testing/test-vscode.sh' diff --git a/testing/test-vscode.sh b/testing/test-vscode.sh index 9635ef75ef..f53c1e8020 100755 --- a/testing/test-vscode.sh +++ b/testing/test-vscode.sh @@ -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 From bc9c7854226bf6844045b44c20869fda8de0f76a Mon Sep 17 00:00:00 2001 From: gagik Date: Wed, 26 Feb 2025 09:53:21 +0100 Subject: [PATCH 4/4] wip: add reproducable docker script for testing --- testing/reproduce.sh | 6 ++++++ testing/test-vscode.sh | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 testing/reproduce.sh diff --git a/testing/reproduce.sh b/testing/reproduce.sh new file mode 100644 index 0000000000..7819e175cb --- /dev/null +++ b/testing/reproduce.sh @@ -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' diff --git a/testing/test-vscode.sh b/testing/test-vscode.sh index f53c1e8020..d8e1e21c63 100755 --- a/testing/test-vscode.sh +++ b/testing/test-vscode.sh @@ -11,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.