Skip to content
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

Skip azure compat tests #1982

Merged
merged 4 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions python/tests/compat/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@ def is_running_on_windows():

def run_shell_command(command : List[Union[str, os.PathLike]], cwd : Optional[os.PathLike] = None) -> subprocess.CompletedProcess:
logger.info(f"Executing command: {command}")
# shell=True is required for running the correct python executable on Windows
result = subprocess.run(command, cwd=cwd, capture_output=True, shell=is_running_on_windows())
result = None
if is_running_on_windows():
# shell=True is required for running the correct python executable on Windows
result = subprocess.run(command, cwd=cwd, capture_output=True, shell=True)
else:
# On linux we need shell=True for conda feedstock runners (because otherwise they fail to expand path variables)
# But to correctly work with shell=True we need a single command string.
command_string = ' '.join(command)
result = subprocess.run(command_string, cwd=cwd, capture_output=True, shell=True, stdin=subprocess.DEVNULL)
if result.returncode != 0:
logger.warning(f"Command failed, stdout: {str(result.stdout)}, stderr: {str(result.stderr)}")
return result
Expand Down Expand Up @@ -140,15 +147,14 @@ def assert_read(self, sym : str, df) -> None:
scope="session",
params=[
pytest.param("1.6.2", marks=VENV_COMPAT_TESTS_MARK),
pytest.param("4.5.0", marks=VENV_COMPAT_TESTS_MARK),
pytest.param("4.5.1", marks=VENV_COMPAT_TESTS_MARK),
] # TODO: Extend this list with other old versions
)
def old_venv(request):
version = request.param
path = os.path.join("venvs", version)
# The requirements_file needs to be relative to the [path] we use for the venv.
# Absolute paths break some Azure CI runners on conda forge
requirements_file = os.path.join("..", "..", "tests", "compat", f"requirements-{version}.txt")
compat_dir = os.path.dirname(os.path.abspath(__file__))
requirements_file = os.path.join(compat_dir, f"requirements-{version}.txt")
with Venv(path, requirements_file, version) as old_venv:
yield old_venv

Expand Down Expand Up @@ -176,10 +182,13 @@ def arctic_uri(request):

@pytest.fixture()
def old_venv_and_arctic_uri(old_venv, arctic_uri):
# TODO: Replace 4.5.0 with 4.5.1 when it is released to re-enable both mongo and lmdb.
if Version(old_venv.version) <= Version("4.5.0") and arctic_uri.startswith("mongo"):
pytest.skip("Mongo storage backend has a desctruction bug present until 4.5.0, which can cause flaky segfaults.")
if arctic_uri.startswith("mongo"):
# TODO: We tought the bug was fixed in 4.5.1 but it's still present.
pytest.skip("Mongo storage backend has a desctruction bug, which can cause flaky segfaults.")
if Version(old_venv.version) <= Version("4.5.0") and arctic_uri.startswith("lmdb"):
pytest.skip("LMDB storage backend has a desctruction bug present until 4.5.0, which can cause flaky segfaults.")
if arctic_uri.startswith("azure"):
# TODO: Once #1979 is understood and fixed reenable azure on versions which have the fix.
pytest.skip("Azure storage backend has probable a desctruction bug, which can cause flaky segfaults.")

return old_venv, arctic_uri
3 changes: 0 additions & 3 deletions python/tests/compat/requirements-4.5.0.txt

This file was deleted.

3 changes: 3 additions & 0 deletions python/tests/compat/requirements-4.5.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
arcticdb==4.5.1
numpy<2
pyarrow
Loading