From f72bae97914ac958605352285164a9cb46bad389 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Mon, 1 Dec 2025 16:22:43 +0100 Subject: [PATCH 01/21] Add `prevent_new_submission` for resources --- fractal_server/app/models/v2/resource.py | 13 +++++++ fractal_server/app/schemas/v2/resource.py | 17 ++++++-- ...1be9f71472cf_add_prevent_new_submission.py | 39 +++++++++++++++++++ 3 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submission.py diff --git a/fractal_server/app/models/v2/resource.py b/fractal_server/app/models/v2/resource.py index 9934ef2f93..fc332f1027 100644 --- a/fractal_server/app/models/v2/resource.py +++ b/fractal_server/app/models/v2/resource.py @@ -5,6 +5,7 @@ from sqlalchemy import Column from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.types import DateTime +from sqlmodel import BOOLEAN from sqlmodel import CheckConstraint from sqlmodel import Field from sqlmodel import SQLModel @@ -43,6 +44,18 @@ class Resource(SQLModel, table=True): Address for ssh connections, when `type="slurm_ssh"`. """ + prevent_new_submission: bool = Field( + sa_column=Column( + BOOLEAN, + server_default="false", + nullable=False, + ) + ) + """ + When set to true: Prevent new job submissions and stop execution of + ongoing jobs as soon as the current task is complete. + """ + jobs_local_dir: str """ Base local folder for job subfolders (containing artifacts and logs). diff --git a/fractal_server/app/schemas/v2/resource.py b/fractal_server/app/schemas/v2/resource.py index 234c6b30f1..46c7a5c9e7 100644 --- a/fractal_server/app/schemas/v2/resource.py +++ b/fractal_server/app/schemas/v2/resource.py @@ -77,6 +77,8 @@ class ValidResourceBase(BaseModel): jobs_runner_config: dict[NonEmptyStr, Any] jobs_poll_interval: int = 5 + prevent_new_submissions: bool = True + @model_validator(mode="after") def _pixi_slurm_config(self) -> Self: if ( @@ -95,6 +97,9 @@ class ValidResourceLocal(ValidResourceBase): Attributes: name: Resource name. type: Resource type. + prevent_new_submissions: + When set to true: Prevent new job submissions and stop execution of + ongoing jobs as soon as the current task is complete. tasks_python_config: Configuration of Python interpreters used for task collection. tasks_pixi_config: @@ -105,7 +110,6 @@ class ValidResourceLocal(ValidResourceBase): Local base folder for job folders. jobs_runner_config: Runner configuration. - """ type: Literal[ResourceType.LOCAL] @@ -121,6 +125,9 @@ class ValidResourceSlurmSudo(ValidResourceBase): Attributes: name: Resource name. type: Resource type. + prevent_new_submissions: + When set to true: Prevent new job submissions and stop execution of + ongoing jobs as soon as the current task is complete. tasks_python_config: Configuration of Python interpreters used for task collection. tasks_pixi_config: @@ -150,6 +157,9 @@ class ValidResourceSlurmSSH(ValidResourceBase): Attributes: name: Resource name type: Resource type. + prevent_new_submissions: + When set to true: Prevent new job submissions and stop execution of + ongoing jobs as soon as the current task is complete. tasks_python_config: Configuration of Python interpreters used for task collection. tasks_pixi_config: @@ -198,10 +208,9 @@ class ResourceRead(BaseModel): """ id: int - - type: str - name: str + type: str + prevent_new_submissions: bool timestamp_created: AwareDatetime host: str | None diff --git a/fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submission.py b/fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submission.py new file mode 100644 index 0000000000..cb10611ef2 --- /dev/null +++ b/fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submission.py @@ -0,0 +1,39 @@ +"""Add `prevent_new_submission` + +Revision ID: 1be9f71472cf +Revises: 7910eed4cf97 +Create Date: 2025-12-01 16:22:05.337158 + +""" + +import sqlalchemy as sa +from alembic import op + +# revision identifiers, used by Alembic. +revision = "1be9f71472cf" +down_revision = "7910eed4cf97" +branch_labels = None +depends_on = None + + +def upgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table("resource", schema=None) as batch_op: + batch_op.add_column( + sa.Column( + "prevent_new_submission", + sa.BOOLEAN(), + server_default="false", + nullable=False, + ), + ) + + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table("resource", schema=None) as batch_op: + batch_op.drop_column("prevent_new_submission") + + # ### end Alembic commands ### From 680f6bc2999c0161401b46185d00b6f63362b3a1 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Mon, 1 Dec 2025 16:25:34 +0100 Subject: [PATCH 02/21] Set default to false --- fractal_server/app/schemas/v2/resource.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fractal_server/app/schemas/v2/resource.py b/fractal_server/app/schemas/v2/resource.py index 46c7a5c9e7..cf5d08719a 100644 --- a/fractal_server/app/schemas/v2/resource.py +++ b/fractal_server/app/schemas/v2/resource.py @@ -77,7 +77,7 @@ class ValidResourceBase(BaseModel): jobs_runner_config: dict[NonEmptyStr, Any] jobs_poll_interval: int = 5 - prevent_new_submissions: bool = True + prevent_new_submissions: bool = False @model_validator(mode="after") def _pixi_slurm_config(self) -> Self: From d967deac94849c6f654a4f21677f1b45df0001ec Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Mon, 1 Dec 2025 16:28:20 +0100 Subject: [PATCH 03/21] Add default --- fractal_server/app/models/v2/resource.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fractal_server/app/models/v2/resource.py b/fractal_server/app/models/v2/resource.py index fc332f1027..f3e79f2189 100644 --- a/fractal_server/app/models/v2/resource.py +++ b/fractal_server/app/models/v2/resource.py @@ -45,11 +45,12 @@ class Resource(SQLModel, table=True): """ prevent_new_submission: bool = Field( + default=False, sa_column=Column( BOOLEAN, server_default="false", nullable=False, - ) + ), ) """ When set to true: Prevent new job submissions and stop execution of From 34543fb2809dba46a9879311401ab4f00ee5779c Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Mon, 1 Dec 2025 16:35:18 +0100 Subject: [PATCH 04/21] typo --- fractal_server/app/models/v2/resource.py | 3 +-- ...ssion.py => 1be9f71472cf_add_prevent_new_submissions.py} | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) rename fractal_server/migrations/versions/{1be9f71472cf_add_prevent_new_submission.py => 1be9f71472cf_add_prevent_new_submissions.py} (86%) diff --git a/fractal_server/app/models/v2/resource.py b/fractal_server/app/models/v2/resource.py index f3e79f2189..b1f25ec635 100644 --- a/fractal_server/app/models/v2/resource.py +++ b/fractal_server/app/models/v2/resource.py @@ -44,8 +44,7 @@ class Resource(SQLModel, table=True): Address for ssh connections, when `type="slurm_ssh"`. """ - prevent_new_submission: bool = Field( - default=False, + prevent_new_submissions: bool = Field( sa_column=Column( BOOLEAN, server_default="false", diff --git a/fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submission.py b/fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submissions.py similarity index 86% rename from fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submission.py rename to fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submissions.py index cb10611ef2..fc8a6b9621 100644 --- a/fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submission.py +++ b/fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submissions.py @@ -1,4 +1,4 @@ -"""Add `prevent_new_submission` +"""Add `prevent_new_submissions` Revision ID: 1be9f71472cf Revises: 7910eed4cf97 @@ -21,7 +21,7 @@ def upgrade() -> None: with op.batch_alter_table("resource", schema=None) as batch_op: batch_op.add_column( sa.Column( - "prevent_new_submission", + "prevent_new_submissions", sa.BOOLEAN(), server_default="false", nullable=False, @@ -34,6 +34,6 @@ def upgrade() -> None: def downgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### with op.batch_alter_table("resource", schema=None) as batch_op: - batch_op.drop_column("prevent_new_submission") + batch_op.drop_column("prevent_new_submissions") # ### end Alembic commands ### From 3e89e97ca300b495ded63bf01187af452f0a96bb Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Mon, 1 Dec 2025 16:51:30 +0100 Subject: [PATCH 05/21] Use prevent-new-submissions --- fractal_server/app/routes/api/v2/submit.py | 8 ++++++++ fractal_server/runner/v2/_local.py | 1 + fractal_server/runner/v2/_slurm_ssh.py | 1 + fractal_server/runner/v2/_slurm_sudo.py | 1 + fractal_server/runner/v2/runner.py | 18 ++++++++++++++++++ 5 files changed, 29 insertions(+) diff --git a/fractal_server/app/routes/api/v2/submit.py b/fractal_server/app/routes/api/v2/submit.py index d4a41e4314..89cf48312e 100644 --- a/fractal_server/app/routes/api/v2/submit.py +++ b/fractal_server/app/routes/api/v2/submit.py @@ -146,6 +146,14 @@ async def submit_job( user=user, db=db, ) + if resource.prevent_new_submissions: + raise HTTPException( + status_code=status.HTTP_422_UNPROCESSABLE_CONTENT, + detail=( + f"The computational resource '{resource.name}' cannot " + "currently accept new job submissions.", + ), + ) # User appropriate FractalSSH object if resource.type == ResourceType.SLURM_SSH: diff --git a/fractal_server/runner/v2/_local.py b/fractal_server/runner/v2/_local.py index 2860718cc8..5b1f2bb183 100644 --- a/fractal_server/runner/v2/_local.py +++ b/fractal_server/runner/v2/_local.py @@ -104,4 +104,5 @@ def process_workflow( job_attribute_filters=job_attribute_filters, job_type_filters=job_type_filters, user_id=user_id, + resource_id=resource.id, ) diff --git a/fractal_server/runner/v2/_slurm_ssh.py b/fractal_server/runner/v2/_slurm_ssh.py index e33f86f755..d51cfaa39b 100644 --- a/fractal_server/runner/v2/_slurm_ssh.py +++ b/fractal_server/runner/v2/_slurm_ssh.py @@ -127,4 +127,5 @@ def process_workflow( job_attribute_filters=job_attribute_filters, job_type_filters=job_type_filters, user_id=user_id, + resource_id=resource.id, ) diff --git a/fractal_server/runner/v2/_slurm_sudo.py b/fractal_server/runner/v2/_slurm_sudo.py index 5eeae4aa44..7a3ddc4eeb 100644 --- a/fractal_server/runner/v2/_slurm_sudo.py +++ b/fractal_server/runner/v2/_slurm_sudo.py @@ -123,4 +123,5 @@ def process_workflow( job_attribute_filters=job_attribute_filters, job_type_filters=job_type_filters, user_id=user_id, + resource_id=resource.id, ) diff --git a/fractal_server/runner/v2/runner.py b/fractal_server/runner/v2/runner.py index 65216d4f91..8da844ab01 100644 --- a/fractal_server/runner/v2/runner.py +++ b/fractal_server/runner/v2/runner.py @@ -14,6 +14,7 @@ from fractal_server.app.models.v2 import HistoryRun from fractal_server.app.models.v2 import HistoryUnit from fractal_server.app.models.v2 import JobV2 +from fractal_server.app.models.v2 import Resource from fractal_server.app.models.v2 import TaskGroupV2 from fractal_server.app.models.v2 import WorkflowTaskV2 from fractal_server.app.schemas.v2 import HistoryUnitStatus @@ -95,6 +96,7 @@ def execute_tasks( get_runner_config: GetRunnerConfigType, job_type_filters: dict[str, bool], job_attribute_filters: AttributeFilters, + resource_id: int, ) -> None: logger = get_logger(logger_name=logger_name) @@ -218,6 +220,22 @@ def execute_tasks( ) raise JobExecutionError(error_msg) + # Fail if the resource is not open for new submissions + resource_id = 1 # FIXME + resource = db.get(Resource, resource_id) + if resource.prevent_new_submissions: + error_msg = ( + f"The computational resource '{resource.name}' cannot " + "currently accept new job submissions." + ) + logger.info(error_msg) + update_status_of_history_run( + history_run_id=history_run_id, + status=HistoryUnitStatus.FAILED, + db_sync=db, + ) + raise JobExecutionError(error_msg) + # TASK EXECUTION try: if task.type in [ From 72dbe42cf4e5bf9fb8716f40936136434f6b2091 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 12:34:26 +0100 Subject: [PATCH 06/21] migration --- ...=> 88270f589c9b_add_prevent_new_submissions.py} | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename fractal_server/migrations/versions/{1be9f71472cf_add_prevent_new_submissions.py => 88270f589c9b_add_prevent_new_submissions.py} (80%) diff --git a/fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submissions.py b/fractal_server/migrations/versions/88270f589c9b_add_prevent_new_submissions.py similarity index 80% rename from fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submissions.py rename to fractal_server/migrations/versions/88270f589c9b_add_prevent_new_submissions.py index fc8a6b9621..a00f6712e3 100644 --- a/fractal_server/migrations/versions/1be9f71472cf_add_prevent_new_submissions.py +++ b/fractal_server/migrations/versions/88270f589c9b_add_prevent_new_submissions.py @@ -1,8 +1,8 @@ -"""Add `prevent_new_submissions` +"""add_prevent_new_submissions -Revision ID: 1be9f71472cf -Revises: 7910eed4cf97 -Create Date: 2025-12-01 16:22:05.337158 +Revision ID: 88270f589c9b +Revises: f0702066b007 +Create Date: 2025-12-02 12:34:11.028259 """ @@ -10,8 +10,8 @@ from alembic import op # revision identifiers, used by Alembic. -revision = "1be9f71472cf" -down_revision = "7910eed4cf97" +revision = "88270f589c9b" +down_revision = "f0702066b007" branch_labels = None depends_on = None @@ -25,7 +25,7 @@ def upgrade() -> None: sa.BOOLEAN(), server_default="false", nullable=False, - ), + ) ) # ### end Alembic commands ### From 599e2a55e067fc14ae3594a9dc3a6843f56cd102 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 12:36:44 +0100 Subject: [PATCH 07/21] Remove fixme --- fractal_server/runner/v2/runner.py | 1 - 1 file changed, 1 deletion(-) diff --git a/fractal_server/runner/v2/runner.py b/fractal_server/runner/v2/runner.py index 8da844ab01..99ee98048b 100644 --- a/fractal_server/runner/v2/runner.py +++ b/fractal_server/runner/v2/runner.py @@ -221,7 +221,6 @@ def execute_tasks( raise JobExecutionError(error_msg) # Fail if the resource is not open for new submissions - resource_id = 1 # FIXME resource = db.get(Resource, resource_id) if resource.prevent_new_submissions: error_msg = ( From d674879dab9140528cb961fb45f53efb51965d4d Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 12:37:21 +0100 Subject: [PATCH 08/21] Add `db.refresh` --- fractal_server/runner/v2/runner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fractal_server/runner/v2/runner.py b/fractal_server/runner/v2/runner.py index 99ee98048b..3366736991 100644 --- a/fractal_server/runner/v2/runner.py +++ b/fractal_server/runner/v2/runner.py @@ -222,6 +222,7 @@ def execute_tasks( # Fail if the resource is not open for new submissions resource = db.get(Resource, resource_id) + db.refresh(resource) if resource.prevent_new_submissions: error_msg = ( f"The computational resource '{resource.name}' cannot " From 7fedec9faa7ffcdbc61879a632d822329290506b Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:13:51 +0100 Subject: [PATCH 09/21] Fix tests --- .../v2/test_04_runner/test_dummy_examples.py | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/tests/v2/test_04_runner/test_dummy_examples.py b/tests/v2/test_04_runner/test_dummy_examples.py index 5562f754b7..5d55c03c3d 100644 --- a/tests/v2/test_04_runner/test_dummy_examples.py +++ b/tests/v2/test_04_runner/test_dummy_examples.py @@ -142,6 +142,7 @@ async def test_dummy_insert_single_image( dataset=dataset, workflow_dir_local=tmp_path / "job0", job_id=job.id, + resource_id=resource.id, **execute_tasks_args, ) @@ -153,6 +154,7 @@ async def test_dummy_insert_single_image( dataset=dataset, workflow_dir_local=tmp_path / "job1", job_id=job.id, + resource_id=resource.id, **execute_tasks_args, ) @@ -203,6 +205,7 @@ async def test_dummy_insert_single_image( dataset=dataset_case_2, workflow_dir_local=tmp_path / "job2", job_id=job.id, + resource_id=resource.id, **execute_tasks_args, ) db.expunge_all() @@ -253,6 +256,7 @@ async def test_dummy_insert_single_image( dataset=dataset, workflow_dir_local=tmp_path / "job3", job_id=job.id, + resource_id=resource.id, **execute_tasks_args, ) error_msg = str(e.value) @@ -272,6 +276,7 @@ async def test_dummy_remove_images( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): """ NOTE: this test is relevant for @@ -280,6 +285,8 @@ async def test_dummy_remove_images( zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") task_id = fractal_tasks_mock_db["dummy_remove_images"].id + resource, _ = local_resource_profile_db + async with MockCurrentUser() as user: user_id = user.id project = await project_factory(user) @@ -335,6 +342,7 @@ async def test_dummy_remove_images( workflow_dir_local=tmp_path / "job0", user_id=user_id, job_id=job.id, + resource_id=resource.id, runner=local_runner, ) @@ -364,6 +372,7 @@ async def test_dummy_remove_images( workflow_dir_local=tmp_path / "job1", user_id=user_id, job_id=job.id, + resource_id=resource.id, runner=local_runner, ) error_msg = str(e.value) @@ -381,7 +390,9 @@ async def test_dummy_unset_attribute( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): + resource, _ = local_resource_profile_db zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") task_id = fractal_tasks_mock_db["dummy_unset_attribute"].id @@ -422,6 +433,7 @@ async def test_dummy_unset_attribute( workflow_dir_local=tmp_path / "job0", user_id=user_id, job_id=job.id, + resource_id=resource.id, runner=local_runner, ) db.expunge_all() @@ -453,6 +465,7 @@ async def test_dummy_unset_attribute( workflow_dir_local=tmp_path / "job1", user_id=user_id, job_id=job.id, + resource_id=resource.id, runner=local_runner, ) db.expunge_all() @@ -474,7 +487,9 @@ async def test_dummy_insert_single_image_with_attribute_none( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): + resource, _ = local_resource_profile_db # Preliminary setup zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") task_id = fractal_tasks_mock_db["dummy_insert_single_image"].id @@ -506,6 +521,7 @@ async def test_dummy_insert_single_image_with_attribute_none( workflow_dir_local=tmp_path / "job0", user_id=user_id, job_id=job.id, + resource_id=resource.id, runner=local_runner, ) # Assert that attribute was not set @@ -524,7 +540,9 @@ async def test_dummy_insert_single_image_normalization( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): + resource, _ = local_resource_profile_db # Preliminary setup zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") task_id = fractal_tasks_mock_db["dummy_insert_single_image"].id @@ -556,6 +574,7 @@ async def test_dummy_insert_single_image_normalization( workflow_dir_local=tmp_path / "job0", user_id=user_id, job_id=job.id, + resource_id=resource.id, runner=local_runner, ) # Assert that URLs are normalized @@ -576,11 +595,14 @@ async def test_default_inclusion_of_images( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): """ Ref https://github.com/fractal-analytics-platform/fractal-server/issues/1374 """ + + resource, _ = local_resource_profile_db # Preliminary setup zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") task_id = fractal_tasks_mock_db["generic_task_parallel"].id @@ -621,6 +643,7 @@ async def test_default_inclusion_of_images( workflow_dir_local=tmp_path / "job0", user_id=user_id, job_id=job.id, + resource_id=resource.id, runner=local_runner, ) @@ -641,7 +664,9 @@ async def test_compound_task_with_compute_failure( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): + resource, _ = local_resource_profile_db # Preliminary setup zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") task_id = fractal_tasks_mock_db["generic_task_compound"].id @@ -685,6 +710,7 @@ async def test_compound_task_with_compute_failure( workflow_dir_local=tmp_path / "job0", user_id=user_id, job_id=job.id, + resource_id=resource.id, runner=local_runner, ) debug(exc_info.value.assemble_error()) @@ -781,7 +807,9 @@ async def test_dummy_invalid_output_parallel( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): + resource, _ = local_resource_profile_db zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") task_id = fractal_tasks_mock_db["generic_task_parallel"].id async with MockCurrentUser() as user: @@ -836,6 +864,7 @@ def patched_task_output(*args, **kwargs): dataset=dataset, workflow_dir_local=tmp_path / "job0", job_id=job.id, + resource_id=resource.id, **execute_tasks_args, ) res = await db.execute( @@ -860,11 +889,12 @@ async def test_status_based_submission( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): """ Test processing of images based on status. """ - + resource, _ = local_resource_profile_db zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") task_id = fractal_tasks_mock_db["generic_task"].id @@ -918,6 +948,7 @@ async def test_status_based_submission( "well": ["B01", "B02"], IMAGE_STATUS_KEY: [HistoryUnitStatusWithUnset.UNSET], }, + resource_id=resource.id, ) # Check that `HistoryImageCache`/`HistoryUnit` data were stored correctly @@ -960,6 +991,7 @@ async def test_status_based_submission( job_attribute_filters={ IMAGE_STATUS_KEY: [HistoryUnitStatusWithUnset.DONE], }, + resource_id=resource.id, ) # Validate latest `HistoryRun` object @@ -988,6 +1020,7 @@ async def test_status_based_submission( job_attribute_filters={ IMAGE_STATUS_KEY: [HistoryUnitStatusWithUnset.UNSET], }, + resource_id=resource.id, ) res = await db.execute( @@ -1016,4 +1049,5 @@ async def test_status_based_submission( job_id=job.id, runner=local_runner, user_id=user_id, + resource_id=resource.id, ) From 62b9ce3129bfa4bcc044ff2210bb07ad8435e015 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:18:32 +0100 Subject: [PATCH 10/21] Try downgrading psycopg to 3.2 --- poetry.lock | 153 +++++++++++++++++++++++++++---------------------- pyproject.toml | 2 +- 2 files changed, 87 insertions(+), 68 deletions(-) diff --git a/poetry.lock b/poetry.lock index fc00cf2c2e..0c190584ee 100644 --- a/poetry.lock +++ b/poetry.lock @@ -945,6 +945,8 @@ files = [ {file = "greenlet-3.2.4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c2ca18a03a8cfb5b25bc1cbe20f3d9a4c80d8c3b13ba3df49ac3961af0b1018d"}, {file = "greenlet-3.2.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:9fe0a28a7b952a21e2c062cd5756d34354117796c6d9215a87f55e38d15402c5"}, {file = "greenlet-3.2.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8854167e06950ca75b898b104b63cc646573aa5fef1353d4508ecdd1ee76254f"}, + {file = "greenlet-3.2.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f47617f698838ba98f4ff4189aef02e7343952df3a615f847bb575c3feb177a7"}, + {file = "greenlet-3.2.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:af41be48a4f60429d5cad9d22175217805098a9ef7c40bfef44f7669fb9d74d8"}, {file = "greenlet-3.2.4-cp310-cp310-win_amd64.whl", hash = "sha256:73f49b5368b5359d04e18d15828eecc1806033db5233397748f4ca813ff1056c"}, {file = "greenlet-3.2.4-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:96378df1de302bc38e99c3a9aa311967b7dc80ced1dcc6f171e99842987882a2"}, {file = "greenlet-3.2.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1ee8fae0519a337f2329cb78bd7a8e128ec0f881073d43f023c7b8d4831d5246"}, @@ -954,6 +956,8 @@ files = [ {file = "greenlet-3.2.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2523e5246274f54fdadbce8494458a2ebdcdbc7b802318466ac5606d3cded1f8"}, {file = "greenlet-3.2.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1987de92fec508535687fb807a5cea1560f6196285a4cde35c100b8cd632cc52"}, {file = "greenlet-3.2.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:55e9c5affaa6775e2c6b67659f3a71684de4c549b3dd9afca3bc773533d284fa"}, + {file = "greenlet-3.2.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c9c6de1940a7d828635fbd254d69db79e54619f165ee7ce32fda763a9cb6a58c"}, + {file = "greenlet-3.2.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:03c5136e7be905045160b1b9fdca93dd6727b180feeafda6818e6496434ed8c5"}, {file = "greenlet-3.2.4-cp311-cp311-win_amd64.whl", hash = "sha256:9c40adce87eaa9ddb593ccb0fa6a07caf34015a29bf8d344811665b573138db9"}, {file = "greenlet-3.2.4-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:3b67ca49f54cede0186854a008109d6ee71f66bd57bb36abd6d0a0267b540cdd"}, {file = "greenlet-3.2.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ddf9164e7a5b08e9d22511526865780a576f19ddd00d62f8a665949327fde8bb"}, @@ -963,6 +967,8 @@ files = [ {file = "greenlet-3.2.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3b3812d8d0c9579967815af437d96623f45c0f2ae5f04e366de62a12d83a8fb0"}, {file = "greenlet-3.2.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:abbf57b5a870d30c4675928c37278493044d7c14378350b3aa5d484fa65575f0"}, {file = "greenlet-3.2.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:20fb936b4652b6e307b8f347665e2c615540d4b42b3b4c8a321d8286da7e520f"}, + {file = "greenlet-3.2.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ee7a6ec486883397d70eec05059353b8e83eca9168b9f3f9a361971e77e0bcd0"}, + {file = "greenlet-3.2.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:326d234cbf337c9c3def0676412eb7040a35a768efc92504b947b3e9cfc7543d"}, {file = "greenlet-3.2.4-cp312-cp312-win_amd64.whl", hash = "sha256:a7d4e128405eea3814a12cc2605e0e6aedb4035bf32697f72deca74de4105e02"}, {file = "greenlet-3.2.4-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:1a921e542453fe531144e91e1feedf12e07351b1cf6c9e8a3325ea600a715a31"}, {file = "greenlet-3.2.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cd3c8e693bff0fff6ba55f140bf390fa92c994083f838fece0f63be121334945"}, @@ -972,6 +978,8 @@ files = [ {file = "greenlet-3.2.4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23768528f2911bcd7e475210822ffb5254ed10d71f4028387e5a99b4c6699671"}, {file = "greenlet-3.2.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:00fadb3fedccc447f517ee0d3fd8fe49eae949e1cd0f6a611818f4f6fb7dc83b"}, {file = "greenlet-3.2.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:d25c5091190f2dc0eaa3f950252122edbbadbb682aa7b1ef2f8af0f8c0afefae"}, + {file = "greenlet-3.2.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6e343822feb58ac4d0a1211bd9399de2b3a04963ddeec21530fc426cc121f19b"}, + {file = "greenlet-3.2.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ca7f6f1f2649b89ce02f6f229d7c19f680a6238af656f61e0115b24857917929"}, {file = "greenlet-3.2.4-cp313-cp313-win_amd64.whl", hash = "sha256:554b03b6e73aaabec3745364d6239e9e012d64c68ccd0b8430c64ccc14939a8b"}, {file = "greenlet-3.2.4-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:49a30d5fda2507ae77be16479bdb62a660fa51b1eb4928b524975b3bde77b3c0"}, {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:299fd615cd8fc86267b47597123e3f43ad79c9d8a22bebdce535e53550763e2f"}, @@ -979,6 +987,8 @@ files = [ {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b4a1870c51720687af7fa3e7cda6d08d801dae660f75a76f3845b642b4da6ee1"}, {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:061dc4cf2c34852b052a8620d40f36324554bc192be474b9e9770e8c042fd735"}, {file = "greenlet-3.2.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:44358b9bf66c8576a9f57a590d5f5d6e72fa4228b763d0e43fee6d3b06d3a337"}, + {file = "greenlet-3.2.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2917bdf657f5859fbf3386b12d68ede4cf1f04c90c3a6bc1f013dd68a22e2269"}, + {file = "greenlet-3.2.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:015d48959d4add5d6c9f6c5210ee3803a830dce46356e3bc326d6776bde54681"}, {file = "greenlet-3.2.4-cp314-cp314-win_amd64.whl", hash = "sha256:e37ab26028f12dbb0ff65f29a8d3d44a765c61e729647bf2ddfbbed621726f01"}, {file = "greenlet-3.2.4-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:b6a7c19cf0d2742d0809a4c05975db036fdff50cd294a93632d6a310bf9ac02c"}, {file = "greenlet-3.2.4-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:27890167f55d2387576d1f41d9487ef171849ea0359ce1510ca6e06c8bece11d"}, @@ -988,6 +998,8 @@ files = [ {file = "greenlet-3.2.4-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c9913f1a30e4526f432991f89ae263459b1c64d1608c0d22a5c79c287b3c70df"}, {file = "greenlet-3.2.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b90654e092f928f110e0007f572007c9727b5265f7632c2fa7415b4689351594"}, {file = "greenlet-3.2.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:81701fd84f26330f0d5f4944d4e92e61afe6319dcd9775e39396e39d7c3e5f98"}, + {file = "greenlet-3.2.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:28a3c6b7cd72a96f61b0e4b2a36f681025b60ae4779cc73c1535eb5f29560b10"}, + {file = "greenlet-3.2.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:52206cd642670b0b320a1fd1cbfd95bca0e043179c1d8a045f2c6109dfe973be"}, {file = "greenlet-3.2.4-cp39-cp39-win32.whl", hash = "sha256:65458b409c1ed459ea899e939f0e1cdb14f58dbc803f2f93c5eab5694d32671b"}, {file = "greenlet-3.2.4-cp39-cp39-win_amd64.whl", hash = "sha256:d2e685ade4dafd447ede19c31277a224a239a0a1a4eca4e6390efedf20260cfb"}, {file = "greenlet-3.2.4.tar.gz", hash = "sha256:0dca0d95ff849f9a364385f36ab49f50065d76964944638be9691e1832e9f86d"}, @@ -1852,93 +1864,100 @@ virtualenv = ">=20.10.0" [[package]] name = "psycopg" -version = "3.3.0" +version = "3.2.13" description = "PostgreSQL database adapter for Python" optional = false -python-versions = ">=3.10" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "psycopg-3.3.0-py3-none-any.whl", hash = "sha256:c9f070afeda682f6364f86cd77145f43feaf60648b2ce1f6e883e594d04cbea8"}, - {file = "psycopg-3.3.0.tar.gz", hash = "sha256:68950107fb8979d34bfc16b61560a26afe5d8dab96617881c87dfff58221df09"}, + {file = "psycopg-3.2.13-py3-none-any.whl", hash = "sha256:a481374514f2da627157f767a9336705ebefe93ea7a0522a6cbacba165da179a"}, + {file = "psycopg-3.2.13.tar.gz", hash = "sha256:309adaeda61d44556046ec9a83a93f42bbe5310120b1995f3af49ab6d9f13c1d"}, ] [package.dependencies] -psycopg-binary = {version = "3.3.0", optional = true, markers = "implementation_name != \"pypy\" and extra == \"binary\""} +psycopg-binary = {version = "3.2.13", optional = true, markers = "implementation_name != \"pypy\" and extra == \"binary\""} typing-extensions = {version = ">=4.6", markers = "python_version < \"3.13\""} tzdata = {version = "*", markers = "sys_platform == \"win32\""} [package.extras] -binary = ["psycopg-binary (==3.3.0) ; implementation_name != \"pypy\""] -c = ["psycopg-c (==3.3.0) ; implementation_name != \"pypy\""] -dev = ["ast-comments (>=1.1.2)", "black (>=24.1.0)", "codespell (>=2.2)", "cython-lint (>=0.16)", "dnspython (>=2.1)", "flake8 (>=4.0)", "isort-psycopg", "isort[colors] (>=6.0)", "mypy (>=1.19.0)", "pre-commit (>=4.0.1)", "types-setuptools (>=57.4)", "types-shapely (>=2.0)", "wheel (>=0.37)"] +binary = ["psycopg-binary (==3.2.13) ; implementation_name != \"pypy\""] +c = ["psycopg-c (==3.2.13) ; implementation_name != \"pypy\""] +dev = ["ast-comments (>=1.1.2)", "black (>=24.1.0)", "codespell (>=2.2)", "dnspython (>=2.1)", "flake8 (>=4.0)", "isort-psycopg", "isort[colors] (>=6.0)", "mypy (>=1.14)", "pre-commit (>=4.0.1)", "types-setuptools (>=57.4)", "types-shapely (>=2.0)", "wheel (>=0.37)"] docs = ["Sphinx (>=5.0)", "furo (==2022.6.21)", "sphinx-autobuild (>=2021.3.14)", "sphinx-autodoc-typehints (>=1.12)"] pool = ["psycopg-pool"] -test = ["anyio (>=4.0)", "mypy (>=1.19.0) ; implementation_name != \"pypy\"", "pproxy (>=2.7)", "pytest (>=6.2.5)", "pytest-cov (>=3.0)", "pytest-randomly (>=3.5)"] +test = ["anyio (>=4.0)", "mypy (>=1.14)", "pproxy (>=2.7)", "pytest (>=6.2.5)", "pytest-cov (>=3.0)", "pytest-randomly (>=3.5)"] [[package]] name = "psycopg-binary" -version = "3.3.0" +version = "3.2.13" description = "PostgreSQL database adapter for Python -- C optimisation distribution" optional = false -python-versions = ">=3.10" +python-versions = ">=3.8" groups = ["main"] markers = "implementation_name != \"pypy\"" files = [ - {file = "psycopg_binary-3.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7492be4b65203b277ae618119041e6094b2ffdf5dc22fe624388cef58a75e84f"}, - {file = "psycopg_binary-3.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:aa240e0bc7b502c920efea9e8d3c8809c8542bbf514d84780491135fa37731b3"}, - {file = "psycopg_binary-3.3.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:e25922a8ecb06af71b89360ec4790730dc1783fcffd30932bf65266652bb9e8c"}, - {file = "psycopg_binary-3.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:315a250352243627e5444452b1b3623f08399cadb6cc80d9e3e314f7b11199f6"}, - {file = "psycopg_binary-3.3.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:970a89317af7dcbb06fb5b18c1f4fa780fd3be6e6a2549a280938389d1691b18"}, - {file = "psycopg_binary-3.3.0-cp310-cp310-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c398dc3a4ca4f8697efe58dbdcd423dc8287d6a56e99f48c53906d4a6c19015e"}, - {file = "psycopg_binary-3.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:df1a4a0547e232d75db22b485836a55a4e46266cde6c78713dea089758b7b3dc"}, - {file = "psycopg_binary-3.3.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:6f847b32baed6ae97cc71d0bf9e7b6c8f520b1f62bac8327eac60fa1c4aaea34"}, - {file = "psycopg_binary-3.3.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d604f98529090945865410994b7a5de2fa304efcdb4959a4a84d7bc018dea378"}, - {file = "psycopg_binary-3.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a53dfda5b5d0a9345ffa55d4fe6a63e4df517865b72395d719bc358a33f479d4"}, - {file = "psycopg_binary-3.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:2b913475b41b01ceab5c4f3705189306728893ad79ea93c39b3f54fe0e413d45"}, - {file = "psycopg_binary-3.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a995a9fa3ffc65f21d73dd4d34e51e915bfb38e721405e40d2a61d789479292d"}, - {file = "psycopg_binary-3.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1ef7e480253ef827fe30c0a73b6548dd557d1b5a92f1e9a3c8762d196dee6f51"}, - {file = "psycopg_binary-3.3.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:a8d7f56bf0ac1704e08bd496de7477af4013717890bfaf4a085c939b4d3d0577"}, - {file = "psycopg_binary-3.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bfe8bbf1b2df60974365a5abed74a06ae1152bd62b1a46336c633c53b9cb2ce8"}, - {file = "psycopg_binary-3.3.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1dc17ab5ee5a196741aab33ea44715ffe082b1801fffddbc33798afccf1660c3"}, - {file = "psycopg_binary-3.3.0-cp311-cp311-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:229bb0b528f84741d1447cbe94d8a45b0cf0ef066df8f5b7df6995fee2f05e2d"}, - {file = "psycopg_binary-3.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7b7d657d045a2a38eef948998180b1c8792160de47c7b8f6e409d655b5fd8f9d"}, - {file = "psycopg_binary-3.3.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:2be4ce54dfcade48f6bfbbd579b112657cfa0d08bcfa89e796c4cb2a15b626cf"}, - {file = "psycopg_binary-3.3.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:a31ad12f31701db0cdbb7a90f5df002a1a39f92feb87420be32079ab30031819"}, - {file = "psycopg_binary-3.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:473f4f0d6861aa0038f087112d8e7b6647615a29737a69178ffb0558675d610d"}, - {file = "psycopg_binary-3.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:77689a3493df1a8d56c4fe8cb309d315e9b0f396d48b7a2640cc6221eb6764f6"}, - {file = "psycopg_binary-3.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:0344ba871e71ba82bf6c86caa6bc8cbcf79c6d947f011a15d140243d1644a725"}, - {file = "psycopg_binary-3.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b18fff8b1f220fb63e2836da9cdebc72e2afeef34d897d2e7627f4950cfc5c4d"}, - {file = "psycopg_binary-3.3.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:87ac7796afef87042d1766cea04c18b602889e93718b11ec9beb524811256355"}, - {file = "psycopg_binary-3.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f530ce0ab2ffae9d6dde54115a3eb6da585dd4fc57da7d9620e15bbc5f0fa156"}, - {file = "psycopg_binary-3.3.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2b5ccf41cd83419465f8d7e16ae8ae6fdceed574cdbe841ad2ad2614b8c15752"}, - {file = "psycopg_binary-3.3.0-cp312-cp312-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9429504a8aea5474699062b046aeac05cbb0b55677ac8a4ce6fdda4bf21bd5b8"}, - {file = "psycopg_binary-3.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ef3c26227da32566417c27f56b4abd648b1a312db5eabf5062912e1bc6b2ffb3"}, - {file = "psycopg_binary-3.3.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:e68d133468501f918cf55d31e149b03ae76decf6a909047134f61ae854f52946"}, - {file = "psycopg_binary-3.3.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:094a217959ceee5b776b4da41c57d9ff6250d66326eb07ecb31301b79b150d91"}, - {file = "psycopg_binary-3.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7328b41c2b951ea3fc2023ff237e03bba0f64a1f9d35bd97719a815e28734078"}, - {file = "psycopg_binary-3.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:fc3509c292f54979f6a9f62ce604b75d91ea29be7a5279c647c82b25227c2b4a"}, - {file = "psycopg_binary-3.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1321c4c3e913cb34b7c47c859e04ebdda9499026f35b98923e1581f8b28280d9"}, - {file = "psycopg_binary-3.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:691b04f4339a3dcc43dde6ee70fd6de61fa56cc67eac431c701b06fab1e37b98"}, - {file = "psycopg_binary-3.3.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5e20e7459daffa2c22baef504c2e087172ccf7e945635f89cc7019e34e38b60c"}, - {file = "psycopg_binary-3.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:91d4fe6a6b0be9859970fa0dc3e340fadaa01645e15d1885d48d9d6d9f0a9570"}, - {file = "psycopg_binary-3.3.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8de4dba5c385b102365ee88d67bc0c9df0e57deb78b1d7472220aa7958b59a1d"}, - {file = "psycopg_binary-3.3.0-cp313-cp313-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:86ffcf49b62fdf8f984d3219b9970a5cf056f0a988e1d5bcfa4753d7680a394b"}, - {file = "psycopg_binary-3.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5115bcabc29096b39cfdf9bb4f4f85bd8c60ad2f900be27b3e2e56763f3566b7"}, - {file = "psycopg_binary-3.3.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:0400c7e3147d4ee0dabe6a53b871c10cd74d96e0544db316d381026540782e6f"}, - {file = "psycopg_binary-3.3.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:e1ddcdf81ff2e0f76f59dafc0bc35caef8f4bb4ee9c7d327698511dcd1ae93b5"}, - {file = "psycopg_binary-3.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:148881de848c4fa46bc2534af97f8d2c239e28f6f1fb43dbf3c60ca3e0f660b0"}, - {file = "psycopg_binary-3.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:2e9218750c8fcace04247b5bec179586ffb90e42e591402efa42ebc6b97480a2"}, - {file = "psycopg_binary-3.3.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:0f5e56aff53247f5b626796c29a596efc534332557508cddff9b41f34e4af6ae"}, - {file = "psycopg_binary-3.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:6470c034f07de3a2cfcfb4f6b95b97412be6c2ff75b92a22e2b7a5eca4b64501"}, - {file = "psycopg_binary-3.3.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:a8ef328c87608372052a8859743485dbb91ae0e38766008499f88471a9c438cc"}, - {file = "psycopg_binary-3.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c13fe4533d832c03b249b9dc45a59dcdb3918eacd41ff830c5c8ea551bc50513"}, - {file = "psycopg_binary-3.3.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dd1500110ce7e71d51ca509760c75306e72c919e63556257ac6a85bab11356ca"}, - {file = "psycopg_binary-3.3.0-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d8e90ea351b075b6cac33ebd3dc24748459a8ed24b9210e5db961e6176a1ab47"}, - {file = "psycopg_binary-3.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:da67a00d5dceaa3259f72462118a73b3b1d1b542422be767817bc784c4a0c69e"}, - {file = "psycopg_binary-3.3.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:b503c911165d4560e8d8489c46a78ec28e35321b85bf13ce58417382d75f436c"}, - {file = "psycopg_binary-3.3.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:8894829fcebd6f431d2a0e31b553feb5714e355c34af0a76df24069370a928f1"}, - {file = "psycopg_binary-3.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f3038029fff5105193ffe02352529925cb4ad5a5426b1d56d24b3654b062684e"}, - {file = "psycopg_binary-3.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:3681effab211f3e7bbde651f6eb7552b60289cd039a1a2058c674743a72d15d4"}, + {file = "psycopg_binary-3.2.13-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9e25eb65494955c0dabdcd7097b004cbd70b982cf3cbc7186c2e854f788677a9"}, + {file = "psycopg_binary-3.2.13-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:732b25c2d932ca0655ea2588563eae831dc0842c93c69be4754a5b0e9760b38d"}, + {file = "psycopg_binary-3.2.13-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7350d9cc4e35529c4548ddda34a1c17f28d3f3a8f792c25cd67e8a04952ed415"}, + {file = "psycopg_binary-3.2.13-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:090c22795969ee1ace17322b1718769694607d942cef084c6fb4493adfa57da0"}, + {file = "psycopg_binary-3.2.13-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9ac329532f36342ff99fc1aefdbb531563bec03c7bc3ae934c8347a7a61339df"}, + {file = "psycopg_binary-3.2.13-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:1db11a7e618d58cfb937c409c7d279a84cbb31d32a7efc63f1e5f426f3613793"}, + {file = "psycopg_binary-3.2.13-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:5f5081b2cbb0358bb3625109d41b57411bf9d9c29762a867e38c06d974b245ee"}, + {file = "psycopg_binary-3.2.13-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5d466ac3a3738647ff2405397946870dc363e33282ced151e7ea74f622947c06"}, + {file = "psycopg_binary-3.2.13-cp310-cp310-win_amd64.whl", hash = "sha256:087acf2b24787ae206718136c1f51bc90cda68b02c3819b0556f418e3565f2c3"}, + {file = "psycopg_binary-3.2.13-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9cfe87749d010dfd34534ba8c71aa0674db9a3fce65232c98989f77c742c9ce7"}, + {file = "psycopg_binary-3.2.13-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8db77fac1dfe3f69c982db92a51fd78e1354fa8f523a6781a636123e5c7ffcde"}, + {file = "psycopg_binary-3.2.13-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cbbac4cd5b0e14b91ad8244268ca3fc2f527d1a337b489af57d7669c9d2e1a24"}, + {file = "psycopg_binary-3.2.13-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:a146f0a59a7e3ca92996f8133b1d5e5922e668f7c656b4a9201e702f4cf25896"}, + {file = "psycopg_binary-3.2.13-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:27150515de5f709e4142429db6fd36a1d01f0b8b17d915b5f7bb095364465398"}, + {file = "psycopg_binary-3.2.13-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9942255705255367d94368941e3a913b0daf74b47d191471dbe4dc0de9fbc769"}, + {file = "psycopg_binary-3.2.13-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:75ebc8335f48c339ec24f4c371595f6b7043147fe6d18e619c8564428ab8adaf"}, + {file = "psycopg_binary-3.2.13-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6fe2982a73b2ea473c9e2b91a35a21af3b03313bed188eccbcde4972483ac60a"}, + {file = "psycopg_binary-3.2.13-cp311-cp311-win_amd64.whl", hash = "sha256:6a50db4661fae78779d3cc38a0a68cabc997ca9d485ec27443b109ef8ac1672a"}, + {file = "psycopg_binary-3.2.13-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:223fc610a80bbc4355ad3c9952d468a18bb5cd7065846a8c275f100d80cd4004"}, + {file = "psycopg_binary-3.2.13-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b67f06a68d68b4621b6a411f9e583df876977afa06b1ba270b1b347d40aa93fc"}, + {file = "psycopg_binary-3.2.13-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:082579f2ae41bdabe20c82810810f3e290ac2206cccf0cb41cf36b3218f53b3c"}, + {file = "psycopg_binary-3.2.13-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:ff7df7bd8ec2c805f3a4896b8ade971139af0f9f8cf45d05014ac71fe54887be"}, + {file = "psycopg_binary-3.2.13-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8f1189dc78553ef4b2e55d9e116fc74870191bc6a9a5f4442412a703c4cc6c3b"}, + {file = "psycopg_binary-3.2.13-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0ef8ed4a4e0f7bf5e941782478a43c14b2b585b031e2266dd3afb87be2775d95"}, + {file = "psycopg_binary-3.2.13-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:de06fc9707a49f7c081b5c950974dd6de3dc33d681f7524f0b396471f5a4a480"}, + {file = "psycopg_binary-3.2.13-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:917ad1cd6e6ef8a9df2f28d7b29c7148f089be46ac56fe838f986c0227652d14"}, + {file = "psycopg_binary-3.2.13-cp312-cp312-win_amd64.whl", hash = "sha256:b53b0d9499805b307017070492189e349256e0946f62c815e442baa01f2ea6c5"}, + {file = "psycopg_binary-3.2.13-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dbae6ab1966e2b61d97e47220556c330c4608bb4cfb3a124aa0595c39995c068"}, + {file = "psycopg_binary-3.2.13-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:fae933e4564386199fc54845d85413eedb49760e0bcd2b621fde2dd1825b99b3"}, + {file = "psycopg_binary-3.2.13-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:13e2f8894d410678529ff9f1211f96c5a93ff142f992b302682b42d924428b61"}, + {file = "psycopg_binary-3.2.13-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f26f7009375cf1e92180e5c517c52da1054f7e690dde90e0ed00fa8b5736bcd4"}, + {file = "psycopg_binary-3.2.13-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ea2fdbcc9142933a47c66970e0df8b363e3bd1ea4c5ce376f2f3d94a9aeec847"}, + {file = "psycopg_binary-3.2.13-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac92d6bc1d4a41c7459953a9aa727b9966e937e94c9e072527317fd2a67d488b"}, + {file = "psycopg_binary-3.2.13-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:8b843c00478739e95c46d6d3472b13123b634685f107831a9bfc41503a06ecbd"}, + {file = "psycopg_binary-3.2.13-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:2f63868cc96bc18486cebec24445affbdd7f7debf28fac466ea935a8b5a4753b"}, + {file = "psycopg_binary-3.2.13-cp313-cp313-win_amd64.whl", hash = "sha256:594dfbca3326e997ae738d3d339004e8416b1f7390f52ce8dc2d692393e8fa96"}, + {file = "psycopg_binary-3.2.13-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:502a778c3e07c6b3aabfa56ee230e8c264d2debfab42d11535513a01bdfff0d6"}, + {file = "psycopg_binary-3.2.13-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:7561a71d764d6f74d66e8b7d844b0f27fa33de508f65c17b1d56a94c73644776"}, + {file = "psycopg_binary-3.2.13-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9caf14745a1930b4e03fe4072cd7154eaf6e1241d20c42130ed784408a26b24b"}, + {file = "psycopg_binary-3.2.13-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:4a6cafabdc0bfa37e11c6f365020fd5916b62d6296df581f4dceaa43a2ce680c"}, + {file = "psycopg_binary-3.2.13-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c96cb5a27e68acac6d74b64fca38592a692de9c4b7827339190698d58027aa45"}, + {file = "psycopg_binary-3.2.13-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:596176ae3dfbf56fc61108870bfe17c7205d33ac28d524909feb5335201daa0a"}, + {file = "psycopg_binary-3.2.13-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:cc3a0408435dfbb77eeca5e8050df4b19a6e9b7e5e5583edf524c4a83d6293b2"}, + {file = "psycopg_binary-3.2.13-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:65df0d459ffba14082d8ca4bb2f6ffbb2f8d02968f7d34a747e1031934b76b23"}, + {file = "psycopg_binary-3.2.13-cp314-cp314-win_amd64.whl", hash = "sha256:5c77f156c7316529ed371b5f95a51139e531328ee39c37493a2afcbc1f79d5de"}, + {file = "psycopg_binary-3.2.13-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:84c32892b75a3c7a1111b0ae17d567e161bec7f51b6419bfee6919973f57a811"}, + {file = "psycopg_binary-3.2.13-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1c9e7ddbb1fe0c99ebe73e4658722d6e6fb7058dacac0fbe98653cf01a7a6871"}, + {file = "psycopg_binary-3.2.13-cp38-cp38-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:ef324695327681c756e206fbd0aa9bbc50fd05f45c74bc97c640c13ba36cc108"}, + {file = "psycopg_binary-3.2.13-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:00ac1f1832c11ebf7ce3e30cd9cd9ec4d32b7d4aabe02e5cc6dca1b6ecff215d"}, + {file = "psycopg_binary-3.2.13-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:38cadba35c8e3d0a43a916457c9b91c510be7253576d052d9549fd3c49c55782"}, + {file = "psycopg_binary-3.2.13-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:5056e701ec81e792f6acd362276585ac0c24456519b5e2fe552f298a04d2cd0c"}, + {file = "psycopg_binary-3.2.13-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:fbc7c46da9b0db8126f8ebcdcc966c0a14e87c187af7978b47f6971bfbb9cc2c"}, + {file = "psycopg_binary-3.2.13-cp38-cp38-win_amd64.whl", hash = "sha256:9b98ed605a394107ea624c3792896cef29b833d2e193facfd85ba72fc4e2f85b"}, + {file = "psycopg_binary-3.2.13-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6d8d1b709509d0f8cb857acf740b5eccd5bd2fb208a5b20e895f250519a32459"}, + {file = "psycopg_binary-3.2.13-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2d45bc5f4335498d32a26c8f8c0bf9ce8c973c19e78a9ee77c031300fb361300"}, + {file = "psycopg_binary-3.2.13-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f062d725898bf6fc5cfc6349a0d08ee09f129deb14d7fcd5c30f9f1b349f39dc"}, + {file = "psycopg_binary-3.2.13-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:915647b5bbbcde2bd464dc293eec4f74710fa71edc4f85aa6f6c8494a179dc9e"}, + {file = "psycopg_binary-3.2.13-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d3aec6e2f1cf4deb1b9a3ac287c0591479f3bd851d0a911d628f8c2c71c14f4a"}, + {file = "psycopg_binary-3.2.13-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:a56a8b1794cbf27ca04012ac2890d58cfc82b3b310c1dac4fa78fbf6f57e7440"}, + {file = "psycopg_binary-3.2.13-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:4150a5e72f863be442d153829724109d83a76871d9bc801d6bb5b9c84b5b19b9"}, + {file = "psycopg_binary-3.2.13-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:028b49eb465f5d263d250cfd4f168fdabb306d0bbd97fd66a8a1fd7b696a953c"}, + {file = "psycopg_binary-3.2.13-cp39-cp39-win_amd64.whl", hash = "sha256:532ea34f673148d637be65a96251832252e278540b39fbd683ef37e58ec361c1"}, ] [[package]] @@ -2974,4 +2993,4 @@ dev = ["pytest", "setuptools"] [metadata] lock-version = "2.1" python-versions = ">=3.11,<3.15" -content-hash = "957cdc91df816c5d0d6634b84376c07feb863f56c1fe1796c4a0025cc6590fa6" +content-hash = "c7fb1d65fa98deba4de24cbb70aab19e7b734fff7cd91b02aa504062c955fb69" diff --git a/pyproject.toml b/pyproject.toml index 6a65c290fb..552c64cc3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ dependencies = [ "packaging >= 25.0.0, <26.0.0", "fabric >= 3.2.2, <3.3.0", "gunicorn >=23.0,<24.0", - "psycopg[binary] >= 3.1.0, <4.0.0", + "psycopg[binary] >= 3.1.0, <3.3.0", "tomli_w >=1.2.0, <1.3.0 " ] From 3cb8e1c17acb62c9592fa7dff932286cc644d3df Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:22:45 +0100 Subject: [PATCH 11/21] Revert "Try downgrading psycopg to 3.2" This reverts commit 62b9ce3129bfa4bcc044ff2210bb07ad8435e015. --- poetry.lock | 153 ++++++++++++++++++++++--------------------------- pyproject.toml | 2 +- 2 files changed, 68 insertions(+), 87 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0c190584ee..fc00cf2c2e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -945,8 +945,6 @@ files = [ {file = "greenlet-3.2.4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c2ca18a03a8cfb5b25bc1cbe20f3d9a4c80d8c3b13ba3df49ac3961af0b1018d"}, {file = "greenlet-3.2.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:9fe0a28a7b952a21e2c062cd5756d34354117796c6d9215a87f55e38d15402c5"}, {file = "greenlet-3.2.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8854167e06950ca75b898b104b63cc646573aa5fef1353d4508ecdd1ee76254f"}, - {file = "greenlet-3.2.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f47617f698838ba98f4ff4189aef02e7343952df3a615f847bb575c3feb177a7"}, - {file = "greenlet-3.2.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:af41be48a4f60429d5cad9d22175217805098a9ef7c40bfef44f7669fb9d74d8"}, {file = "greenlet-3.2.4-cp310-cp310-win_amd64.whl", hash = "sha256:73f49b5368b5359d04e18d15828eecc1806033db5233397748f4ca813ff1056c"}, {file = "greenlet-3.2.4-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:96378df1de302bc38e99c3a9aa311967b7dc80ced1dcc6f171e99842987882a2"}, {file = "greenlet-3.2.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1ee8fae0519a337f2329cb78bd7a8e128ec0f881073d43f023c7b8d4831d5246"}, @@ -956,8 +954,6 @@ files = [ {file = "greenlet-3.2.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2523e5246274f54fdadbce8494458a2ebdcdbc7b802318466ac5606d3cded1f8"}, {file = "greenlet-3.2.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1987de92fec508535687fb807a5cea1560f6196285a4cde35c100b8cd632cc52"}, {file = "greenlet-3.2.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:55e9c5affaa6775e2c6b67659f3a71684de4c549b3dd9afca3bc773533d284fa"}, - {file = "greenlet-3.2.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c9c6de1940a7d828635fbd254d69db79e54619f165ee7ce32fda763a9cb6a58c"}, - {file = "greenlet-3.2.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:03c5136e7be905045160b1b9fdca93dd6727b180feeafda6818e6496434ed8c5"}, {file = "greenlet-3.2.4-cp311-cp311-win_amd64.whl", hash = "sha256:9c40adce87eaa9ddb593ccb0fa6a07caf34015a29bf8d344811665b573138db9"}, {file = "greenlet-3.2.4-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:3b67ca49f54cede0186854a008109d6ee71f66bd57bb36abd6d0a0267b540cdd"}, {file = "greenlet-3.2.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ddf9164e7a5b08e9d22511526865780a576f19ddd00d62f8a665949327fde8bb"}, @@ -967,8 +963,6 @@ files = [ {file = "greenlet-3.2.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3b3812d8d0c9579967815af437d96623f45c0f2ae5f04e366de62a12d83a8fb0"}, {file = "greenlet-3.2.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:abbf57b5a870d30c4675928c37278493044d7c14378350b3aa5d484fa65575f0"}, {file = "greenlet-3.2.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:20fb936b4652b6e307b8f347665e2c615540d4b42b3b4c8a321d8286da7e520f"}, - {file = "greenlet-3.2.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ee7a6ec486883397d70eec05059353b8e83eca9168b9f3f9a361971e77e0bcd0"}, - {file = "greenlet-3.2.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:326d234cbf337c9c3def0676412eb7040a35a768efc92504b947b3e9cfc7543d"}, {file = "greenlet-3.2.4-cp312-cp312-win_amd64.whl", hash = "sha256:a7d4e128405eea3814a12cc2605e0e6aedb4035bf32697f72deca74de4105e02"}, {file = "greenlet-3.2.4-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:1a921e542453fe531144e91e1feedf12e07351b1cf6c9e8a3325ea600a715a31"}, {file = "greenlet-3.2.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cd3c8e693bff0fff6ba55f140bf390fa92c994083f838fece0f63be121334945"}, @@ -978,8 +972,6 @@ files = [ {file = "greenlet-3.2.4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23768528f2911bcd7e475210822ffb5254ed10d71f4028387e5a99b4c6699671"}, {file = "greenlet-3.2.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:00fadb3fedccc447f517ee0d3fd8fe49eae949e1cd0f6a611818f4f6fb7dc83b"}, {file = "greenlet-3.2.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:d25c5091190f2dc0eaa3f950252122edbbadbb682aa7b1ef2f8af0f8c0afefae"}, - {file = "greenlet-3.2.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6e343822feb58ac4d0a1211bd9399de2b3a04963ddeec21530fc426cc121f19b"}, - {file = "greenlet-3.2.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ca7f6f1f2649b89ce02f6f229d7c19f680a6238af656f61e0115b24857917929"}, {file = "greenlet-3.2.4-cp313-cp313-win_amd64.whl", hash = "sha256:554b03b6e73aaabec3745364d6239e9e012d64c68ccd0b8430c64ccc14939a8b"}, {file = "greenlet-3.2.4-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:49a30d5fda2507ae77be16479bdb62a660fa51b1eb4928b524975b3bde77b3c0"}, {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:299fd615cd8fc86267b47597123e3f43ad79c9d8a22bebdce535e53550763e2f"}, @@ -987,8 +979,6 @@ files = [ {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b4a1870c51720687af7fa3e7cda6d08d801dae660f75a76f3845b642b4da6ee1"}, {file = "greenlet-3.2.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:061dc4cf2c34852b052a8620d40f36324554bc192be474b9e9770e8c042fd735"}, {file = "greenlet-3.2.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:44358b9bf66c8576a9f57a590d5f5d6e72fa4228b763d0e43fee6d3b06d3a337"}, - {file = "greenlet-3.2.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2917bdf657f5859fbf3386b12d68ede4cf1f04c90c3a6bc1f013dd68a22e2269"}, - {file = "greenlet-3.2.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:015d48959d4add5d6c9f6c5210ee3803a830dce46356e3bc326d6776bde54681"}, {file = "greenlet-3.2.4-cp314-cp314-win_amd64.whl", hash = "sha256:e37ab26028f12dbb0ff65f29a8d3d44a765c61e729647bf2ddfbbed621726f01"}, {file = "greenlet-3.2.4-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:b6a7c19cf0d2742d0809a4c05975db036fdff50cd294a93632d6a310bf9ac02c"}, {file = "greenlet-3.2.4-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:27890167f55d2387576d1f41d9487ef171849ea0359ce1510ca6e06c8bece11d"}, @@ -998,8 +988,6 @@ files = [ {file = "greenlet-3.2.4-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c9913f1a30e4526f432991f89ae263459b1c64d1608c0d22a5c79c287b3c70df"}, {file = "greenlet-3.2.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b90654e092f928f110e0007f572007c9727b5265f7632c2fa7415b4689351594"}, {file = "greenlet-3.2.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:81701fd84f26330f0d5f4944d4e92e61afe6319dcd9775e39396e39d7c3e5f98"}, - {file = "greenlet-3.2.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:28a3c6b7cd72a96f61b0e4b2a36f681025b60ae4779cc73c1535eb5f29560b10"}, - {file = "greenlet-3.2.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:52206cd642670b0b320a1fd1cbfd95bca0e043179c1d8a045f2c6109dfe973be"}, {file = "greenlet-3.2.4-cp39-cp39-win32.whl", hash = "sha256:65458b409c1ed459ea899e939f0e1cdb14f58dbc803f2f93c5eab5694d32671b"}, {file = "greenlet-3.2.4-cp39-cp39-win_amd64.whl", hash = "sha256:d2e685ade4dafd447ede19c31277a224a239a0a1a4eca4e6390efedf20260cfb"}, {file = "greenlet-3.2.4.tar.gz", hash = "sha256:0dca0d95ff849f9a364385f36ab49f50065d76964944638be9691e1832e9f86d"}, @@ -1864,100 +1852,93 @@ virtualenv = ">=20.10.0" [[package]] name = "psycopg" -version = "3.2.13" +version = "3.3.0" description = "PostgreSQL database adapter for Python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" groups = ["main"] files = [ - {file = "psycopg-3.2.13-py3-none-any.whl", hash = "sha256:a481374514f2da627157f767a9336705ebefe93ea7a0522a6cbacba165da179a"}, - {file = "psycopg-3.2.13.tar.gz", hash = "sha256:309adaeda61d44556046ec9a83a93f42bbe5310120b1995f3af49ab6d9f13c1d"}, + {file = "psycopg-3.3.0-py3-none-any.whl", hash = "sha256:c9f070afeda682f6364f86cd77145f43feaf60648b2ce1f6e883e594d04cbea8"}, + {file = "psycopg-3.3.0.tar.gz", hash = "sha256:68950107fb8979d34bfc16b61560a26afe5d8dab96617881c87dfff58221df09"}, ] [package.dependencies] -psycopg-binary = {version = "3.2.13", optional = true, markers = "implementation_name != \"pypy\" and extra == \"binary\""} +psycopg-binary = {version = "3.3.0", optional = true, markers = "implementation_name != \"pypy\" and extra == \"binary\""} typing-extensions = {version = ">=4.6", markers = "python_version < \"3.13\""} tzdata = {version = "*", markers = "sys_platform == \"win32\""} [package.extras] -binary = ["psycopg-binary (==3.2.13) ; implementation_name != \"pypy\""] -c = ["psycopg-c (==3.2.13) ; implementation_name != \"pypy\""] -dev = ["ast-comments (>=1.1.2)", "black (>=24.1.0)", "codespell (>=2.2)", "dnspython (>=2.1)", "flake8 (>=4.0)", "isort-psycopg", "isort[colors] (>=6.0)", "mypy (>=1.14)", "pre-commit (>=4.0.1)", "types-setuptools (>=57.4)", "types-shapely (>=2.0)", "wheel (>=0.37)"] +binary = ["psycopg-binary (==3.3.0) ; implementation_name != \"pypy\""] +c = ["psycopg-c (==3.3.0) ; implementation_name != \"pypy\""] +dev = ["ast-comments (>=1.1.2)", "black (>=24.1.0)", "codespell (>=2.2)", "cython-lint (>=0.16)", "dnspython (>=2.1)", "flake8 (>=4.0)", "isort-psycopg", "isort[colors] (>=6.0)", "mypy (>=1.19.0)", "pre-commit (>=4.0.1)", "types-setuptools (>=57.4)", "types-shapely (>=2.0)", "wheel (>=0.37)"] docs = ["Sphinx (>=5.0)", "furo (==2022.6.21)", "sphinx-autobuild (>=2021.3.14)", "sphinx-autodoc-typehints (>=1.12)"] pool = ["psycopg-pool"] -test = ["anyio (>=4.0)", "mypy (>=1.14)", "pproxy (>=2.7)", "pytest (>=6.2.5)", "pytest-cov (>=3.0)", "pytest-randomly (>=3.5)"] +test = ["anyio (>=4.0)", "mypy (>=1.19.0) ; implementation_name != \"pypy\"", "pproxy (>=2.7)", "pytest (>=6.2.5)", "pytest-cov (>=3.0)", "pytest-randomly (>=3.5)"] [[package]] name = "psycopg-binary" -version = "3.2.13" +version = "3.3.0" description = "PostgreSQL database adapter for Python -- C optimisation distribution" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" groups = ["main"] markers = "implementation_name != \"pypy\"" files = [ - {file = "psycopg_binary-3.2.13-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9e25eb65494955c0dabdcd7097b004cbd70b982cf3cbc7186c2e854f788677a9"}, - {file = "psycopg_binary-3.2.13-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:732b25c2d932ca0655ea2588563eae831dc0842c93c69be4754a5b0e9760b38d"}, - {file = "psycopg_binary-3.2.13-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7350d9cc4e35529c4548ddda34a1c17f28d3f3a8f792c25cd67e8a04952ed415"}, - {file = "psycopg_binary-3.2.13-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:090c22795969ee1ace17322b1718769694607d942cef084c6fb4493adfa57da0"}, - {file = "psycopg_binary-3.2.13-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9ac329532f36342ff99fc1aefdbb531563bec03c7bc3ae934c8347a7a61339df"}, - {file = "psycopg_binary-3.2.13-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:1db11a7e618d58cfb937c409c7d279a84cbb31d32a7efc63f1e5f426f3613793"}, - {file = "psycopg_binary-3.2.13-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:5f5081b2cbb0358bb3625109d41b57411bf9d9c29762a867e38c06d974b245ee"}, - {file = "psycopg_binary-3.2.13-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5d466ac3a3738647ff2405397946870dc363e33282ced151e7ea74f622947c06"}, - {file = "psycopg_binary-3.2.13-cp310-cp310-win_amd64.whl", hash = "sha256:087acf2b24787ae206718136c1f51bc90cda68b02c3819b0556f418e3565f2c3"}, - {file = "psycopg_binary-3.2.13-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9cfe87749d010dfd34534ba8c71aa0674db9a3fce65232c98989f77c742c9ce7"}, - {file = "psycopg_binary-3.2.13-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8db77fac1dfe3f69c982db92a51fd78e1354fa8f523a6781a636123e5c7ffcde"}, - {file = "psycopg_binary-3.2.13-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cbbac4cd5b0e14b91ad8244268ca3fc2f527d1a337b489af57d7669c9d2e1a24"}, - {file = "psycopg_binary-3.2.13-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:a146f0a59a7e3ca92996f8133b1d5e5922e668f7c656b4a9201e702f4cf25896"}, - {file = "psycopg_binary-3.2.13-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:27150515de5f709e4142429db6fd36a1d01f0b8b17d915b5f7bb095364465398"}, - {file = "psycopg_binary-3.2.13-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9942255705255367d94368941e3a913b0daf74b47d191471dbe4dc0de9fbc769"}, - {file = "psycopg_binary-3.2.13-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:75ebc8335f48c339ec24f4c371595f6b7043147fe6d18e619c8564428ab8adaf"}, - {file = "psycopg_binary-3.2.13-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6fe2982a73b2ea473c9e2b91a35a21af3b03313bed188eccbcde4972483ac60a"}, - {file = "psycopg_binary-3.2.13-cp311-cp311-win_amd64.whl", hash = "sha256:6a50db4661fae78779d3cc38a0a68cabc997ca9d485ec27443b109ef8ac1672a"}, - {file = "psycopg_binary-3.2.13-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:223fc610a80bbc4355ad3c9952d468a18bb5cd7065846a8c275f100d80cd4004"}, - {file = "psycopg_binary-3.2.13-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b67f06a68d68b4621b6a411f9e583df876977afa06b1ba270b1b347d40aa93fc"}, - {file = "psycopg_binary-3.2.13-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:082579f2ae41bdabe20c82810810f3e290ac2206cccf0cb41cf36b3218f53b3c"}, - {file = "psycopg_binary-3.2.13-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:ff7df7bd8ec2c805f3a4896b8ade971139af0f9f8cf45d05014ac71fe54887be"}, - {file = "psycopg_binary-3.2.13-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8f1189dc78553ef4b2e55d9e116fc74870191bc6a9a5f4442412a703c4cc6c3b"}, - {file = "psycopg_binary-3.2.13-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0ef8ed4a4e0f7bf5e941782478a43c14b2b585b031e2266dd3afb87be2775d95"}, - {file = "psycopg_binary-3.2.13-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:de06fc9707a49f7c081b5c950974dd6de3dc33d681f7524f0b396471f5a4a480"}, - {file = "psycopg_binary-3.2.13-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:917ad1cd6e6ef8a9df2f28d7b29c7148f089be46ac56fe838f986c0227652d14"}, - {file = "psycopg_binary-3.2.13-cp312-cp312-win_amd64.whl", hash = "sha256:b53b0d9499805b307017070492189e349256e0946f62c815e442baa01f2ea6c5"}, - {file = "psycopg_binary-3.2.13-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dbae6ab1966e2b61d97e47220556c330c4608bb4cfb3a124aa0595c39995c068"}, - {file = "psycopg_binary-3.2.13-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:fae933e4564386199fc54845d85413eedb49760e0bcd2b621fde2dd1825b99b3"}, - {file = "psycopg_binary-3.2.13-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:13e2f8894d410678529ff9f1211f96c5a93ff142f992b302682b42d924428b61"}, - {file = "psycopg_binary-3.2.13-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f26f7009375cf1e92180e5c517c52da1054f7e690dde90e0ed00fa8b5736bcd4"}, - {file = "psycopg_binary-3.2.13-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ea2fdbcc9142933a47c66970e0df8b363e3bd1ea4c5ce376f2f3d94a9aeec847"}, - {file = "psycopg_binary-3.2.13-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac92d6bc1d4a41c7459953a9aa727b9966e937e94c9e072527317fd2a67d488b"}, - {file = "psycopg_binary-3.2.13-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:8b843c00478739e95c46d6d3472b13123b634685f107831a9bfc41503a06ecbd"}, - {file = "psycopg_binary-3.2.13-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:2f63868cc96bc18486cebec24445affbdd7f7debf28fac466ea935a8b5a4753b"}, - {file = "psycopg_binary-3.2.13-cp313-cp313-win_amd64.whl", hash = "sha256:594dfbca3326e997ae738d3d339004e8416b1f7390f52ce8dc2d692393e8fa96"}, - {file = "psycopg_binary-3.2.13-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:502a778c3e07c6b3aabfa56ee230e8c264d2debfab42d11535513a01bdfff0d6"}, - {file = "psycopg_binary-3.2.13-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:7561a71d764d6f74d66e8b7d844b0f27fa33de508f65c17b1d56a94c73644776"}, - {file = "psycopg_binary-3.2.13-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9caf14745a1930b4e03fe4072cd7154eaf6e1241d20c42130ed784408a26b24b"}, - {file = "psycopg_binary-3.2.13-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:4a6cafabdc0bfa37e11c6f365020fd5916b62d6296df581f4dceaa43a2ce680c"}, - {file = "psycopg_binary-3.2.13-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c96cb5a27e68acac6d74b64fca38592a692de9c4b7827339190698d58027aa45"}, - {file = "psycopg_binary-3.2.13-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:596176ae3dfbf56fc61108870bfe17c7205d33ac28d524909feb5335201daa0a"}, - {file = "psycopg_binary-3.2.13-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:cc3a0408435dfbb77eeca5e8050df4b19a6e9b7e5e5583edf524c4a83d6293b2"}, - {file = "psycopg_binary-3.2.13-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:65df0d459ffba14082d8ca4bb2f6ffbb2f8d02968f7d34a747e1031934b76b23"}, - {file = "psycopg_binary-3.2.13-cp314-cp314-win_amd64.whl", hash = "sha256:5c77f156c7316529ed371b5f95a51139e531328ee39c37493a2afcbc1f79d5de"}, - {file = "psycopg_binary-3.2.13-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:84c32892b75a3c7a1111b0ae17d567e161bec7f51b6419bfee6919973f57a811"}, - {file = "psycopg_binary-3.2.13-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1c9e7ddbb1fe0c99ebe73e4658722d6e6fb7058dacac0fbe98653cf01a7a6871"}, - {file = "psycopg_binary-3.2.13-cp38-cp38-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:ef324695327681c756e206fbd0aa9bbc50fd05f45c74bc97c640c13ba36cc108"}, - {file = "psycopg_binary-3.2.13-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:00ac1f1832c11ebf7ce3e30cd9cd9ec4d32b7d4aabe02e5cc6dca1b6ecff215d"}, - {file = "psycopg_binary-3.2.13-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:38cadba35c8e3d0a43a916457c9b91c510be7253576d052d9549fd3c49c55782"}, - {file = "psycopg_binary-3.2.13-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:5056e701ec81e792f6acd362276585ac0c24456519b5e2fe552f298a04d2cd0c"}, - {file = "psycopg_binary-3.2.13-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:fbc7c46da9b0db8126f8ebcdcc966c0a14e87c187af7978b47f6971bfbb9cc2c"}, - {file = "psycopg_binary-3.2.13-cp38-cp38-win_amd64.whl", hash = "sha256:9b98ed605a394107ea624c3792896cef29b833d2e193facfd85ba72fc4e2f85b"}, - {file = "psycopg_binary-3.2.13-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6d8d1b709509d0f8cb857acf740b5eccd5bd2fb208a5b20e895f250519a32459"}, - {file = "psycopg_binary-3.2.13-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2d45bc5f4335498d32a26c8f8c0bf9ce8c973c19e78a9ee77c031300fb361300"}, - {file = "psycopg_binary-3.2.13-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f062d725898bf6fc5cfc6349a0d08ee09f129deb14d7fcd5c30f9f1b349f39dc"}, - {file = "psycopg_binary-3.2.13-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:915647b5bbbcde2bd464dc293eec4f74710fa71edc4f85aa6f6c8494a179dc9e"}, - {file = "psycopg_binary-3.2.13-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d3aec6e2f1cf4deb1b9a3ac287c0591479f3bd851d0a911d628f8c2c71c14f4a"}, - {file = "psycopg_binary-3.2.13-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:a56a8b1794cbf27ca04012ac2890d58cfc82b3b310c1dac4fa78fbf6f57e7440"}, - {file = "psycopg_binary-3.2.13-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:4150a5e72f863be442d153829724109d83a76871d9bc801d6bb5b9c84b5b19b9"}, - {file = "psycopg_binary-3.2.13-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:028b49eb465f5d263d250cfd4f168fdabb306d0bbd97fd66a8a1fd7b696a953c"}, - {file = "psycopg_binary-3.2.13-cp39-cp39-win_amd64.whl", hash = "sha256:532ea34f673148d637be65a96251832252e278540b39fbd683ef37e58ec361c1"}, + {file = "psycopg_binary-3.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7492be4b65203b277ae618119041e6094b2ffdf5dc22fe624388cef58a75e84f"}, + {file = "psycopg_binary-3.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:aa240e0bc7b502c920efea9e8d3c8809c8542bbf514d84780491135fa37731b3"}, + {file = "psycopg_binary-3.3.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:e25922a8ecb06af71b89360ec4790730dc1783fcffd30932bf65266652bb9e8c"}, + {file = "psycopg_binary-3.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:315a250352243627e5444452b1b3623f08399cadb6cc80d9e3e314f7b11199f6"}, + {file = "psycopg_binary-3.3.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:970a89317af7dcbb06fb5b18c1f4fa780fd3be6e6a2549a280938389d1691b18"}, + {file = "psycopg_binary-3.3.0-cp310-cp310-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c398dc3a4ca4f8697efe58dbdcd423dc8287d6a56e99f48c53906d4a6c19015e"}, + {file = "psycopg_binary-3.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:df1a4a0547e232d75db22b485836a55a4e46266cde6c78713dea089758b7b3dc"}, + {file = "psycopg_binary-3.3.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:6f847b32baed6ae97cc71d0bf9e7b6c8f520b1f62bac8327eac60fa1c4aaea34"}, + {file = "psycopg_binary-3.3.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d604f98529090945865410994b7a5de2fa304efcdb4959a4a84d7bc018dea378"}, + {file = "psycopg_binary-3.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a53dfda5b5d0a9345ffa55d4fe6a63e4df517865b72395d719bc358a33f479d4"}, + {file = "psycopg_binary-3.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:2b913475b41b01ceab5c4f3705189306728893ad79ea93c39b3f54fe0e413d45"}, + {file = "psycopg_binary-3.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a995a9fa3ffc65f21d73dd4d34e51e915bfb38e721405e40d2a61d789479292d"}, + {file = "psycopg_binary-3.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1ef7e480253ef827fe30c0a73b6548dd557d1b5a92f1e9a3c8762d196dee6f51"}, + {file = "psycopg_binary-3.3.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:a8d7f56bf0ac1704e08bd496de7477af4013717890bfaf4a085c939b4d3d0577"}, + {file = "psycopg_binary-3.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bfe8bbf1b2df60974365a5abed74a06ae1152bd62b1a46336c633c53b9cb2ce8"}, + {file = "psycopg_binary-3.3.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1dc17ab5ee5a196741aab33ea44715ffe082b1801fffddbc33798afccf1660c3"}, + {file = "psycopg_binary-3.3.0-cp311-cp311-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:229bb0b528f84741d1447cbe94d8a45b0cf0ef066df8f5b7df6995fee2f05e2d"}, + {file = "psycopg_binary-3.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7b7d657d045a2a38eef948998180b1c8792160de47c7b8f6e409d655b5fd8f9d"}, + {file = "psycopg_binary-3.3.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:2be4ce54dfcade48f6bfbbd579b112657cfa0d08bcfa89e796c4cb2a15b626cf"}, + {file = "psycopg_binary-3.3.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:a31ad12f31701db0cdbb7a90f5df002a1a39f92feb87420be32079ab30031819"}, + {file = "psycopg_binary-3.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:473f4f0d6861aa0038f087112d8e7b6647615a29737a69178ffb0558675d610d"}, + {file = "psycopg_binary-3.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:77689a3493df1a8d56c4fe8cb309d315e9b0f396d48b7a2640cc6221eb6764f6"}, + {file = "psycopg_binary-3.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:0344ba871e71ba82bf6c86caa6bc8cbcf79c6d947f011a15d140243d1644a725"}, + {file = "psycopg_binary-3.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b18fff8b1f220fb63e2836da9cdebc72e2afeef34d897d2e7627f4950cfc5c4d"}, + {file = "psycopg_binary-3.3.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:87ac7796afef87042d1766cea04c18b602889e93718b11ec9beb524811256355"}, + {file = "psycopg_binary-3.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f530ce0ab2ffae9d6dde54115a3eb6da585dd4fc57da7d9620e15bbc5f0fa156"}, + {file = "psycopg_binary-3.3.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2b5ccf41cd83419465f8d7e16ae8ae6fdceed574cdbe841ad2ad2614b8c15752"}, + {file = "psycopg_binary-3.3.0-cp312-cp312-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9429504a8aea5474699062b046aeac05cbb0b55677ac8a4ce6fdda4bf21bd5b8"}, + {file = "psycopg_binary-3.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ef3c26227da32566417c27f56b4abd648b1a312db5eabf5062912e1bc6b2ffb3"}, + {file = "psycopg_binary-3.3.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:e68d133468501f918cf55d31e149b03ae76decf6a909047134f61ae854f52946"}, + {file = "psycopg_binary-3.3.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:094a217959ceee5b776b4da41c57d9ff6250d66326eb07ecb31301b79b150d91"}, + {file = "psycopg_binary-3.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7328b41c2b951ea3fc2023ff237e03bba0f64a1f9d35bd97719a815e28734078"}, + {file = "psycopg_binary-3.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:fc3509c292f54979f6a9f62ce604b75d91ea29be7a5279c647c82b25227c2b4a"}, + {file = "psycopg_binary-3.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1321c4c3e913cb34b7c47c859e04ebdda9499026f35b98923e1581f8b28280d9"}, + {file = "psycopg_binary-3.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:691b04f4339a3dcc43dde6ee70fd6de61fa56cc67eac431c701b06fab1e37b98"}, + {file = "psycopg_binary-3.3.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5e20e7459daffa2c22baef504c2e087172ccf7e945635f89cc7019e34e38b60c"}, + {file = "psycopg_binary-3.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:91d4fe6a6b0be9859970fa0dc3e340fadaa01645e15d1885d48d9d6d9f0a9570"}, + {file = "psycopg_binary-3.3.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8de4dba5c385b102365ee88d67bc0c9df0e57deb78b1d7472220aa7958b59a1d"}, + {file = "psycopg_binary-3.3.0-cp313-cp313-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:86ffcf49b62fdf8f984d3219b9970a5cf056f0a988e1d5bcfa4753d7680a394b"}, + {file = "psycopg_binary-3.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5115bcabc29096b39cfdf9bb4f4f85bd8c60ad2f900be27b3e2e56763f3566b7"}, + {file = "psycopg_binary-3.3.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:0400c7e3147d4ee0dabe6a53b871c10cd74d96e0544db316d381026540782e6f"}, + {file = "psycopg_binary-3.3.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:e1ddcdf81ff2e0f76f59dafc0bc35caef8f4bb4ee9c7d327698511dcd1ae93b5"}, + {file = "psycopg_binary-3.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:148881de848c4fa46bc2534af97f8d2c239e28f6f1fb43dbf3c60ca3e0f660b0"}, + {file = "psycopg_binary-3.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:2e9218750c8fcace04247b5bec179586ffb90e42e591402efa42ebc6b97480a2"}, + {file = "psycopg_binary-3.3.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:0f5e56aff53247f5b626796c29a596efc534332557508cddff9b41f34e4af6ae"}, + {file = "psycopg_binary-3.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:6470c034f07de3a2cfcfb4f6b95b97412be6c2ff75b92a22e2b7a5eca4b64501"}, + {file = "psycopg_binary-3.3.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:a8ef328c87608372052a8859743485dbb91ae0e38766008499f88471a9c438cc"}, + {file = "psycopg_binary-3.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c13fe4533d832c03b249b9dc45a59dcdb3918eacd41ff830c5c8ea551bc50513"}, + {file = "psycopg_binary-3.3.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dd1500110ce7e71d51ca509760c75306e72c919e63556257ac6a85bab11356ca"}, + {file = "psycopg_binary-3.3.0-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d8e90ea351b075b6cac33ebd3dc24748459a8ed24b9210e5db961e6176a1ab47"}, + {file = "psycopg_binary-3.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:da67a00d5dceaa3259f72462118a73b3b1d1b542422be767817bc784c4a0c69e"}, + {file = "psycopg_binary-3.3.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:b503c911165d4560e8d8489c46a78ec28e35321b85bf13ce58417382d75f436c"}, + {file = "psycopg_binary-3.3.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:8894829fcebd6f431d2a0e31b553feb5714e355c34af0a76df24069370a928f1"}, + {file = "psycopg_binary-3.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f3038029fff5105193ffe02352529925cb4ad5a5426b1d56d24b3654b062684e"}, + {file = "psycopg_binary-3.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:3681effab211f3e7bbde651f6eb7552b60289cd039a1a2058c674743a72d15d4"}, ] [[package]] @@ -2993,4 +2974,4 @@ dev = ["pytest", "setuptools"] [metadata] lock-version = "2.1" python-versions = ">=3.11,<3.15" -content-hash = "c7fb1d65fa98deba4de24cbb70aab19e7b734fff7cd91b02aa504062c955fb69" +content-hash = "957cdc91df816c5d0d6634b84376c07feb863f56c1fe1796c4a0025cc6590fa6" diff --git a/pyproject.toml b/pyproject.toml index 552c64cc3d..6a65c290fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ dependencies = [ "packaging >= 25.0.0, <26.0.0", "fabric >= 3.2.2, <3.3.0", "gunicorn >=23.0,<24.0", - "psycopg[binary] >= 3.1.0, <3.3.0", + "psycopg[binary] >= 3.1.0, <4.0.0", "tomli_w >=1.2.0, <1.3.0 " ] From 3b6d738937e31420b4164850938958a5d0397266 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:23:07 +0100 Subject: [PATCH 12/21] Use proper context-managed db session --- fractal_server/runner/v2/runner.py | 40 ++++++++++++++++-------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/fractal_server/runner/v2/runner.py b/fractal_server/runner/v2/runner.py index 3366736991..2c917b7d2a 100644 --- a/fractal_server/runner/v2/runner.py +++ b/fractal_server/runner/v2/runner.py @@ -213,28 +213,30 @@ def execute_tasks( f"attribute_filters={job_attribute_filters})." ) logger.info(error_msg) - update_status_of_history_run( - history_run_id=history_run_id, - status=HistoryUnitStatus.FAILED, - db_sync=db, - ) + with next(get_sync_db()) as db: + update_status_of_history_run( + history_run_id=history_run_id, + status=HistoryUnitStatus.FAILED, + db_sync=db, + ) raise JobExecutionError(error_msg) # Fail if the resource is not open for new submissions - resource = db.get(Resource, resource_id) - db.refresh(resource) - if resource.prevent_new_submissions: - error_msg = ( - f"The computational resource '{resource.name}' cannot " - "currently accept new job submissions." - ) - logger.info(error_msg) - update_status_of_history_run( - history_run_id=history_run_id, - status=HistoryUnitStatus.FAILED, - db_sync=db, - ) - raise JobExecutionError(error_msg) + with next(get_sync_db()) as db: + resource = db.get(Resource, resource_id) + db.refresh(resource) + if resource.prevent_new_submissions: + error_msg = ( + f"The computational resource '{resource.name}' cannot " + "currently accept new job submissions." + ) + logger.info(error_msg) + update_status_of_history_run( + history_run_id=history_run_id, + status=HistoryUnitStatus.FAILED, + db_sync=db, + ) + raise JobExecutionError(error_msg) # TASK EXECUTION try: From c5cae55f10df8ac425edd33999f69988bcc4cc51 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:31:19 +0100 Subject: [PATCH 13/21] Fix some more tests --- tests/v2/test_04_runner/execute_tasks.py | 3 ++ .../v2/test_04_runner/test_dummy_examples.py | 3 ++ .../test_04_runner/test_fractal_examples.py | 32 +++++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/tests/v2/test_04_runner/execute_tasks.py b/tests/v2/test_04_runner/execute_tasks.py index d9b746db2b..6620592d3e 100644 --- a/tests/v2/test_04_runner/execute_tasks.py +++ b/tests/v2/test_04_runner/execute_tasks.py @@ -8,12 +8,14 @@ def execute_tasks_mod( + *, wf_task_list: list[WorkflowTaskV2], workflow_dir_local: Path, user_id: int, job_id: int, job_attribute_filters: dict[str, bool] | None = None, job_type_filters: dict[str, bool] | None = None, + resource_id: int, **kwargs, ) -> None: """ @@ -27,5 +29,6 @@ def execute_tasks_mod( job_id=job_id, user_id=user_id, get_runner_config=get_local_backend_config, + resource_id=resource_id, **kwargs, ) diff --git a/tests/v2/test_04_runner/test_dummy_examples.py b/tests/v2/test_04_runner/test_dummy_examples.py index 5d55c03c3d..45a3265f61 100644 --- a/tests/v2/test_04_runner/test_dummy_examples.py +++ b/tests/v2/test_04_runner/test_dummy_examples.py @@ -729,7 +729,9 @@ async def test_dummy_invalid_output_non_parallel( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): + resource, _ = local_resource_profile_db zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") # case non-parallel @@ -782,6 +784,7 @@ def patched_cast(*args, **kwargs): dataset=dataset, workflow_dir_local=tmp_path / "job0", job_id=job.id, + resource_id=resource.id, **execute_tasks_args, ) res = await db.execute( diff --git a/tests/v2/test_04_runner/test_fractal_examples.py b/tests/v2/test_04_runner/test_fractal_examples.py index 154ececf7a..9231ef24a1 100644 --- a/tests/v2/test_04_runner/test_fractal_examples.py +++ b/tests/v2/test_04_runner/test_fractal_examples.py @@ -59,10 +59,12 @@ async def test_fractal_demos_01( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): """ Mock of fractal-demos/examples/01. """ + resource, _ = local_resource_profile_db zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") async with MockCurrentUser() as user: @@ -112,6 +114,7 @@ async def test_fractal_demos_01( runner=local_runner, user_id=user_id, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset.id) _assert_image_data_exist(dataset_attrs["images"]) @@ -127,6 +130,7 @@ async def test_fractal_demos_01( runner=local_runner, user_id=user_id, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) assert {img["zarr_url"] for img in dataset_attrs["images"]} == { @@ -165,6 +169,7 @@ async def test_fractal_demos_01( "illumination_correction": True, }, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) debug(dataset_attrs) @@ -200,6 +205,7 @@ async def test_fractal_demos_01( "3D": False, }, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) debug(dataset_attrs) @@ -216,11 +222,13 @@ async def test_fractal_demos_01_no_overwrite( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): """ Similar to fractal-demos/examples/01, but illumination correction task does not override its input images. """ + resource, _ = local_resource_profile_db zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") async with MockCurrentUser() as user: @@ -271,6 +279,7 @@ async def test_fractal_demos_01_no_overwrite( runner=local_runner, user_id=user_id, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset.id) assert [img["zarr_url"] for img in dataset_attrs["images"]] == [ @@ -291,6 +300,7 @@ async def test_fractal_demos_01_no_overwrite( runner=local_runner, user_id=user_id, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) @@ -360,6 +370,7 @@ async def test_fractal_demos_01_no_overwrite( "illumination_correction": True, }, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) @@ -411,6 +422,7 @@ async def test_fractal_demos_01_no_overwrite( "illumination_correction": True, }, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) @@ -426,7 +438,9 @@ async def test_registration_no_overwrite( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): + resource, _ = local_resource_profile_db zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") async with MockCurrentUser() as user: user_id = user.id @@ -474,6 +488,7 @@ async def test_registration_no_overwrite( user_id=user_id, runner=local_runner, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset.id) @@ -488,6 +503,7 @@ async def test_registration_no_overwrite( user_id=user_id, runner=local_runner, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) @@ -509,6 +525,7 @@ async def test_registration_no_overwrite( user_id=user_id, runner=local_runner, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) @@ -530,6 +547,7 @@ async def test_registration_no_overwrite( user_id=user_id, runner=local_runner, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) @@ -548,7 +566,9 @@ async def test_registration_overwrite( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): + resource, _ = local_resource_profile_db zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") async with MockCurrentUser() as user: user_id = user.id @@ -596,6 +616,7 @@ async def test_registration_overwrite( user_id=user_id, runner=local_runner, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset.id) @@ -610,6 +631,7 @@ async def test_registration_overwrite( user_id=user_id, runner=local_runner, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) @@ -631,6 +653,7 @@ async def test_registration_overwrite( user_id=user_id, runner=local_runner, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) @@ -652,6 +675,7 @@ async def test_registration_overwrite( user_id=user_id, runner=local_runner, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) @@ -672,7 +696,9 @@ async def test_channel_parallelization_with_overwrite( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): + resource, _ = local_resource_profile_db zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") async with MockCurrentUser() as user: user_id = user.id @@ -710,6 +736,7 @@ async def test_channel_parallelization_with_overwrite( user_id=user_id, runner=local_runner, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset.id) @@ -723,6 +750,7 @@ async def test_channel_parallelization_with_overwrite( user_id=user_id, runner=local_runner, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset.id) @@ -741,7 +769,9 @@ async def test_channel_parallelization_no_overwrite( tmp_path: Path, local_runner: LocalRunner, fractal_tasks_mock_db, + local_resource_profile_db, ): + resource, _ = local_resource_profile_db zarr_dir = (tmp_path / "zarr_dir").as_posix().rstrip("/") async with MockCurrentUser() as user: user_id = user.id @@ -779,6 +809,7 @@ async def test_channel_parallelization_no_overwrite( user_id=user_id, runner=local_runner, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset.id) @@ -793,6 +824,7 @@ async def test_channel_parallelization_no_overwrite( user_id=user_id, runner=local_runner, job_id=job.id, + resource_id=resource.id, ) dataset_attrs = await _get_dataset_attrs(db, dataset_with_attrs.id) From 90e2c39c5608f4fee0e5137e352dbf065dad0ce9 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:32:02 +0100 Subject: [PATCH 14/21] Fix some more tests --- tests/v2/test_04_runner/test_no_images_parallelization.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/v2/test_04_runner/test_no_images_parallelization.py b/tests/v2/test_04_runner/test_no_images_parallelization.py index 9f95405d04..ce558ce429 100644 --- a/tests/v2/test_04_runner/test_no_images_parallelization.py +++ b/tests/v2/test_04_runner/test_no_images_parallelization.py @@ -35,11 +35,13 @@ async def test_parallelize_on_no_images( job_factory, tmp_path: Path, local_runner: Executor, + local_resource_profile_db, ): """ Run parallel&compound tasks on a dataset with no images. """ # Preliminary setup + resource, _ = local_resource_profile_db async with MockCurrentUser() as user: project = await project_factory(user) dataset = await dataset_factory(project_id=project.id) @@ -71,6 +73,7 @@ async def test_parallelize_on_no_images( runner=local_runner, user_id=user.id, job_id=job.id, + resource_id=resource.id, ) task = await task_factory( @@ -93,4 +96,5 @@ async def test_parallelize_on_no_images( runner=local_runner, user_id=user.id, job_id=job.id, + resource_id=resource.id, ) From 9490f01c592c5b11667eba3bee5b75b62d7ddce3 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:37:56 +0100 Subject: [PATCH 15/21] expand test --- tests/v2/test_03_api/test_api_job.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/tests/v2/test_03_api/test_api_job.py b/tests/v2/test_03_api/test_api_job.py index 037db3bd27..55e0544b75 100644 --- a/tests/v2/test_03_api/test_api_job.py +++ b/tests/v2/test_03_api/test_api_job.py @@ -49,12 +49,12 @@ async def test_submit_job_failures( local_resource_profile_db, slurm_sudo_resource_profile_db, ): - res, prof = local_resource_profile_db - res2, _ = slurm_sudo_resource_profile_db + resource1, profile1 = local_resource_profile_db + resource2, _ = slurm_sudo_resource_profile_db async with MockCurrentUser( user_kwargs=dict( is_verified=True, - profile_id=prof.id, + profile_id=profile1.id, ) ) as user: task = await task_factory(user_id=user.id) @@ -72,7 +72,7 @@ async def test_submit_job_failures( project2 = await project_factory(user) workflow2 = await workflow_factory(project_id=project2.id) # 3 - project3 = await project_factory(user, resource_id=res2.id) + project3 = await project_factory(user, resource_id=resource2.id) dataset3 = await dataset_factory( project_id=project3.id, name="dataset3" ) @@ -130,6 +130,23 @@ async def test_submit_job_failures( "Project resource does not match with user's resource" ) + # (F) Resource cannot accept new submissions + resource1.prevent_new_submissions = True + db.add(resource1) + await db.commit() + await _workflow_insert_task( + workflow_id=workflow1b.id, task_id=task.id, db=db + ) + res = await client.post( + f"{PREFIX}/project/{project1.id}/job/submit/" + f"?workflow_id={workflow1b.id}&dataset_id={dataset1.id}", + json={}, + ) + debug(res.json()) + assert res.status_code == 422 + assert resource1.name in res.json()["detail"] + assert "new job submissions" in res.json()["detail"] + async def test_submit_job_ssh_connection_failure( db, From 433f9c4a53af39e0a8afae211142d5cd86f44a68 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:40:28 +0100 Subject: [PATCH 16/21] Test PUT-resource --- tests/v2/test_03_api/admin/test_admin_resource.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/v2/test_03_api/admin/test_admin_resource.py b/tests/v2/test_03_api/admin/test_admin_resource.py index 43807d05b6..d4876622c0 100644 --- a/tests/v2/test_03_api/admin/test_admin_resource.py +++ b/tests/v2/test_03_api/admin/test_admin_resource.py @@ -151,11 +151,13 @@ async def test_resource_api( # PUT one resource / success NEW_NAME = "A new name" valid_new_resource["name"] = NEW_NAME + valid_new_resource["prevent_new_submissions"] = True res = await client.put( f"/admin/v2/resource/{resource_id}/", json=valid_new_resource ) assert res.status_code == 200 assert res.json()["name"] == NEW_NAME + assert res.json()["prevent_new_submissions"] is True # DELETE one resource / failure res = await client.post( From 8996ffc9c796d17b623f168c6d18ad47c226f5a5 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:43:42 +0100 Subject: [PATCH 17/21] remove spurious tuple --- fractal_server/app/routes/api/v2/submit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fractal_server/app/routes/api/v2/submit.py b/fractal_server/app/routes/api/v2/submit.py index 89cf48312e..d1b21e9a54 100644 --- a/fractal_server/app/routes/api/v2/submit.py +++ b/fractal_server/app/routes/api/v2/submit.py @@ -151,7 +151,7 @@ async def submit_job( status_code=status.HTTP_422_UNPROCESSABLE_CONTENT, detail=( f"The computational resource '{resource.name}' cannot " - "currently accept new job submissions.", + "currently accept new job submissions." ), ) From 9e0e2ead20b724192e2fd89c386f972df32c72f6 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:24:51 +0100 Subject: [PATCH 18/21] Add test, rephrase error messages --- fractal_server/app/routes/api/v2/submit.py | 4 +- fractal_server/runner/v2/runner.py | 3 +- ...llelization.py => test_runner_failures.py} | 54 +++++++++++++++++++ 3 files changed, 57 insertions(+), 4 deletions(-) rename tests/v2/test_04_runner/{test_no_images_parallelization.py => test_runner_failures.py} (64%) diff --git a/fractal_server/app/routes/api/v2/submit.py b/fractal_server/app/routes/api/v2/submit.py index d1b21e9a54..85d4ac1d94 100644 --- a/fractal_server/app/routes/api/v2/submit.py +++ b/fractal_server/app/routes/api/v2/submit.py @@ -150,8 +150,8 @@ async def submit_job( raise HTTPException( status_code=status.HTTP_422_UNPROCESSABLE_CONTENT, detail=( - f"The computational resource '{resource.name}' cannot " - "currently accept new job submissions." + f"The '{resource.name}' resource does not currently accept " + "new job submissions." ), ) diff --git a/fractal_server/runner/v2/runner.py b/fractal_server/runner/v2/runner.py index 2c917b7d2a..aae004f05d 100644 --- a/fractal_server/runner/v2/runner.py +++ b/fractal_server/runner/v2/runner.py @@ -227,8 +227,7 @@ def execute_tasks( db.refresh(resource) if resource.prevent_new_submissions: error_msg = ( - f"The computational resource '{resource.name}' cannot " - "currently accept new job submissions." + f"The '{resource.name}' resource is not currently active." ) logger.info(error_msg) update_status_of_history_run( diff --git a/tests/v2/test_04_runner/test_no_images_parallelization.py b/tests/v2/test_04_runner/test_runner_failures.py similarity index 64% rename from tests/v2/test_04_runner/test_no_images_parallelization.py rename to tests/v2/test_04_runner/test_runner_failures.py index ce558ce429..9d588c3260 100644 --- a/tests/v2/test_04_runner/test_no_images_parallelization.py +++ b/tests/v2/test_04_runner/test_runner_failures.py @@ -98,3 +98,57 @@ async def test_parallelize_on_no_images( job_id=job.id, resource_id=resource.id, ) + + +async def test_resource_does_not_accept_submissions( + db, + MockCurrentUser, + project_factory, + dataset_factory, + workflow_factory, + task_factory, + workflowtask_factory, + job_factory, + tmp_path: Path, + local_runner: Executor, + local_resource_profile_db, +): + """ + Run parallel&compound tasks on a dataset with no images. + """ + # Preliminary setup + resource, _ = local_resource_profile_db + resource.prevent_new_submissions = True + db.add(resource) + await db.commit() + + async with MockCurrentUser() as user: + project = await project_factory(user) + dataset = await dataset_factory( + project_id=project.id, images=[dict(zarr_url="/fake")] + ) + workflow = await workflow_factory(project_id=project.id) + task = await task_factory(user_id=user.id) + wftask = await workflowtask_factory( + workflow_id=workflow.id, task_id=task.id + ) + job = await job_factory( + project_id=project.id, + dataset_id=dataset.id, + workflow_id=workflow.id, + working_dir="/foo", + status="done", + ) + with pytest.raises( + JobExecutionError, + match="resource is not currently active", + ): + execute_tasks_mod( + wf_task_list=[wftask], + dataset=dataset, + workflow_dir_local=tmp_path / "job0", + runner=local_runner, + user_id=user.id, + job_id=job.id, + resource_id=resource.id, + ) From ed966b462a801c2da3a6c80a7000272c7e5f43bd Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:26:08 +0100 Subject: [PATCH 19/21] CHANGELOG [skip ci] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a116cae0bd..11ff565011 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,11 +19,15 @@ The main contents of this release are the introduction of the project sharing an * Modify `GET /auth/current-user/allowed-viewer-paths/` logic, with `include_shared_projects` query parameter (\#3031). * Add validator for paths to forbid parent-directory references (\#3031). * Review job-submission endpoint (\#3041). + * Prevent submissions if `Resource.prevent_new_submissions` is set (\#3042). * App: * Add `SlowResponseMiddleware` middleware (\#3035, \#3038). * Settings: * Add `Settings.FRACTAL_LONG_REQUEST_TIME` configuration variable (\#3035). +* Runner: + * Prevent job-execution from continuing if `Resource.prevent_new_submissions` is set (\#3042). * Database: + * Add `Resource.prevent_new_submissions` boolean flag (\#3042). * Add project-sharing-related `LinkUserProjectV2` columns (\#2999). * Move `UserOAuth.project_dir` to `.project_dirs` and drop `UserGrop.viewer_paths` (\#3031). * Enforce max one submitted `JobV2` per `DatasetV2` (\#3044). From c801ed57ba553ed2df0f7325300d653ed27ae32d Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:27:23 +0100 Subject: [PATCH 20/21] Drop `db.refresh` --- fractal_server/runner/v2/runner.py | 1 - 1 file changed, 1 deletion(-) diff --git a/fractal_server/runner/v2/runner.py b/fractal_server/runner/v2/runner.py index aae004f05d..9adaccd8a8 100644 --- a/fractal_server/runner/v2/runner.py +++ b/fractal_server/runner/v2/runner.py @@ -224,7 +224,6 @@ def execute_tasks( # Fail if the resource is not open for new submissions with next(get_sync_db()) as db: resource = db.get(Resource, resource_id) - db.refresh(resource) if resource.prevent_new_submissions: error_msg = ( f"The '{resource.name}' resource is not currently active." From c18cf72ee3513989e28022ca3c2088fc6f6b4634 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:28:54 +0100 Subject: [PATCH 21/21] error message --- fractal_server/runner/v2/runner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fractal_server/runner/v2/runner.py b/fractal_server/runner/v2/runner.py index 9adaccd8a8..6bf2b13737 100644 --- a/fractal_server/runner/v2/runner.py +++ b/fractal_server/runner/v2/runner.py @@ -226,7 +226,8 @@ def execute_tasks( resource = db.get(Resource, resource_id) if resource.prevent_new_submissions: error_msg = ( - f"The '{resource.name}' resource is not currently active." + f"Cannot run '{task.name}', since the '{resource.name}' " + "resource is not currently active." ) logger.info(error_msg) update_status_of_history_run(