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

Investigate compat failure 2 #2238

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
11 changes: 11 additions & 0 deletions python/arcticdb/util/venv.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
import os
import re
import shutil
import subprocess
import tempfile
Expand Down Expand Up @@ -127,6 +128,16 @@ def execute(self, python_commands: List[str], dfs: Optional[Dict] = None) -> Non
+ python_commands
)

# Add prints for tracebility
def add_prints(python_commands):
result = []
for command in python_commands:
result.append(f"print('About to run:', {repr(command)})")
result.append(command)
result.append(f"print('Done with:', {repr(command)})")
return result
python_commands = add_prints(python_commands)

python_path = os.path.join(dir, "run.py")
with open(python_path, "w") as python_file:
python_file.write("\n".join(python_commands))
Expand Down
4 changes: 3 additions & 1 deletion python/tests/compat/arcticdb/test_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ def test_compat_snapshot_metadata_read(old_venv_and_arctic_uri, lib_name):
assert meta == {"old_key": "old_value"}


def test_compat_read_incomplete(old_venv_and_arctic_uri, lib_name):
@pytest.mark.parametrize("run", list(range(100)))
def test_compat_read_incomplete(old_venv_and_arctic_uri, lib_name, run):
print("Run number:", run)
old_venv, arctic_uri = old_venv_and_arctic_uri
sym = "sym"
df = pd.DataFrame({
Expand Down
15 changes: 8 additions & 7 deletions python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,15 +1096,16 @@ def lmdb_or_in_memory_version_store_tiny_segment(request):


@pytest.fixture(
# scope="session",
scope="session",
params=[
pytest.param("1.6.2", marks=VENV_COMPAT_TESTS_MARK),
pytest.param("4.5.1", marks=VENV_COMPAT_TESTS_MARK),
# pytest.param("1.6.2", marks=VENV_COMPAT_TESTS_MARK),
# pytest.param("4.5.1", marks=VENV_COMPAT_TESTS_MARK),
pytest.param("5.0.0", marks=VENV_COMPAT_TESTS_MARK),
], # TODO: Extend this list with other old versions
)
def old_venv(request, tmp_path):
def old_venv(request, tmp_path_factory):
version = request.param
tmp_path = tmp_path_factory.mktemp("venvs-")
path = os.path.join("venvs", tmp_path, version)
test_dir = os.path.dirname(os.path.abspath(__file__))
compat_dir = os.path.join(test_dir, "compat")
Expand Down Expand Up @@ -1133,9 +1134,9 @@ def pandas_v1_venv(request):
@pytest.fixture(
params=[
"lmdb",
"s3_ssl_disabled",
pytest.param("azurite", marks=AZURE_TESTS_MARK),
pytest.param("mongo", marks=MONGO_TESTS_MARK),
# "s3_ssl_disabled",
# pytest.param("azurite", marks=AZURE_TESTS_MARK),
# pytest.param("mongo", marks=MONGO_TESTS_MARK),
]
)
def arctic_uri(request):
Expand Down
Loading