Skip to content

fix CI & drop EoL MongoDB < 4.4 #2887

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

terencehonles
Copy link
Contributor

@terencehonles terencehonles commented May 28, 2025

This change fixes the CI by updating the ubuntu runner and drops EoL MongoDB versions below 4.4 which cannot be easily installed on Ubuntu 22.04.

@terencehonles terencehonles force-pushed the fix-ci branch 6 times, most recently from acf3f9a to 6a72192 Compare May 28, 2025 08:02
@terencehonles terencehonles changed the title fix CI fix CI & drop EoL MongoDB < 4.4 May 28, 2025
MONGODB_6_0: "6.0.20"
MONGODB_7_0: "7.0.17"
MONGODB_8_0: "8.0.5"
MONGODB_6_0: "6.0.22"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

bumping to their latest patch releases

@@ -36,8 +33,6 @@ env:

MAIN_PYTHON_VERSION: "3.9"

MONGOSH: "2.4.2" # Needed for MongoDB 6.0+
Copy link
Contributor Author

Choose a reason for hiding this comment

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

always installing mongosh since it's only not needed by MongoDB 4.4 and 5.0, but it works for > 4.2 and it simplifies the installation and checking.

if [[ "${MONGODB}" =~ ^(7.0|8.0) ]]; then
if [[ "$MONGODB" =~ ^(6.0|7.0|8.0) ]]; then
mongo_build="mongodb-linux-x86_64-ubuntu2204-${MONGODB}"
elif [[ "$MONGODB" =~ ^(4.4|5.0) ]]; then
mongo_build="mongodb-linux-x86_64-ubuntu2004-${MONGODB}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

like before, this still seems to work on 22.04, so I'm not going to try fixing/changing this

fi
mongosh_build="mongosh-${MONGOSH}-linux-x64"
mongosh_tarball="${mongosh_build}.tgz"
mongosh_download_url="https://github.com/mongodb-js/mongosh/releases/download/v${MONGOSH}/${mongosh_tarball}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The archived releases on https://www.mongodb.com/try/download/compass point me to github, so just inlining this

Comment on lines +68 to +70
echo >&2 "Creating mongo.path"
echo "export PATH='${mongodb_dir}/bin:${mongosh_dir}/bin:'"'$PATH' \
| tee >&2 mongo.path
Copy link
Contributor Author

Choose a reason for hiding this comment

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

creating a ".path" file to make sure start_mongo is referring to the same binaries that this installation is referring to w/o having to duplicate the find logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant