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

Issue:
Include `timestamp_created` in job's `project_dump`



Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d7953cb0d..1874b7557 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
 * Expose verification-related features in `user edit` command (\#580).
 * Testing:
     * Adapt `job_factory` to new strict response-validation models in `fractal-server` (\#580).
+    * Adapt `job_factory` by including the `timestamp_created` attribute (\#582).
 
 # 1.4.0
 
diff --git a/poetry.lock b/poetry.lock
index 62e84f63d..b0f9b6178 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -610,7 +610,7 @@ typing = ["typing-extensions (>=4.8)"]
 
 [[package]]
 name = "fractal-server"
-version = "1.4.1"
+version = "1.4.2a0"
 description = "Server component of the Fractal analytics platform"
 optional = false
 python-versions = "^3.9"
@@ -626,7 +626,7 @@ fastapi-users = {version = "^12.1.0", extras = ["oauth"]}
 pydantic = ">=1.10.8,<2"
 python-dotenv = "^0.20.0"
 sqlalchemy = {version = ">=2.0.23,<2.1", extras = ["asyncio"]}
-sqlmodel = "^0.0.12"
+sqlmodel = "^0.0.14"
 uvicorn = "^0.20.0"
 
 [package.extras]
@@ -638,7 +638,7 @@ slurm = ["cloudpickle (>=2.2.1,<2.3.0)", "clusterfutures (>=0.5,<0.6)"]
 type = "git"
 url = "https://github.com/fractal-analytics-platform/fractal-server.git"
 reference = "main"
-resolved_reference = "2deb2e091fae45f6c3ef25227193fcd4d7a6fa2a"
+resolved_reference = "965b8af990c3997917bc8136f893506d697b8490"
 
 [[package]]
 name = "ghp-import"
@@ -1878,17 +1878,17 @@ sqlcipher = ["sqlcipher3-binary"]
 
 [[package]]
 name = "sqlmodel"
-version = "0.0.12"
+version = "0.0.14"
 description = "SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness."
 optional = false
 python-versions = ">=3.7,<4.0"
 files = [
-    {file = "sqlmodel-0.0.12-py3-none-any.whl", hash = "sha256:5a246e184c3b41126e3f862912be732261da5dc2a1f135eb98d6dca9977345f5"},
-    {file = "sqlmodel-0.0.12.tar.gz", hash = "sha256:562306bdabc5231d024bf59784ba740659cbde1c6aa6497c8381256e5c64c36e"},
+    {file = "sqlmodel-0.0.14-py3-none-any.whl", hash = "sha256:accea3ff5d878e41ac439b11e78613ed61ce300cfcb860e87a2d73d4884cbee4"},
+    {file = "sqlmodel-0.0.14.tar.gz", hash = "sha256:0bff8fc94af86b44925aa813f56cf6aabdd7f156b73259f2f60692c6a64ac90e"},
 ]
 
 [package.dependencies]
-pydantic = ">=1.9.0,<2.0.0"
+pydantic = ">=1.10.13,<3.0.0"
 SQLAlchemy = ">=2.0.0,<2.1.0"
 
 [[package]]


Test patch:
diff --git a/tests/fixtures_testserver.py b/tests/fixtures_testserver.py
index 844f4aab2..46124e888 100644
--- a/tests/fixtures_testserver.py
+++ b/tests/fixtures_testserver.py
@@ -169,8 +169,7 @@ async def _workflow_factory(**wf_args_override):
 @pytest.fixture
 async def job_factory(db):
     from fractal_server.app.models.job import ApplyWorkflow
-    from datetime import datetime
-    from datetime import timezone
+    from fractal_server.utils import get_timestamp
 
     async def _job_factory(**job_args_override):
         job_args = dict(
@@ -196,8 +195,13 @@ async def _job_factory(**job_args_override):
                 project_id=1,
                 resource_list=[dict(path="/tmp", id=1, dataset_id=2)],
             ),
-            project_dump=dict(id=1, name="proj", read_only=True),
-            start_timestamp=datetime.now(tz=timezone.utc),
+            project_dump=dict(
+                id=1,
+                name="proj",
+                read_only=True,
+                timestamp_created=str(get_timestamp()),
+            ),
+            start_timestamp=get_timestamp(),
             user_email="test@test.test",
         )
         job_args.update(job_args_override)