Repository: fractal-analytics-platform/fractal-client (language: python)

Issue:
Align with fractal-server=1.2.5



Discussion / hints:

Fix patch:
diff --git a/fractal/common b/fractal/common
index 6b78f3d71..bbe6a6251 160000
--- a/fractal/common
+++ b/fractal/common
@@ -1,1 +1,1 @@
-Subproject commit 6b78f3d71c55deacba2be0c0b9fc6a7ab9feaccb
+Subproject commit bbe6a625177f222c726453ae04c5ec2dae39ac9e
diff --git a/poetry.lock b/poetry.lock
index 51ddf58f3..b8a70a32e 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -29,14 +29,14 @@ files = [
 
 [[package]]
 name = "alembic"
-version = "1.10.3"
+version = "1.10.4"
 description = "A database migration tool for SQLAlchemy."
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "alembic-1.10.3-py3-none-any.whl", hash = "sha256:b2e0a6cfd3a8ce936a1168320bcbe94aefa3f4463cd773a968a55071beb3cd37"},
-    {file = "alembic-1.10.3.tar.gz", hash = "sha256:32a69b13a613aeb7e8093f242da60eff9daed13c0df02fff279c1b06c32965d2"},
+    {file = "alembic-1.10.4-py3-none-any.whl", hash = "sha256:43942c3d4bf2620c466b91c0f4fca136fe51ae972394a0cc8b90810d664e4f5c"},
+    {file = "alembic-1.10.4.tar.gz", hash = "sha256:295b54bbb92c4008ab6a7dcd1e227e668416d6f84b98b3c4446a2bc6214a556b"},
 ]
 
 [package.dependencies]
@@ -155,14 +155,14 @@ toml = "*"
 
 [[package]]
 name = "certifi"
