Repository: coiled/benchmarks (language: python)

Issue:
Add dask-expression version to benchmark database
The benchmark database stores versions for dask and distributed but not for dask-expressions. We should add a new field tracking this considering how important this can be for performance regressions


Discussion / hints:

Fix patch:
diff --git a/alembic/versions/25053f75e09f_add_dask_expr_version_tracking_migration.py b/alembic/versions/25053f75e09f_add_dask_expr_version_tracking_migration.py
new file mode 100644
index 0000000000..a70ce52276
--- /dev/null
+++ b/alembic/versions/25053f75e09f_add_dask_expr_version_tracking_migration.py
@@ -0,0 +1,24 @@
+"""Add dask-expr version tracking migration
+
+Revision ID: 25053f75e09f
+Revises: 24749594f367
+Create Date: 2024-02-26 08:04:47.704600
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision = '25053f75e09f'
+down_revision = '24749594f367'
+branch_labels = None
+depends_on = None
+
+
+def upgrade() -> None:
+    op.add_column('test_run', sa.Column('dask_expr_version', sa.String(), nullable=True))
+
+
+def downgrade() -> None:
+    op.drop_column('test_run', 'dask_expr_version')
diff --git a/benchmark_schema.py b/benchmark_schema.py
index 6ae34d094c..0883c65b91 100644
--- a/benchmark_schema.py
+++ b/benchmark_schema.py
@@ -23,6 +23,7 @@ class TestRun(Base):
     coiled_runtime_version = Column(String, nullable=True)
     coiled_software_name = Column(String, nullable=True)
     dask_version = Column(String, nullable=True)
+    dask_expr_version = Column(String, nullable=True)
     distributed_version = Column(String, nullable=True)
     python_version = Column(String, nullable=True)
     platform = Column(String, nullable=True)


Test patch:
diff --git a/tests/conftest.py b/tests/conftest.py
index adca8c19b8..94937ba4d8 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -17,6 +17,7 @@
 
 import dask
 import dask.array as da
+import dask_expr
 import distributed
 import filelock
 import pandas
@@ -181,6 +182,7 @@ def test_run_benchmark(benchmark_db_session, request, testrun_uid):
             originalname=request.node.originalname,
             path=str(request.node.path.relative_to(TEST_DIR)),
             dask_version=dask.__version__,
+            dask_expr_version=dask_expr.__version__,
             distributed_version=distributed.__version__,
             coiled_runtime_version=os.environ.get("AB_VERSION", "upstream"),
             coiled_software_name=COILED_SOFTWARE_NAME,