summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Winter <3457246+zackwintermdb@users.noreply.github.com>2024-08-05 14:54:01 -0700
committerMongoDB Bot <mongo-bot@mongodb.com>2024-08-05 22:03:51 +0000
commit81c102cee43550f6932367f668d766e39c60cffd (patch)
treeae9832f3fb5891086a8d74d84423236b8e4fc6dd
parent86fc156ab15800a91e808f589cb42f4ec9945944 (diff)
SERVER-92939 Route tools download to the newest rhel version (#25595) (#25769)r7.3.4-rc2r7.3.4
(cherry picked from commit c3f828ae4afafd7d03661beb3f44e41958cb3320) The tools binaries only are published for one minor version per major version of RHEL. When the db tools team added rhel88 and rhel93 versions of the binaries, they stopped publishing rhel80 (amd64), rhel82 (arm64), and rhel90 versions. Route the package tester to instead pull down the latest rhel version that matches the major rhel version of the package (ex. rhel80 package -> rhel88 tools) This will be compatible because the tools binaries do not depend on any system libraries that are not guaranteed to be compatible across minor versions (per https://access.redhat.com/articles/rhel8-abi-compatibility#Guidelines): ``` linux-vdso.so.1 [compat 1 via krb] libresolv.so.2 [compat 1 via libc] libpthread.so.0 [compat 1 via libc] libgssapi_krb5.so.2 [compat 1 via krb] libkrb5.so.3 [compat 1] libc.so.6 [compat 1] /lib/ld-linux-aarch64.so.1 [compat 1 via krb] libk5crypto.so.3 [compat 1 via krb] libcom_err.so.2 [compat 1 via krb] libkrb5support.so.0 [compat 1 via krb] libkeyutils.so.1 [compat 1 via krb] ``` GitOrigin-RevId: 841501a467c85eb853c7540695bec55fdbd25380
-rw-r--r--buildscripts/package_test.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/buildscripts/package_test.py b/buildscripts/package_test.py
index 9a35c8b74e9..712d35bd07b 100644
--- a/buildscripts/package_test.py
+++ b/buildscripts/package_test.py
@@ -342,8 +342,18 @@ def get_tools_package(arch_name: str, os_name: str) -> Optional[str]:
if arch_name == "aarch64" and not os_name.startswith("amazon") and not os_name.startswith(
"rhel"):
arch_name = "arm64"
+
+ # Tools packages are only published to the latest RHEL version supported on master, but
+ # the tools binaries are cross compatible with other RHEL versions
+ # (see https://jira.mongodb.org/browse/SERVER-92939)
+ def major_version_matches(download_name: str) -> bool:
+ if (os_name.startswith("rhel") and download_name.startswith("rhel")
+ and os_name[4] == download_name[4]):
+ return True
+ return download_name == os_name
+
for download in current_tools_releases["versions"][0]["downloads"]:
- if download["name"] == os_name and download["arch"] == arch_name:
+ if major_version_matches(download["name"]) and download["arch"] == arch_name:
return download["package"]["url"]
return None