diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-11 15:07:35 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-11 15:07:35 -0300 |
| commit | 4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch) | |
| tree | 1682a647d4463397c119183369ae6f750d5fdcff /evergreen/functions | |
| parent | aa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff) | |
| parent | 8f0827553e09872941945a093b647a4211a9db7f (diff) | |
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0'
with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'evergreen/functions')
| -rwxr-xr-x | evergreen/functions/added_and_modified_patch_files_get.sh | 5 | ||||
| -rwxr-xr-x | evergreen/functions/binary_version_check.sh | 16 | ||||
| -rw-r--r-- | evergreen/functions/compile_expansions_generate.sh | 12 | ||||
| -rwxr-xr-x | evergreen/functions/credentials_setup.sh | 2 | ||||
| -rw-r--r-- | evergreen/functions/task_timeout_determine.sh | 9 | ||||
| -rw-r--r-- | evergreen/functions/venv_setup.sh | 24 | ||||
| -rwxr-xr-x | evergreen/functions/version_expansions_generate.sh | 24 |
7 files changed, 39 insertions, 53 deletions
diff --git a/evergreen/functions/added_and_modified_patch_files_get.sh b/evergreen/functions/added_and_modified_patch_files_get.sh index 7bc89909742..608b53787ef 100755 --- a/evergreen/functions/added_and_modified_patch_files_get.sh +++ b/evergreen/functions/added_and_modified_patch_files_get.sh @@ -7,3 +7,8 @@ set -o verbose set -o errexit git diff --name-only origin/${branch_name}... --line-prefix="${workdir}/src/" --diff-filter=d >> modified_and_created_patch_files.txt +if [ -d src/mongo/db/modules/enterprise ]; then + pushd src/mongo/db/modules/enterprise + git diff HEAD --name-only --line-prefix="${workdir}/src/src/mongo/db/modules/enterprise/" --diff-filter=d >> ~1/modified_and_created_patch_files.txt + popd +fi diff --git a/evergreen/functions/binary_version_check.sh b/evergreen/functions/binary_version_check.sh new file mode 100755 index 00000000000..ac01374a07e --- /dev/null +++ b/evergreen/functions/binary_version_check.sh @@ -0,0 +1,16 @@ +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" +. "$DIR/../prelude.sh" + +cd src + +set -o errexit +mongo_binary=dist-test/bin/mongo${exe} +activate_venv +bin_ver=$($python -c "import yaml; print(yaml.safe_load(open('compile_expansions.yml'))['version']);" | tr -d '[ \r\n]') +# Due to SERVER-23810, we cannot use $mongo_binary --quiet --nodb --eval "version();" +mongo_ver=$($mongo_binary --version | perl -pe '/version v([^\"]*)/; $_ = $1;' | tr -d '[ \r\n]') +# The versions must match +if [ "$bin_ver" != "$mongo_ver" ]; then + echo "The mongo version is $mongo_ver, expected version is $bin_ver" + exit 1 +fi diff --git a/evergreen/functions/compile_expansions_generate.sh b/evergreen/functions/compile_expansions_generate.sh index fe06d0fdf7d..dc9642f5cd4 100644 --- a/evergreen/functions/compile_expansions_generate.sh +++ b/evergreen/functions/compile_expansions_generate.sh @@ -5,6 +5,14 @@ cd src set -o errexit set -o verbose +# We get the raw version string (r1.2.3-45-gabcdef) from git +MONGO_VERSION=$(git describe --abbrev=7) +# If this is a patch build, we add the patch version id to the version string so we know +# this build was a patch, and which evergreen task it came from +if [ "${is_patch}" = "true" ]; then + MONGO_VERSION="$MONGO_VERSION-patch-${version_id}" +fi +echo "MONGO_VERSION = ${MONGO_VERSION}" activate_venv # shared scons cache testing # if 'scons_cache_scope' enabled and project level 'disable_shared_scons_cache' is not true @@ -35,12 +43,12 @@ if [ ! -z ${scons_cache_scope} ]; then set -o errexit fi echo "Shared Cache with setting: ${scons_cache_scope}" - SCONS_CACHE_MODE=${scons_cache_mode} SCONS_CACHE_SCOPE=$scons_cache_scope IS_PATCH=${is_patch} IS_COMMIT_QUEUE=${is_commit_queue} $python buildscripts/generate_compile_expansions_shared_cache.py --out compile_expansions.yml + MONGO_VERSION=$MONGO_VERSION SCONS_CACHE_MODE=${scons_cache_mode} SCONS_CACHE_SCOPE=$scons_cache_scope IS_PATCH=${is_patch} IS_COMMIT_QUEUE=${is_commit_queue} $python buildscripts/generate_compile_expansions_shared_cache.py --out compile_expansions.yml # Legacy Expansion generation else echo "Using legacy expansion generation" # Proceed with regular expansions generated # This script converts the generated version string into a sanitized version string for # use by scons and uploading artifacts as well as information about for the scons cache. - SCONS_CACHE_MODE=${scons_cache_mode} USE_SCONS_CACHE=${use_scons_cache} IS_PATCH=${is_patch} IS_COMMIT_QUEUE=${is_commit_queue} $python buildscripts/generate_compile_expansions.py --out compile_expansions.yml + MONGO_VERSION=$MONGO_VERSION SCONS_CACHE_MODE=${scons_cache_mode} USE_SCONS_CACHE=${use_scons_cache} $python buildscripts/generate_compile_expansions.py --out compile_expansions.yml fi diff --git a/evergreen/functions/credentials_setup.sh b/evergreen/functions/credentials_setup.sh index 55a9df5282e..15be8ea1e66 100755 --- a/evergreen/functions/credentials_setup.sh +++ b/evergreen/functions/credentials_setup.sh @@ -6,7 +6,7 @@ cd src cat > mci.buildlogger << END_OF_CREDS slavename='${slave}' passwd='${passwd}' -builder='${build_variant}_${project}' +builder='MCI_${build_variant}' build_num=${builder_num} build_phase='${task_name}_${execution}' END_OF_CREDS diff --git a/evergreen/functions/task_timeout_determine.sh b/evergreen/functions/task_timeout_determine.sh index 49dda4dd4a9..79d393bb964 100644 --- a/evergreen/functions/task_timeout_determine.sh +++ b/evergreen/functions/task_timeout_determine.sh @@ -25,20 +25,13 @@ if [[ -n "${burn_in_bypass}" ]]; then build_variant_for_timeout=${burn_in_bypass} fi -if [[ -n "${alias}" ]]; then - evg_alias=${alias} -else - evg_alias="evg-alias-absent" -fi - activate_venv PATH=$PATH:$HOME:/ $python buildscripts/evergreen_task_timeout.py $timeout_factor \ --install-dir "${install_dir}" \ --task-name ${task_name} \ --suite-name ${suite_name} \ - --project ${project} \ --build-variant $build_variant_for_timeout \ - --evg-alias $evg_alias \ + --evg-alias '${alias}' \ --timeout ${timeout_secs} \ --exec-timeout ${exec_timeout_secs} \ --evg-api-config ./.evergreen.yml \ diff --git a/evergreen/functions/venv_setup.sh b/evergreen/functions/venv_setup.sh index c6244686084..3d935d87594 100644 --- a/evergreen/functions/venv_setup.sh +++ b/evergreen/functions/venv_setup.sh @@ -74,22 +74,10 @@ activate_venv echo "Upgrading pip to 21.0.1" python -m pip --disable-pip-version-check install "pip==21.0.1" "wheel==0.37.0" || exit 1 -count=0 -while :; do - if ! python -m pip --disable-pip-version-check install -r "$toolchain_txt" -q --log install.log; then - count=$((count + 1)) - if [[ $count < 5 ]]; then - rand=$((1 + $RANDOM % 3)) - # delay = 20+[1-3] -> 80+[4-12] -> 180+[9-27] -> 320+[16-48] - sleep $((count * count * (20 + rand))) - continue - fi - echo "Pip install error" - cat install.log || true - exit 1 - else - break - fi -done - +python -m pip --disable-pip-version-check install -r "$toolchain_txt" -q --log install.log +if [ $? != 0 ]; then + echo "Pip install error" + cat install.log + exit 1 +fi python -m pip freeze > pip-requirements.txt diff --git a/evergreen/functions/version_expansions_generate.sh b/evergreen/functions/version_expansions_generate.sh deleted file mode 100755 index 75c89b94420..00000000000 --- a/evergreen/functions/version_expansions_generate.sh +++ /dev/null @@ -1,24 +0,0 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" -. "$DIR/../prelude.sh" - -cd src - -set -o errexit -set -o verbose -# We get the raw version string (r1.2.3-45-gabcdef) from git -MONGO_VERSION=$(git describe --abbrev=7) - -# If the project is sys-perf (or related), add the string -sys-perf to the version -if [[ "${project}" == sys-perf* ]]; then - MONGO_VERSION="$MONGO_VERSION-sys-perf" -fi - -# If this is a patch build, we add the patch version id to the version string so we know -# this build was a patch, and which evergreen task it came from -if [ "${is_patch}" = "true" ]; then - MONGO_VERSION="$MONGO_VERSION-patch-${version_id}" -fi -echo "MONGO_VERSION = ${MONGO_VERSION}" - -activate_venv -MONGO_VERSION=${MONGO_VERSION} IS_PATCH=${is_patch} IS_COMMIT_QUEUE=${is_commit_queue} $python buildscripts/generate_version_expansions.py --out version_expansions.yml |