-version = "2022.12.7"
+version = "2023.5.7"
 description = "Python package for providing Mozilla's CA Bundle."
 category = "main"
 optional = false
 python-versions = ">=3.6"
 files = [
-    {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"},
-    {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"},
+    {file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"},
+    {file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"},
 ]
 
 [[package]]
@@ -640,7 +640,7 @@ sqlmodel = "*"
 
 [[package]]
 name = "fractal-server"
-version = "1.2.0"
+version = "1.2.5"
 description = "Server component of the Fractal analytics platform"
 category = "dev"
 optional = false
@@ -668,8 +668,8 @@ slurm = ["clusterfutures (>=0.5,<0.6)"]
 [package.source]
 type = "git"
 url = "https://github.com/fractal-analytics-platform/fractal-server.git"
-reference = "main"
-resolved_reference = "6f8ad3727365ba899ae58e5f2ff5a1afe7f6dc30"
+reference = "1.2.5"
+resolved_reference = "0579f8eaebe055edd0d44fc7941a9f9d3b728773"
 
 [[package]]
 name = "greenlet"
@@ -844,14 +844,14 @@ files = [
 
 [[package]]
 name = "importlib-metadata"
-version = "6.5.0"
+version = "6.6.0"
 description = "Read metadata from Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "importlib_metadata-6.5.0-py3-none-any.whl", hash = "sha256:03ba783c3a2c69d751b109fc0c94a62c51f581b3d6acf8ed1331b6d5729321ff"},
-    {file = "importlib_metadata-6.5.0.tar.gz", hash = "sha256:7a8bdf1bc3a726297f5cfbc999e6e7ff6b4fa41b26bba4afc580448624460045"},
+    {file = "importlib_metadata-6.6.0-py3-none-any.whl", hash = "sha256:43dd286a2cd8995d5eaef7fee2066340423b818ed3fd70adf0bad5f1fac53fed"},
+    {file = "importlib_metadata-6.6.0.tar.gz", hash = "sha256:92501cdf9cc66ebd3e612f1b4f0c0765dfa42f0fa38ffb319b6bd84dd675d705"},
 ]
 
 [package.dependencies]
@@ -1384,21 +1384,21 @@ files = [
 
 [[package]]
 name = "requests"
-version = "2.28.2"
+version = "2.30.0"
 description = "Python HTTP for Humans."
 category = "dev"
 optional = false
-python-versions = ">=3.7, <4"
+python-versions = ">=3.7"
 files = [
-    {file = "requests-2.28.2-py3-none-any.whl", hash = "sha256:64299f4909223da747622c030b781c0d7811e359c37124b4bd368fb8c6518baa"},
-    {file = "requests-2.28.2.tar.gz", hash = "sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf"},
+    {file = "requests-2.30.0-py3-none-any.whl", hash = "sha256:10e94cc4f3121ee6da529d358cdaeaff2f1c409cd377dbc72b825852f2f7e294"},
+    {file = "requests-2.30.0.tar.gz", hash = "sha256:239d7d4458afcb28a692cdd298d87542235f4ca8d36d03a15bfc128a6559a2f4"},
 ]
 
 [package.dependencies]
 certifi = ">=2017.4.17"
 charset-normalizer = ">=2,<4"
 idna = ">=2.5,<4"
-urllib3 = ">=1.21.1,<1.27"
+urllib3 = ">=1.21.1,<3"
 
 [package.extras]
 socks = ["PySocks (>=1.5.6,!=1.5.7)"]
@@ -1443,14 +1443,14 @@ jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"]
 
 [[package]]
 name = "setuptools"
-version = "67.6.1"
+version = "67.7.2"
 description = "Easily download, build, install, upgrade, and uninstall Python packages"
 category = "dev"
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "setuptools-67.6.1-py3-none-any.whl", hash = "sha256:e728ca814a823bf7bf60162daf9db95b93d532948c4c0bea762ce62f60189078"},
-    {file = "setuptools-67.6.1.tar.gz", hash = "sha256:257de92a9d50a60b8e22abfcbb771571fde0dbf3ec234463212027a4eeecbe9a"},
+    {file = "setuptools-67.7.2-py3-none-any.whl", hash = "sha256:23aaf86b85ca52ceb801d32703f12d77517b2556af839621c641fca11287952b"},
+    {file = "setuptools-67.7.2.tar.gz", hash = "sha256:f104fa03692a2602fa0fec6c6a9e63b6c8a968de13e17c026957dd1f53d80990"},
 ]
 
 [package.extras]
@@ -1866,20 +1866,21 @@ files = [
 
 [[package]]
 name = "urllib3"
-version = "1.26.15"
+version = "2.0.2"
 description = "HTTP library with thread-safe connection pooling, file post, and more."
 category = "dev"
 optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
+python-versions = ">=3.7"
 files = [
-    {file = "urllib3-1.26.15-py2.py3-none-any.whl", hash = "sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42"},
-    {file = "urllib3-1.26.15.tar.gz", hash = "sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305"},
+    {file = "urllib3-2.0.2-py3-none-any.whl", hash = "sha256:d055c2f9d38dc53c808f6fdc8eab7360b6fdbbde02340ed25cfbcd817c62469e"},
+    {file = "urllib3-2.0.2.tar.gz", hash = "sha256:61717a1095d7e155cdb737ac7bb2f4324a858a1e2e6466f6d03ff630ca68d3cc"},
 ]
 
 [package.extras]
-brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"]
-secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"]
-socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
+brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"]
+secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"]
+socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"]
+zstd = ["zstandard (>=0.18.0)"]
 
 [[package]]
 name = "uvicorn"
@@ -1919,4 +1920,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
 [metadata]
 lock-version = "2.0"
 python-versions = "^3.9"
-content-hash = "48ee9ddcbd049212554034c7d045621078316f020017c81f2a9a67467cb54a98"
+content-hash = "08aec035d022064d32ab6be0dacab985dc2aa48911650b1f762f062525b2b434"
diff --git a/pyproject.toml b/pyproject.toml
index b8ce6e762..a97e03669 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -29,7 +29,7 @@ devtools = "^0.9.0"
 pytest = "^7.1.2"
 bumpver = "^2022.1118"
 pytest-asyncio = "^0.19.0"
-fractal-server = { git = "https://github.com/fractal-analytics-platform/fractal-server.git", branch = "main" }
+fractal-server = { git = "https://github.com/fractal-analytics-platform/fractal-server.git", tag = "1.2.5" }
 coverage = {extras = ["toml"], version = "^6.5.0"}
 pytest-pretty = "^1.0.1"
 


Test patch:
diff --git a/tests/fixtures_testserver.py b/tests/fixtures_testserver.py
index 8af82a4a5..57376298e 100644
--- a/tests/fixtures_testserver.py
+++ b/tests/fixtures_testserver.py
@@ -44,10 +44,9 @@ def _get_settings():
 @pytest.fixture(scope="function", autouse=True)
 async def testserver(override_server_settings):
     import uvicorn
-    from fractal_server.main import start_application
-    from fractal_server.main import _create_first_user
     from multiprocessing import Process
     from fractal_server.app.db import DB
+    import time
     from fractal_server.app.models import SQLModel
 
     # INIT DB
@@ -55,24 +54,22 @@ async def testserver(override_server_settings):
     logger.debug(DB.engine_sync().url)
     SQLModel.metadata.create_all(DB.engine_sync())
 
-    # We are explicitly calling start_application() to bypass the task
-    # collection routine
-    app = start_application()
-    await _create_first_user("admin@fractal.xy", "1234", is_superuser=True)
-
-    config = uvicorn.Config(app, port=10080, log_level="debug")
-    server = uvicorn.Server(config)
+    # Running testserver in a separate process
+    # cf. https://stackoverflow.com/a/57816608/283972
 
     def run_server():
-        asyncio.run(server.serve())
+        asyncio.run(
+            uvicorn.run(
+                "fractal_server.main:app",
+                port=10080,
+                log_level="debug",
+            )
+        )
 
-    # Running testserver in a separate process
-    # cf. https://stackoverflow.com/a/57816608/283972
     proc = Process(target=run_server, args=(), daemon=True)
     proc.start()
-    import time
 
-    time.sleep(0.2)  # NOTE required to let the server comes up
+    time.sleep(2)  # NOTE required to let the server comes up
     logger.debug(environ["FRACTAL_SERVER"])
     yield environ["FRACTAL_SERVER"]
     proc.kill()
diff --git a/tests/test_workflow.py b/tests/test_workflow.py
index 91c51d3ec..0958a2950 100644
--- a/tests/test_workflow.py
+++ b/tests/test_workflow.py
@@ -386,7 +386,14 @@ async def test_workflow_apply(
     output_dataset_id = dataset["id"]
 
     res = await invoke(
-        f"dataset add-resource {prj_id} {output_dataset_id} " f"{(tmp_path)}"
+        f"dataset add-resource {prj_id} {input_dataset_id} {str(tmp_path)}"
+    )
+    resource = res.data
+    debug(resource)
+    assert res.retcode == 0
+
+    res = await invoke(
+        f"dataset add-resource {prj_id} {output_dataset_id} {str(tmp_path)}"
     )
     resource = res.data
     debug(resource)