diff --git a/src/prefect/server/schemas/actions.py b/src/prefect/server/schemas/actions.py index e6673797de00..8cfce54611ba 100644 --- a/src/prefect/server/schemas/actions.py +++ b/src/prefect/server/schemas/actions.py @@ -434,7 +434,6 @@ class FlowRunCreate(ActionBaseModel): ), deprecated=True, ) - job_variables: Optional[Dict[str, Any]] = FieldFrom(schemas.core.FlowRun) class Config(ActionBaseModel.Config): json_dumps = orjson_dumps_extra_compatible diff --git a/tests/server/api/test_flow_runs.py b/tests/server/api/test_flow_runs.py index 198bb2288e0c..c7148ff73819 100644 --- a/tests/server/api/test_flow_runs.py +++ b/tests/server/api/test_flow_runs.py @@ -49,24 +49,6 @@ async def test_create_flow_run(self, flow, client, session): ) assert flow_run.flow_id == flow.id - async def test_create_flow_run_with_job_variables(self, flow, client, session): - job_vars = {"key": "value"} - response = await client.post( - "/flow_runs/", - json=actions.FlowRunCreate( - flow_id=flow.id, - name="", - job_variables=job_vars, - ).dict(json_compatible=True), - ) - assert response.status_code == status.HTTP_201_CREATED - assert response.json()["job_variables"] == job_vars - - flow_run = await models.flow_runs.read_flow_run( - session=session, flow_run_id=response.json()["id"] - ) - assert flow_run.job_variables == job_vars - async def test_create_flow_run_with_infrastructure_document_id( self, flow, client, infrastructure_document_id ): diff --git a/tests/server/models/test_flow_runs.py b/tests/server/models/test_flow_runs.py index 503460a34e61..50b3048bf454 100644 --- a/tests/server/models/test_flow_runs.py +++ b/tests/server/models/test_flow_runs.py @@ -17,18 +17,6 @@ async def test_create_flow_run(self, flow, session): ) assert flow_run.flow_id == flow.id - @pytest.mark.parametrize("job_vars", [{}, None, {"foo": "bar"}]) - async def test_create_flow_run_with_job_variables( - self, flow, session, job_vars: dict - ): - flow_run = await models.flow_runs.create_flow_run( - session=session, - flow_run=schemas.core.FlowRun(flow_id=flow.id, job_variables=job_vars), - ) - - expected = {} if job_vars is None else job_vars - assert flow_run.job_variables == expected - async def test_create_flow_run_with_infrastructure( self, flow, session, infrastructure_document_id ):