Skip to content

Commit

Permalink
[#2144] Install Minio 7.1.16 for Python 3.6.
Browse files Browse the repository at this point in the history
Minio 7.1.17 uses a Python module that only exists in Python 3.7 and
beyond. This causes the test hook to fail on OS which ship with a
version of Python earlier than 3.7.

Installing the previous version of Minio resolves the issue.
  • Loading branch information
korydraughn authored and alanking committed Oct 18, 2023
1 parent 476b444 commit d4904e4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion irods_consortium_continuous_integration_test_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import platform
import distro
import logging
import sys

import irods_python_ci_utilities

Expand All @@ -34,7 +35,13 @@ def get_package_type():
def install_test_prerequisites():
irods_python_ci_utilities.subprocess_get_output(['sudo', 'python3', '-m', 'pip', 'install', '--upgrade', 'pip>=20.3.4'], check_rc=True)
irods_python_ci_utilities.subprocess_get_output(['sudo', 'python3', '-m', 'pip', 'install', 'boto3', '--upgrade'], check_rc=True)
irods_python_ci_utilities.subprocess_get_output(['sudo', 'python3', '-m', 'pip', 'install', 'minio', '--upgrade'], check_rc=True)

# Minio 7.1.17 imports the annontations module which only exists in Python 3.7 and beyond.
# For OS which default to Python 3.6, we have to install the previous version of Minio to avoid
# compatibility issues. The --upgrade flag is ignored if "minio_version" results in a non-empty string.
minio_version = '==7.1.16' if sys.hexversion < 0x030700F0 else ''
irods_python_ci_utilities.subprocess_get_output(['sudo', 'python3', '-m', 'pip', 'install', 'minio' + minio_version, '--upgrade'], check_rc=True)

irods_python_ci_utilities.subprocess_get_output(['sudo', '-EH', 'python3', '-m', 'pip', 'install', 'unittest-xml-reporting==1.14.0'])

def download_and_start_minio_server():
Expand Down

0 comments on commit d4904e4

Please sign in to comment.