From 4f8d5d638d293fb58adcb1da640d1fb0abb5fa57 Mon Sep 17 00:00:00 2001 From: PascalEgn Date: Thu, 17 Oct 2024 12:54:37 +0200 Subject: [PATCH] record-editor: inject validation errors --- ...AirflowUtils.test_delete_workflow_dag.yaml | 14 +-- ...owUtils.test_delete_workflow_dag_runs.yaml | 40 ++++---- ...lowUtils.test_fetch_data_workflow_dag.yaml | 26 +++--- ...tAirflowUtils.test_find_executed_dags.yaml | 26 +++--- ...TestAirflowUtils.test_find_failed_dag.yaml | 33 +++---- ...irflowUtils.test_restart_failed_tasks.yaml | 44 +++++---- ...ls.test_restart_failed_tasks_no_tasks.yaml | 26 +++--- ...rflowUtils.test_restart_workflow_dags.yaml | 52 +++++------ ...AirflowUtils.test_trigger_airflow_dag.yaml | 12 +-- ...horWorkflowViewSet.test_accept_author.yaml | 48 +++------- ...horWorkflowViewSet.test_create_author.yaml | 85 +++++------------ ...horWorkflowViewSet.test_reject_author.yaml | 48 +++------- ...orWorkflowViewSet.test_restart_a_task.yaml | 56 ++++------- ...kflowViewSet.test_restart_full_dagrun.yaml | 88 +++++++----------- ...kflowViewSet.test_restart_with_params.yaml | 76 ++++++--------- ...t.test_validate_invalid_schema_record.yaml | 36 ++------ ...iewSet.test_validate_no_schema_record.yaml | 36 ++------ ...iewSet.test_validate_not_valid_record.yaml | 36 ++------ ...lowViewSet.test_validate_valid_record.yaml | 36 ++------ .../TestWorkflowViewSet.test_delete.yaml | 92 +++++-------------- .../backoffice/workflows/tests/conftest.py | 2 +- .../backoffice-editor.component.ts | 10 +- .../app/shared/interfaces/workflow-object.ts | 1 + 23 files changed, 319 insertions(+), 604 deletions(-) diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_delete_workflow_dag.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_delete_workflow_dag.yaml index 782b76c9b7..945c523de6 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_delete_workflow_dag.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_delete_workflow_dag.yaml @@ -20,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:25.153225+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:25.153225+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:25.153225+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:25.153225+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:23.527260+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:23.527260+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:23.527260+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:23.527260+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -36,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:25 GMT + - Fri, 18 Oct 2024 11:54:23 GMT Server: - gunicorn X-Robots-Tag: @@ -68,7 +68,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:25 GMT + - Fri, 18 Oct 2024 11:54:23 GMT Server: - gunicorn X-Robots-Tag: @@ -104,7 +104,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:25 GMT + - Fri, 18 Oct 2024 11:54:23 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_delete_workflow_dag_runs.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_delete_workflow_dag_runs.yaml index 80963f6499..c31f834aaf 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_delete_workflow_dag_runs.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_delete_workflow_dag_runs.yaml @@ -20,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:25.712666+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:25.712666+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:25.712666+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:25.712666+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:24.179475+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:24.179475+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:24.179475+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:24.179475+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -36,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:25 GMT + - Fri, 18 Oct 2024 11:54:24 GMT Server: - gunicorn X-Robots-Tag: @@ -60,10 +60,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:25.712666+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:25.712666+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:25.712666+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:25.712666+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:24.179475+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:24.179475+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:24.179475+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:24.179475+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -76,7 +76,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:25 GMT + - Fri, 18 Oct 2024 11:54:24 GMT Server: - gunicorn X-Robots-Tag: @@ -110,7 +110,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:25 GMT + - Fri, 18 Oct 2024 11:54:24 GMT Server: - gunicorn X-Robots-Tag: @@ -144,7 +144,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:26 GMT + - Fri, 18 Oct 2024 11:54:24 GMT Server: - gunicorn X-Robots-Tag: @@ -176,7 +176,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:26 GMT + - Fri, 18 Oct 2024 11:54:25 GMT Server: - gunicorn X-Robots-Tag: @@ -199,21 +199,25 @@ interactions: uri: http://airflow-webserver:8080/api/v1/dags/author_create_initialization_dag/dagRuns/00000000-0000-0000-0000-000000000001 response: body: - string: '' + string: "{\n \"detail\": \"DAGRun with DAG ID: 'author_create_initialization_dag' + and DagRun ID: '00000000-0000-0000-0000-000000000001' not found\",\n \"status\": + 404,\n \"title\": \"Not Found\",\n \"type\": \"https://airflow.apache.org/docs/apache-airflow/2.9.3/stable-rest-api-ref.html#section/Errors/NotFound\"\n}\n" headers: Cache-Control: - no-store Connection: - close + Content-Length: + - '293' Content-Type: - - application/json + - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:26 GMT + - Fri, 18 Oct 2024 11:54:25 GMT Server: - gunicorn X-Robots-Tag: - noindex, nofollow status: - code: 204 - message: NO CONTENT + code: 404 + message: NOT FOUND version: 1 diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_fetch_data_workflow_dag.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_fetch_data_workflow_dag.yaml index e5e1b5400f..5e3295de8d 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_fetch_data_workflow_dag.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_fetch_data_workflow_dag.yaml @@ -20,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:26.571149+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:26.571149+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:26.571149+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:26.571149+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:25.361392+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:25.361392+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:25.361392+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:25.361392+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -36,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:26 GMT + - Fri, 18 Oct 2024 11:54:25 GMT Server: - gunicorn X-Robots-Tag: @@ -60,10 +60,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:26.571149+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:26.571149+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:26.571149+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:26.571149+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:25.361392+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:25.361392+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:25.361392+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:25.361392+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -76,7 +76,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:26 GMT + - Fri, 18 Oct 2024 11:54:25 GMT Server: - gunicorn X-Robots-Tag: @@ -110,7 +110,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:26 GMT + - Fri, 18 Oct 2024 11:54:25 GMT Server: - gunicorn X-Robots-Tag: @@ -144,7 +144,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:26 GMT + - Fri, 18 Oct 2024 11:54:25 GMT Server: - gunicorn X-Robots-Tag: @@ -176,7 +176,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:27 GMT + - Fri, 18 Oct 2024 11:54:25 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_find_executed_dags.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_find_executed_dags.yaml index 1f27f44d58..08b604e1c5 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_find_executed_dags.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_find_executed_dags.yaml @@ -20,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:27.306955+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:27.306955+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:27.306955+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:27.306955+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:26.408634+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:26.408634+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:26.408634+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:26.408634+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -36,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:27 GMT + - Fri, 18 Oct 2024 11:54:26 GMT Server: - gunicorn X-Robots-Tag: @@ -60,10 +60,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:27.306955+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:27.306955+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:27.306955+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:27.306955+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:26.408634+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:26.408634+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:26.408634+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:26.408634+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -76,7 +76,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:27 GMT + - Fri, 18 Oct 2024 11:54:26 GMT Server: - gunicorn X-Robots-Tag: @@ -110,7 +110,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:27 GMT + - Fri, 18 Oct 2024 11:54:26 GMT Server: - gunicorn X-Robots-Tag: @@ -144,7 +144,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:27 GMT + - Fri, 18 Oct 2024 11:54:26 GMT Server: - gunicorn X-Robots-Tag: @@ -176,7 +176,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:27 GMT + - Fri, 18 Oct 2024 11:54:27 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_find_failed_dag.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_find_failed_dag.yaml index c557ea64e2..4f1e282aaf 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_find_failed_dag.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_find_failed_dag.yaml @@ -20,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:27.947491+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:27.947491+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:27.947491+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:27.947491+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:27.435564+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:27.435564+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:27.435564+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:27.435564+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -36,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:27 GMT + - Fri, 18 Oct 2024 11:54:27 GMT Server: - gunicorn X-Robots-Tag: @@ -60,23 +60,24 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:27.947491+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:27.947491+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:27.947491+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:27.947491+00:00\",\n \"note\": - null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": - \"queued\"\n}\n" + \ \"data_interval_end\": \"2024-10-18T11:54:27.435564+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:27.435564+00:00\",\n \"end_date\": \"2024-10-18T11:54:39.564360+00:00\",\n + \ \"execution_date\": \"2024-10-18T11:54:27.435564+00:00\",\n \"external_trigger\": + true,\n \"last_scheduling_decision\": \"2024-10-18T11:54:39.562850+00:00\",\n + \ \"logical_date\": \"2024-10-18T11:54:27.435564+00:00\",\n \"note\": null,\n + \ \"run_type\": \"manual\",\n \"start_date\": \"2024-10-18T11:54:27.664354+00:00\",\n + \ \"state\": \"failed\"\n}\n" headers: Cache-Control: - no-store Connection: - close Content-Length: - - '621' + - '711' Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:28 GMT + - Fri, 18 Oct 2024 11:54:47 GMT Server: - gunicorn X-Robots-Tag: @@ -110,7 +111,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:28 GMT + - Fri, 18 Oct 2024 11:54:47 GMT Server: - gunicorn X-Robots-Tag: @@ -144,7 +145,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:28 GMT + - Fri, 18 Oct 2024 11:54:47 GMT Server: - gunicorn X-Robots-Tag: @@ -176,7 +177,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:28 GMT + - Fri, 18 Oct 2024 11:54:48 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_restart_failed_tasks.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_restart_failed_tasks.yaml index 20a3234f97..7938ec9c05 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_restart_failed_tasks.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_restart_failed_tasks.yaml @@ -17,27 +17,33 @@ interactions: uri: http://airflow-webserver:8080/api/v1/dags/author_create_initialization_dag/dagRuns response: body: - string: "{\n \"detail\": \"DAGRun with DAG ID: 'author_create_initialization_dag' - and DAGRun ID: '00000000-0000-0000-0000-000000000001' already exists\",\n - \ \"status\": 409,\n \"title\": \"Conflict\",\n \"type\": \"https://airflow.apache.org/docs/apache-airflow/2.9.3/stable-rest-api-ref.html#section/Errors/AlreadyExists\"\n}\n" + string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n + \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": + \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n + \ \"data_interval_end\": \"2024-10-18T11:54:48.274093+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:48.274093+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:48.274093+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:48.274093+00:00\",\n \"note\": + null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": + \"queued\"\n}\n" headers: Cache-Control: - no-store Connection: - close Content-Length: - - '302' + - '621' Content-Type: - - application/problem+json + - application/json Date: - - Wed, 16 Oct 2024 16:02:28 GMT + - Fri, 18 Oct 2024 11:54:48 GMT Server: - gunicorn X-Robots-Tag: - noindex, nofollow status: - code: 409 - message: CONFLICT + code: 200 + message: OK - request: body: null headers: @@ -54,23 +60,23 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:27.947491+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:27.947491+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:27.947491+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - \"2024-10-16T16:02:28.158307+00:00\",\n \"logical_date\": \"2024-10-16T16:02:27.947491+00:00\",\n - \ \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": \"2024-10-16T16:02:28.122762+00:00\",\n - \ \"state\": \"running\"\n}\n" + \ \"data_interval_end\": \"2024-10-18T11:54:48.274093+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:48.274093+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:48.274093+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:48.274093+00:00\",\n \"note\": + null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": + \"queued\"\n}\n" headers: Cache-Control: - no-store Connection: - close Content-Length: - - '682' + - '621' Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:28 GMT + - Fri, 18 Oct 2024 11:54:48 GMT Server: - gunicorn X-Robots-Tag: @@ -104,7 +110,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:28 GMT + - Fri, 18 Oct 2024 11:54:48 GMT Server: - gunicorn X-Robots-Tag: @@ -138,7 +144,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:29 GMT + - Fri, 18 Oct 2024 11:54:48 GMT Server: - gunicorn X-Robots-Tag: @@ -170,7 +176,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:29 GMT + - Fri, 18 Oct 2024 11:54:48 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_restart_failed_tasks_no_tasks.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_restart_failed_tasks_no_tasks.yaml index dff2834707..7a508b1ed5 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_restart_failed_tasks_no_tasks.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_restart_failed_tasks_no_tasks.yaml @@ -20,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:29.432274+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:29.432274+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:29.432274+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:29.432274+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:49.114837+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:49.114837+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:49.114837+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:49.114837+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -36,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:29 GMT + - Fri, 18 Oct 2024 11:54:49 GMT Server: - gunicorn X-Robots-Tag: @@ -60,10 +60,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:29.432274+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:29.432274+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:29.432274+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:29.432274+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:49.114837+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:49.114837+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:49.114837+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:49.114837+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -76,7 +76,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:29 GMT + - Fri, 18 Oct 2024 11:54:49 GMT Server: - gunicorn X-Robots-Tag: @@ -110,7 +110,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:29 GMT + - Fri, 18 Oct 2024 11:54:49 GMT Server: - gunicorn X-Robots-Tag: @@ -144,7 +144,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:30 GMT + - Fri, 18 Oct 2024 11:54:49 GMT Server: - gunicorn X-Robots-Tag: @@ -176,7 +176,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:30 GMT + - Fri, 18 Oct 2024 11:54:49 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_restart_workflow_dags.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_restart_workflow_dags.yaml index 8f3c48a233..6527a4c03e 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_restart_workflow_dags.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_restart_workflow_dags.yaml @@ -20,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:31.348583+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:31.348583+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:31.348583+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:31.348583+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:49.928543+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:49.928543+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:49.928543+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:49.928543+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -36,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:31 GMT + - Fri, 18 Oct 2024 11:54:49 GMT Server: - gunicorn X-Robots-Tag: @@ -60,10 +60,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:31.348583+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:31.348583+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:31.348583+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:31.348583+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:49.928543+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:49.928543+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:49.928543+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:49.928543+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -76,7 +76,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:31 GMT + - Fri, 18 Oct 2024 11:54:50 GMT Server: - gunicorn X-Robots-Tag: @@ -110,7 +110,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:31 GMT + - Fri, 18 Oct 2024 11:54:50 GMT Server: - gunicorn X-Robots-Tag: @@ -144,7 +144,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:31 GMT + - Fri, 18 Oct 2024 11:54:50 GMT Server: - gunicorn X-Robots-Tag: @@ -168,10 +168,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:31.348583+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:31.348583+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:31.348583+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:31.348583+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:49.928543+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:49.928543+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:49.928543+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:49.928543+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -184,7 +184,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:31 GMT + - Fri, 18 Oct 2024 11:54:50 GMT Server: - gunicorn X-Robots-Tag: @@ -218,7 +218,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:31 GMT + - Fri, 18 Oct 2024 11:54:50 GMT Server: - gunicorn X-Robots-Tag: @@ -252,7 +252,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:32 GMT + - Fri, 18 Oct 2024 11:54:50 GMT Server: - gunicorn X-Robots-Tag: @@ -284,7 +284,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:32 GMT + - Fri, 18 Oct 2024 11:54:50 GMT Server: - gunicorn X-Robots-Tag: @@ -313,10 +313,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:32.303092+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:32.303092+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:32.303092+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:32.303092+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:50.810267+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:50.810267+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:50.810267+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:50.810267+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -329,7 +329,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:32 GMT + - Fri, 18 Oct 2024 11:54:50 GMT Server: - gunicorn X-Robots-Tag: @@ -361,7 +361,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:32 GMT + - Fri, 18 Oct 2024 11:54:50 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_trigger_airflow_dag.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_trigger_airflow_dag.yaml index b8b152c18b..1720604808 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_trigger_airflow_dag.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAirflowUtils.test_trigger_airflow_dag.yaml @@ -20,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000001\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000001\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:32.633513+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:32.633513+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:32.633513+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:32.633513+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:54:51.246355+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:54:51.246355+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:54:51.246355+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:54:51.246355+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -36,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:32 GMT + - Fri, 18 Oct 2024 11:54:51 GMT Server: - gunicorn X-Robots-Tag: @@ -68,7 +68,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:32 GMT + - Fri, 18 Oct 2024 11:54:51 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_accept_author.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_accept_author.yaml index fb2ce73bd6..c9ece345ea 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_accept_author.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_accept_author.yaml @@ -1,28 +1,4 @@ interactions: -- request: - body: '{"index":{"_id":"00000000-0000-0000-0000-000000000000","_index":"backoffice-backend-test-workflows"}} - - {"id":"00000000-0000-0000-0000-000000000000","workflow_type":"AUTHOR_CREATE","data":{"test":"test"},"decisions":[],"status":"running","is_update":false,"_created_at":"2024-10-16T16:02:39.812570+00:00","_updated_at":"2024-10-16T16:02:39.812578+00:00"} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":76,"errors":false,"items":[{"index":{"_index":"backoffice-backend-test-workflows","_id":"00000000-0000-0000-0000-000000000000","_version":1,"result":"created","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":12,"_primary_term":1,"status":201}}]}' - headers: - content-length: - - '284' - content-type: - - application/json; charset=UTF-8 - status: - code: 200 - message: OK - request: body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": "00000000-0000-0000-0000-000000000000", "data": {"test": "test"}}}' @@ -44,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:40.077534+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:40.077534+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:40.077534+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:40.077534+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:00.752919+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:00.752919+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:00.752919+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:00.752919+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -60,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:40 GMT + - Fri, 18 Oct 2024 11:55:00 GMT Server: - gunicorn X-Robots-Tag: @@ -90,10 +66,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"create_ticket\": true,\n \ \"value\": \"accept\"\n },\n \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n \ },\n \"dag_id\": \"author_create_approved_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:40.387190+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:40.387190+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:40.387190+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:40.387190+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:00.981664+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:00.981664+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:00.981664+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:00.981664+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -106,7 +82,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:40 GMT + - Fri, 18 Oct 2024 11:55:01 GMT Server: - gunicorn X-Robots-Tag: @@ -138,7 +114,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:40 GMT + - Fri, 18 Oct 2024 11:55:01 GMT Server: - gunicorn X-Robots-Tag: @@ -170,7 +146,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:40 GMT + - Fri, 18 Oct 2024 11:55:01 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_create_author.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_create_author.yaml index e6007b6bee..b5c08727a7 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_create_author.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_create_author.yaml @@ -1,28 +1,4 @@ interactions: -- request: - body: '{"index":{"_id":"00000000-0000-0000-0000-000000000000","_index":"backoffice-backend-test-workflows"}} - - {"id":"00000000-0000-0000-0000-000000000000","workflow_type":"AUTHOR_CREATE","data":{"test":"test"},"decisions":[],"status":"running","is_update":false,"_created_at":"2024-10-16T16:02:40.988835+00:00","_updated_at":"2024-10-16T16:02:40.988841+00:00"} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":51,"errors":false,"items":[{"index":{"_index":"backoffice-backend-test-workflows","_id":"00000000-0000-0000-0000-000000000000","_version":2,"result":"updated","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":13,"_primary_term":1,"status":200}}]}' - headers: - content-length: - - '284' - content-type: - - application/json; charset=UTF-8 - status: - code: 200 - message: OK - request: body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": "00000000-0000-0000-0000-000000000000", "data": {"test": "test"}}}' @@ -41,55 +17,36 @@ interactions: uri: http://airflow-webserver:8080/api/v1/dags/author_create_initialization_dag/dagRuns response: body: - string: "{\n \"detail\": \"DAGRun with DAG ID: 'author_create_initialization_dag' - and DAGRun ID: '00000000-0000-0000-0000-000000000000' already exists\",\n - \ \"status\": 409,\n \"title\": \"Conflict\",\n \"type\": \"https://airflow.apache.org/docs/apache-airflow/2.9.3/stable-rest-api-ref.html#section/Errors/AlreadyExists\"\n}\n" + string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n + \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": + \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n + \ \"data_interval_end\": \"2024-10-18T11:55:01.749671+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:01.749671+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:01.749671+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:01.749671+00:00\",\n \"note\": + null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": + \"queued\"\n}\n" headers: Cache-Control: - no-store Connection: - close Content-Length: - - '302' + - '621' Content-Type: - - application/problem+json + - application/json Date: - - Wed, 16 Oct 2024 16:02:41 GMT + - Fri, 18 Oct 2024 11:55:01 GMT Server: - gunicorn X-Robots-Tag: - noindex, nofollow - status: - code: 409 - message: CONFLICT -- request: - body: '{"index":{"_id":"709dfad4-a41c-4211-a848-35bf4dc9af80","_index":"backoffice-backend-test-workflows"}} - - {"id":"709dfad4-a41c-4211-a848-35bf4dc9af80","workflow_type":"AUTHOR_CREATE","data":{"name":{"value":"John, - Snow"},"_collections":["Authors"],"$schema":"https://inspirehep.net/schemas/records/authors.json"},"decisions":[],"status":"running","is_update":false,"_created_at":"2024-10-16T16:02:41.204753+00:00","_updated_at":"2024-10-16T16:02:41.204768+00:00"} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":54,"errors":false,"items":[{"index":{"_index":"backoffice-backend-test-workflows","_id":"709dfad4-a41c-4211-a848-35bf4dc9af80","_version":1,"result":"created","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":14,"_primary_term":1,"status":201}}]}' - headers: - content-length: - - '284' - content-type: - - application/json; charset=UTF-8 status: code: 200 message: OK - request: - body: '{"dag_run_id": "709dfad4-a41c-4211-a848-35bf4dc9af80", "conf": {"workflow_id": - "709dfad4-a41c-4211-a848-35bf4dc9af80", "data": {"name": {"value": "John, Snow"}, + body: '{"dag_run_id": "184df52c-c416-4c36-aa3a-682fa534eae3", "conf": {"workflow_id": + "184df52c-c416-4c36-aa3a-682fa534eae3", "data": {"name": {"value": "John, Snow"}, "_collections": ["Authors"], "$schema": "https://inspirehep.net/schemas/records/authors.json"}}}' headers: Accept: @@ -109,12 +66,12 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"$schema\": \"https://inspirehep.net/schemas/records/authors.json\",\n \ \"_collections\": [\n \"Authors\"\n ],\n \"name\": {\n \"value\": \"John, Snow\"\n }\n },\n \"workflow_id\": - \"709dfad4-a41c-4211-a848-35bf4dc9af80\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n - \ \"dag_run_id\": \"709dfad4-a41c-4211-a848-35bf4dc9af80\",\n \"data_interval_end\": - \"2024-10-16T16:02:41.373180+00:00\",\n \"data_interval_start\": \"2024-10-16T16:02:41.373180+00:00\",\n - \ \"end_date\": null,\n \"execution_date\": \"2024-10-16T16:02:41.373180+00:00\",\n + \"184df52c-c416-4c36-aa3a-682fa534eae3\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n + \ \"dag_run_id\": \"184df52c-c416-4c36-aa3a-682fa534eae3\",\n \"data_interval_end\": + \"2024-10-18T11:55:02.507784+00:00\",\n \"data_interval_start\": \"2024-10-18T11:55:02.507784+00:00\",\n + \ \"end_date\": null,\n \"execution_date\": \"2024-10-18T11:55:02.507784+00:00\",\n \ \"external_trigger\": true,\n \"last_scheduling_decision\": null,\n \"logical_date\": - \"2024-10-16T16:02:41.373180+00:00\",\n \"note\": null,\n \"run_type\": + \"2024-10-18T11:55:02.507784+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: Cache-Control: @@ -126,7 +83,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:41 GMT + - Fri, 18 Oct 2024 11:55:02 GMT Server: - gunicorn X-Robots-Tag: @@ -158,7 +115,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:41 GMT + - Fri, 18 Oct 2024 11:55:02 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_reject_author.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_reject_author.yaml index 025dddf8f5..890070607a 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_reject_author.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_reject_author.yaml @@ -1,28 +1,4 @@ interactions: -- request: - body: '{"index":{"_id":"00000000-0000-0000-0000-000000000000","_index":"backoffice-backend-test-workflows"}} - - {"id":"00000000-0000-0000-0000-000000000000","workflow_type":"AUTHOR_CREATE","data":{"test":"test"},"decisions":[],"status":"running","is_update":false,"_created_at":"2024-10-16T16:02:41.624412+00:00","_updated_at":"2024-10-16T16:02:41.624418+00:00"} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":15,"errors":false,"items":[{"index":{"_index":"backoffice-backend-test-workflows","_id":"00000000-0000-0000-0000-000000000000","_version":3,"result":"updated","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":15,"_primary_term":1,"status":200}}]}' - headers: - content-length: - - '284' - content-type: - - application/json; charset=UTF-8 - status: - code: 200 - message: OK - request: body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": "00000000-0000-0000-0000-000000000000", "data": {"test": "test"}}}' @@ -44,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:41.751894+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:41.751894+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:41.751894+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:41.751894+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:02.998654+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:02.998654+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:02.998654+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:02.998654+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -60,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:41 GMT + - Fri, 18 Oct 2024 11:55:03 GMT Server: - gunicorn X-Robots-Tag: @@ -90,10 +66,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"create_ticket\": true,\n \ \"value\": \"reject\"\n },\n \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n \ },\n \"dag_id\": \"author_create_rejected_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:41.865983+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:41.865983+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:41.865983+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:41.865983+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:03.150804+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:03.150804+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:03.150804+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:03.150804+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -106,7 +82,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:41 GMT + - Fri, 18 Oct 2024 11:55:03 GMT Server: - gunicorn X-Robots-Tag: @@ -138,7 +114,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:42 GMT + - Fri, 18 Oct 2024 11:55:03 GMT Server: - gunicorn X-Robots-Tag: @@ -170,7 +146,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:42 GMT + - Fri, 18 Oct 2024 11:55:03 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_restart_a_task.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_restart_a_task.yaml index ad70388fdb..ad0ddb1890 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_restart_a_task.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_restart_a_task.yaml @@ -1,28 +1,4 @@ interactions: -- request: - body: '{"index":{"_id":"00000000-0000-0000-0000-000000000000","_index":"backoffice-backend-test-workflows"}} - - {"id":"00000000-0000-0000-0000-000000000000","workflow_type":"AUTHOR_CREATE","data":{"test":"test"},"decisions":[],"status":"running","is_update":false,"_created_at":"2024-10-16T16:02:42.391956+00:00","_updated_at":"2024-10-16T16:02:42.391964+00:00"} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":17,"errors":false,"items":[{"index":{"_index":"backoffice-backend-test-workflows","_id":"00000000-0000-0000-0000-000000000000","_version":4,"result":"updated","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":16,"_primary_term":1,"status":200}}]}' - headers: - content-length: - - '284' - content-type: - - application/json; charset=UTF-8 - status: - code: 200 - message: OK - request: body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": "00000000-0000-0000-0000-000000000000", "data": {"test": "test"}}}' @@ -44,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:42.609152+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:42.609152+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:42.609152+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:42.609152+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:03.862356+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:03.862356+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:03.862356+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:03.862356+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -60,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:42 GMT + - Fri, 18 Oct 2024 11:55:03 GMT Server: - gunicorn X-Robots-Tag: @@ -84,23 +60,23 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:42.609152+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:42.609152+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:42.609152+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:42.609152+00:00\",\n \"note\": - null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": - \"queued\"\n}\n" + \ \"data_interval_end\": \"2024-10-18T11:55:03.862356+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:03.862356+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:03.862356+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + \"2024-10-18T11:55:03.945653+00:00\",\n \"logical_date\": \"2024-10-18T11:55:03.862356+00:00\",\n + \ \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": \"2024-10-18T11:55:03.942228+00:00\",\n + \ \"state\": \"running\"\n}\n" headers: Cache-Control: - no-store Connection: - close Content-Length: - - '621' + - '682' Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:42 GMT + - Fri, 18 Oct 2024 11:55:03 GMT Server: - gunicorn X-Robots-Tag: @@ -134,7 +110,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:42 GMT + - Fri, 18 Oct 2024 11:55:04 GMT Server: - gunicorn X-Robots-Tag: @@ -168,7 +144,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:42 GMT + - Fri, 18 Oct 2024 11:55:04 GMT Server: - gunicorn X-Robots-Tag: @@ -200,7 +176,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:43 GMT + - Fri, 18 Oct 2024 11:55:04 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_restart_full_dagrun.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_restart_full_dagrun.yaml index 7d7efefb37..080b4a5f2b 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_restart_full_dagrun.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_restart_full_dagrun.yaml @@ -1,28 +1,4 @@ interactions: -- request: - body: '{"index":{"_id":"00000000-0000-0000-0000-000000000000","_index":"backoffice-backend-test-workflows"}} - - {"id":"00000000-0000-0000-0000-000000000000","workflow_type":"AUTHOR_CREATE","data":{"test":"test"},"decisions":[],"status":"running","is_update":false,"_created_at":"2024-10-16T16:02:43.242712+00:00","_updated_at":"2024-10-16T16:02:43.242720+00:00"} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":22,"errors":false,"items":[{"index":{"_index":"backoffice-backend-test-workflows","_id":"00000000-0000-0000-0000-000000000000","_version":5,"result":"updated","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":17,"_primary_term":1,"status":200}}]}' - headers: - content-length: - - '284' - content-type: - - application/json; charset=UTF-8 - status: - code: 200 - message: OK - request: body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": "00000000-0000-0000-0000-000000000000", "data": {"test": "test"}}}' @@ -44,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:43.384727+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:43.384727+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:43.384727+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:43.384727+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:04.638872+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:04.638872+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:04.638872+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:04.638872+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -60,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:43 GMT + - Fri, 18 Oct 2024 11:55:04 GMT Server: - gunicorn X-Robots-Tag: @@ -84,23 +60,23 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:43.384727+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:43.384727+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:43.384727+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:43.384727+00:00\",\n \"note\": - null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": - \"queued\"\n}\n" + \ \"data_interval_end\": \"2024-10-18T11:55:04.638872+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:04.638872+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:04.638872+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + \"2024-10-18T11:55:04.751787+00:00\",\n \"logical_date\": \"2024-10-18T11:55:04.638872+00:00\",\n + \ \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": \"2024-10-18T11:55:04.748037+00:00\",\n + \ \"state\": \"running\"\n}\n" headers: Cache-Control: - no-store Connection: - close Content-Length: - - '621' + - '682' Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:43 GMT + - Fri, 18 Oct 2024 11:55:04 GMT Server: - gunicorn X-Robots-Tag: @@ -134,7 +110,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:43 GMT + - Fri, 18 Oct 2024 11:55:04 GMT Server: - gunicorn X-Robots-Tag: @@ -168,7 +144,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:43 GMT + - Fri, 18 Oct 2024 11:55:04 GMT Server: - gunicorn X-Robots-Tag: @@ -192,23 +168,23 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:43.384727+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:43.384727+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:43.384727+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:43.384727+00:00\",\n \"note\": - null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": - \"queued\"\n}\n" + \ \"data_interval_end\": \"2024-10-18T11:55:04.638872+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:04.638872+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:04.638872+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + \"2024-10-18T11:55:04.790431+00:00\",\n \"logical_date\": \"2024-10-18T11:55:04.638872+00:00\",\n + \ \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": \"2024-10-18T11:55:04.748037+00:00\",\n + \ \"state\": \"running\"\n}\n" headers: Cache-Control: - no-store Connection: - close Content-Length: - - '621' + - '682' Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:43 GMT + - Fri, 18 Oct 2024 11:55:05 GMT Server: - gunicorn X-Robots-Tag: @@ -242,7 +218,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:43 GMT + - Fri, 18 Oct 2024 11:55:05 GMT Server: - gunicorn X-Robots-Tag: @@ -276,7 +252,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:44 GMT + - Fri, 18 Oct 2024 11:55:05 GMT Server: - gunicorn X-Robots-Tag: @@ -308,7 +284,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:44 GMT + - Fri, 18 Oct 2024 11:55:05 GMT Server: - gunicorn X-Robots-Tag: @@ -337,10 +313,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:44.309111+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:44.309111+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:44.309111+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:44.309111+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:05.529190+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:05.529190+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:05.529190+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:05.529190+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -353,7 +329,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:44 GMT + - Fri, 18 Oct 2024 11:55:05 GMT Server: - gunicorn X-Robots-Tag: @@ -385,7 +361,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:44 GMT + - Fri, 18 Oct 2024 11:55:05 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_restart_with_params.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_restart_with_params.yaml index 796b1bdf42..7ee9f0ddaf 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_restart_with_params.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_restart_with_params.yaml @@ -1,28 +1,4 @@ interactions: -- request: - body: '{"index":{"_id":"00000000-0000-0000-0000-000000000000","_index":"backoffice-backend-test-workflows"}} - - {"id":"00000000-0000-0000-0000-000000000000","workflow_type":"AUTHOR_CREATE","data":{"test":"test"},"decisions":[],"status":"running","is_update":false,"_created_at":"2024-10-16T16:02:44.628066+00:00","_updated_at":"2024-10-16T16:02:44.628073+00:00"} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":17,"errors":false,"items":[{"index":{"_index":"backoffice-backend-test-workflows","_id":"00000000-0000-0000-0000-000000000000","_version":6,"result":"updated","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":18,"_primary_term":1,"status":200}}]}' - headers: - content-length: - - '284' - content-type: - - application/json; charset=UTF-8 - status: - code: 200 - message: OK - request: body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": "00000000-0000-0000-0000-000000000000", "data": {"test": "test"}}}' @@ -44,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:44.767846+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:44.767846+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:44.767846+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:44.767846+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:06.100309+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:06.100309+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:06.100309+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:06.100309+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -60,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:44 GMT + - Fri, 18 Oct 2024 11:55:06 GMT Server: - gunicorn X-Robots-Tag: @@ -84,10 +60,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:44.767846+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:44.767846+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:44.767846+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:44.767846+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:06.100309+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:06.100309+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:06.100309+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:06.100309+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -100,7 +76,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:44 GMT + - Fri, 18 Oct 2024 11:55:06 GMT Server: - gunicorn X-Robots-Tag: @@ -134,7 +110,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:45 GMT + - Fri, 18 Oct 2024 11:55:06 GMT Server: - gunicorn X-Robots-Tag: @@ -168,7 +144,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:45 GMT + - Fri, 18 Oct 2024 11:55:06 GMT Server: - gunicorn X-Robots-Tag: @@ -192,10 +168,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:44.767846+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:44.767846+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:44.767846+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:44.767846+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:06.100309+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:06.100309+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:06.100309+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:06.100309+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -208,7 +184,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:45 GMT + - Fri, 18 Oct 2024 11:55:06 GMT Server: - gunicorn X-Robots-Tag: @@ -242,7 +218,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:45 GMT + - Fri, 18 Oct 2024 11:55:06 GMT Server: - gunicorn X-Robots-Tag: @@ -276,7 +252,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:45 GMT + - Fri, 18 Oct 2024 11:55:06 GMT Server: - gunicorn X-Robots-Tag: @@ -308,7 +284,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:45 GMT + - Fri, 18 Oct 2024 11:55:06 GMT Server: - gunicorn X-Robots-Tag: @@ -337,10 +313,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n \ },\n \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \ \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:45.775231+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:45.775231+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:45.775231+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:45.775231+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:07.010414+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:07.010414+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:07.010414+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:07.010414+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -353,7 +329,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:45 GMT + - Fri, 18 Oct 2024 11:55:07 GMT Server: - gunicorn X-Robots-Tag: @@ -385,7 +361,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:45 GMT + - Fri, 18 Oct 2024 11:55:07 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_invalid_schema_record.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_invalid_schema_record.yaml index b9c34b9aa1..38a96c1e83 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_invalid_schema_record.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_invalid_schema_record.yaml @@ -1,28 +1,4 @@ interactions: -- request: - body: '{"index":{"_id":"00000000-0000-0000-0000-000000000000","_index":"backoffice-backend-test-workflows"}} - - {"id":"00000000-0000-0000-0000-000000000000","workflow_type":"AUTHOR_CREATE","data":{"test":"test"},"decisions":[],"status":"running","is_update":false,"_created_at":"2024-10-16T16:02:46.109369+00:00","_updated_at":"2024-10-16T16:02:46.109387+00:00"} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":102,"errors":false,"items":[{"index":{"_index":"backoffice-backend-test-workflows","_id":"00000000-0000-0000-0000-000000000000","_version":7,"result":"updated","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":19,"_primary_term":1,"status":200}}]}' - headers: - content-length: - - '285' - content-type: - - application/json; charset=UTF-8 - status: - code: 200 - message: OK - request: body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": "00000000-0000-0000-0000-000000000000", "data": {"test": "test"}}}' @@ -44,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:46.353132+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:46.353132+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:46.353132+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:46.353132+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:07.532992+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:07.532992+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:07.532992+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:07.532992+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -60,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:46 GMT + - Fri, 18 Oct 2024 11:55:07 GMT Server: - gunicorn X-Robots-Tag: @@ -92,7 +68,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:46 GMT + - Fri, 18 Oct 2024 11:55:07 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_no_schema_record.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_no_schema_record.yaml index 5b8658f290..0f06f67b11 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_no_schema_record.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_no_schema_record.yaml @@ -1,28 +1,4 @@ interactions: -- request: - body: '{"index":{"_id":"00000000-0000-0000-0000-000000000000","_index":"backoffice-backend-test-workflows"}} - - {"id":"00000000-0000-0000-0000-000000000000","workflow_type":"AUTHOR_CREATE","data":{"test":"test"},"decisions":[],"status":"running","is_update":false,"_created_at":"2024-10-16T16:02:46.686377+00:00","_updated_at":"2024-10-16T16:02:46.686387+00:00"} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":13,"errors":false,"items":[{"index":{"_index":"backoffice-backend-test-workflows","_id":"00000000-0000-0000-0000-000000000000","_version":8,"result":"updated","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":20,"_primary_term":1,"status":200}}]}' - headers: - content-length: - - '284' - content-type: - - application/json; charset=UTF-8 - status: - code: 200 - message: OK - request: body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": "00000000-0000-0000-0000-000000000000", "data": {"test": "test"}}}' @@ -44,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:46.819276+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:46.819276+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:46.819276+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:46.819276+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:08.060467+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:08.060467+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:08.060467+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:08.060467+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -60,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:46 GMT + - Fri, 18 Oct 2024 11:55:08 GMT Server: - gunicorn X-Robots-Tag: @@ -92,7 +68,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:46 GMT + - Fri, 18 Oct 2024 11:55:08 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_not_valid_record.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_not_valid_record.yaml index 667a9cc191..5ade55ca7a 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_not_valid_record.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_not_valid_record.yaml @@ -1,28 +1,4 @@ interactions: -- request: - body: '{"index":{"_id":"00000000-0000-0000-0000-000000000000","_index":"backoffice-backend-test-workflows"}} - - {"id":"00000000-0000-0000-0000-000000000000","workflow_type":"AUTHOR_CREATE","data":{"test":"test"},"decisions":[],"status":"running","is_update":false,"_created_at":"2024-10-16T16:02:47.184073+00:00","_updated_at":"2024-10-16T16:02:47.184079+00:00"} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":14,"errors":false,"items":[{"index":{"_index":"backoffice-backend-test-workflows","_id":"00000000-0000-0000-0000-000000000000","_version":9,"result":"updated","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":21,"_primary_term":1,"status":200}}]}' - headers: - content-length: - - '284' - content-type: - - application/json; charset=UTF-8 - status: - code: 200 - message: OK - request: body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": "00000000-0000-0000-0000-000000000000", "data": {"test": "test"}}}' @@ -44,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:47.316942+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:47.316942+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:47.316942+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:47.316942+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:08.510391+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:08.510391+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:08.510391+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:08.510391+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -60,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:47 GMT + - Fri, 18 Oct 2024 11:55:08 GMT Server: - gunicorn X-Robots-Tag: @@ -92,7 +68,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:47 GMT + - Fri, 18 Oct 2024 11:55:08 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_valid_record.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_valid_record.yaml index 4f4c43ef43..95d59b3529 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_valid_record.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_validate_valid_record.yaml @@ -1,28 +1,4 @@ interactions: -- request: - body: '{"index":{"_id":"00000000-0000-0000-0000-000000000000","_index":"backoffice-backend-test-workflows"}} - - {"id":"00000000-0000-0000-0000-000000000000","workflow_type":"AUTHOR_CREATE","data":{"test":"test"},"decisions":[],"status":"running","is_update":false,"_created_at":"2024-10-16T16:02:47.636303+00:00","_updated_at":"2024-10-16T16:02:47.636309+00:00"} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":14,"errors":false,"items":[{"index":{"_index":"backoffice-backend-test-workflows","_id":"00000000-0000-0000-0000-000000000000","_version":10,"result":"updated","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":22,"_primary_term":1,"status":200}}]}' - headers: - content-length: - - '285' - content-type: - - application/json; charset=UTF-8 - status: - code: 200 - message: OK - request: body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": "00000000-0000-0000-0000-000000000000", "data": {"test": "test"}}}' @@ -44,10 +20,10 @@ interactions: string: "{\n \"conf\": {\n \"data\": {\n \"test\": \"test\"\n },\n \ \"workflow_id\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n - \ \"data_interval_end\": \"2024-10-16T16:02:47.762273+00:00\",\n \"data_interval_start\": - \"2024-10-16T16:02:47.762273+00:00\",\n \"end_date\": null,\n \"execution_date\": - \"2024-10-16T16:02:47.762273+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": - null,\n \"logical_date\": \"2024-10-16T16:02:47.762273+00:00\",\n \"note\": + \ \"data_interval_end\": \"2024-10-18T11:55:08.904579+00:00\",\n \"data_interval_start\": + \"2024-10-18T11:55:08.904579+00:00\",\n \"end_date\": null,\n \"execution_date\": + \"2024-10-18T11:55:08.904579+00:00\",\n \"external_trigger\": true,\n \"last_scheduling_decision\": + null,\n \"logical_date\": \"2024-10-18T11:55:08.904579+00:00\",\n \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" headers: @@ -60,7 +36,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:47 GMT + - Fri, 18 Oct 2024 11:55:08 GMT Server: - gunicorn X-Robots-Tag: @@ -92,7 +68,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:47 GMT + - Fri, 18 Oct 2024 11:55:09 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/cassettes/TestWorkflowViewSet.test_delete.yaml b/backoffice/backoffice/workflows/tests/cassettes/TestWorkflowViewSet.test_delete.yaml index b863746f46..aefcebc2c8 100644 --- a/backoffice/backoffice/workflows/tests/cassettes/TestWorkflowViewSet.test_delete.yaml +++ b/backoffice/backoffice/workflows/tests/cassettes/TestWorkflowViewSet.test_delete.yaml @@ -1,28 +1,4 @@ interactions: -- request: - body: '{"index":{"_id":"00000000-0000-0000-0000-000000000002","_index":"backoffice-backend-test-workflows"}} - - {"id":"00000000-0000-0000-0000-000000000002","workflow_type":"AUTHOR_CREATE","data":{},"decisions":[],"status":"approval","is_update":false,"_created_at":"2024-10-16T16:02:33.607293+00:00","_updated_at":"2024-10-16T16:02:33.607305+00:00"} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":17,"errors":false,"items":[{"index":{"_index":"backoffice-backend-test-workflows","_id":"00000000-0000-0000-0000-000000000002","_version":2,"result":"updated","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":6,"_primary_term":1,"status":200}}]}' - headers: - content-length: - - '283' - content-type: - - application/json; charset=UTF-8 - status: - code: 200 - message: OK - request: body: '{"dag_run_id": "00000000-0000-0000-0000-000000000002", "conf": {"workflow_id": "00000000-0000-0000-0000-000000000002"}}' @@ -43,10 +19,10 @@ interactions: body: string: "{\n \"conf\": {\n \"workflow_id\": \"00000000-0000-0000-0000-000000000002\"\n \ },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": - \"00000000-0000-0000-0000-000000000002\",\n \"data_interval_end\": \"2024-10-16T16:02:33.777652+00:00\",\n - \ \"data_interval_start\": \"2024-10-16T16:02:33.777652+00:00\",\n \"end_date\": - null,\n \"execution_date\": \"2024-10-16T16:02:33.777652+00:00\",\n \"external_trigger\": - true,\n \"last_scheduling_decision\": null,\n \"logical_date\": \"2024-10-16T16:02:33.777652+00:00\",\n + \"00000000-0000-0000-0000-000000000002\",\n \"data_interval_end\": \"2024-10-18T11:54:52.902328+00:00\",\n + \ \"data_interval_start\": \"2024-10-18T11:54:52.902328+00:00\",\n \"end_date\": + null,\n \"execution_date\": \"2024-10-18T11:54:52.902328+00:00\",\n \"external_trigger\": + true,\n \"last_scheduling_decision\": null,\n \"logical_date\": \"2024-10-18T11:54:52.902328+00:00\",\n \ \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \ \"state\": \"queued\"\n}\n" headers: @@ -59,7 +35,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:33 GMT + - Fri, 18 Oct 2024 11:54:52 GMT Server: - gunicorn X-Robots-Tag: @@ -82,10 +58,10 @@ interactions: body: string: "{\n \"conf\": {\n \"workflow_id\": \"00000000-0000-0000-0000-000000000002\"\n \ },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": - \"00000000-0000-0000-0000-000000000002\",\n \"data_interval_end\": \"2024-10-16T16:02:33.777652+00:00\",\n - \ \"data_interval_start\": \"2024-10-16T16:02:33.777652+00:00\",\n \"end_date\": - null,\n \"execution_date\": \"2024-10-16T16:02:33.777652+00:00\",\n \"external_trigger\": - true,\n \"last_scheduling_decision\": null,\n \"logical_date\": \"2024-10-16T16:02:33.777652+00:00\",\n + \"00000000-0000-0000-0000-000000000002\",\n \"data_interval_end\": \"2024-10-18T11:54:52.902328+00:00\",\n + \ \"data_interval_start\": \"2024-10-18T11:54:52.902328+00:00\",\n \"end_date\": + null,\n \"execution_date\": \"2024-10-18T11:54:52.902328+00:00\",\n \"external_trigger\": + true,\n \"last_scheduling_decision\": null,\n \"logical_date\": \"2024-10-18T11:54:52.902328+00:00\",\n \ \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \ \"state\": \"queued\"\n}\n" headers: @@ -98,7 +74,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:33 GMT + - Fri, 18 Oct 2024 11:54:53 GMT Server: - gunicorn X-Robots-Tag: @@ -132,7 +108,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:34 GMT + - Fri, 18 Oct 2024 11:54:53 GMT Server: - gunicorn X-Robots-Tag: @@ -166,7 +142,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:34 GMT + - Fri, 18 Oct 2024 11:54:53 GMT Server: - gunicorn X-Robots-Tag: @@ -189,10 +165,10 @@ interactions: body: string: "{\n \"conf\": {\n \"workflow_id\": \"00000000-0000-0000-0000-000000000002\"\n \ },\n \"dag_id\": \"author_create_initialization_dag\",\n \"dag_run_id\": - \"00000000-0000-0000-0000-000000000002\",\n \"data_interval_end\": \"2024-10-16T16:02:33.777652+00:00\",\n - \ \"data_interval_start\": \"2024-10-16T16:02:33.777652+00:00\",\n \"end_date\": - null,\n \"execution_date\": \"2024-10-16T16:02:33.777652+00:00\",\n \"external_trigger\": - true,\n \"last_scheduling_decision\": null,\n \"logical_date\": \"2024-10-16T16:02:33.777652+00:00\",\n + \"00000000-0000-0000-0000-000000000002\",\n \"data_interval_end\": \"2024-10-18T11:54:52.902328+00:00\",\n + \ \"data_interval_start\": \"2024-10-18T11:54:52.902328+00:00\",\n \"end_date\": + null,\n \"execution_date\": \"2024-10-18T11:54:52.902328+00:00\",\n \"external_trigger\": + true,\n \"last_scheduling_decision\": null,\n \"logical_date\": \"2024-10-18T11:54:52.902328+00:00\",\n \ \"note\": null,\n \"run_type\": \"manual\",\n \"start_date\": null,\n \ \"state\": \"queued\"\n}\n" headers: @@ -205,7 +181,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:34 GMT + - Fri, 18 Oct 2024 11:54:53 GMT Server: - gunicorn X-Robots-Tag: @@ -239,7 +215,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:34 GMT + - Fri, 18 Oct 2024 11:54:53 GMT Server: - gunicorn X-Robots-Tag: @@ -273,7 +249,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:34 GMT + - Fri, 18 Oct 2024 11:54:53 GMT Server: - gunicorn X-Robots-Tag: @@ -305,7 +281,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 16 Oct 2024 16:02:34 GMT + - Fri, 18 Oct 2024 11:54:53 GMT Server: - gunicorn X-Robots-Tag: @@ -313,28 +289,6 @@ interactions: status: code: 204 message: NO CONTENT -- request: - body: '{"delete":{"_id":"00000000-0000-0000-0000-000000000002","_index":"backoffice-backend-test-workflows"}} - - ' - headers: - connection: - - keep-alive - content-type: - - application/json - method: POST - uri: http://es:9200/_bulk?refresh=true - response: - body: - string: '{"took":30,"errors":false,"items":[{"delete":{"_index":"backoffice-backend-test-workflows","_id":"00000000-0000-0000-0000-000000000002","_version":3,"result":"deleted","forced_refresh":true,"_shards":{"total":2,"successful":1,"failed":0},"_seq_no":7,"_primary_term":1,"status":200}}]}' - headers: - content-length: - - '284' - content-type: - - application/json; charset=UTF-8 - status: - code: 200 - message: OK - request: body: null headers: @@ -361,7 +315,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:34 GMT + - Fri, 18 Oct 2024 11:54:54 GMT Server: - gunicorn X-Robots-Tag: @@ -395,7 +349,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:34 GMT + - Fri, 18 Oct 2024 11:54:54 GMT Server: - gunicorn X-Robots-Tag: @@ -429,7 +383,7 @@ interactions: Content-Type: - application/problem+json Date: - - Wed, 16 Oct 2024 16:02:34 GMT + - Fri, 18 Oct 2024 11:54:54 GMT Server: - gunicorn X-Robots-Tag: diff --git a/backoffice/backoffice/workflows/tests/conftest.py b/backoffice/backoffice/workflows/tests/conftest.py index 1d96abf638..3ffb589d3d 100644 --- a/backoffice/backoffice/workflows/tests/conftest.py +++ b/backoffice/backoffice/workflows/tests/conftest.py @@ -8,7 +8,7 @@ def vcr_config(): "decode_compressed_response": True, "filter_headers": ("Authorization", "User-Agent"), "ignore_hosts": ( - "opensearch", + "es", "flower", "mq", "postgres-backoffice", diff --git a/record-editor/src/app/backoffice-editor/backoffice-editor.component.ts b/record-editor/src/app/backoffice-editor/backoffice-editor.component.ts index 7921e6c62a..8711f69784 100644 --- a/record-editor/src/app/backoffice-editor/backoffice-editor.component.ts +++ b/record-editor/src/app/backoffice-editor/backoffice-editor.component.ts @@ -86,8 +86,16 @@ export class BackofficeEditorComponent } } + private injectValidationErrorsIntoExtraData() { + this.workflowObject._extra_data.validation_errors = this.workflowObject.validation_errors; + } + get workflowExtraData() { - return this.workflowObject._extra_data || {}; + this.workflowObject._extra_data = this.workflowObject._extra_data || {}; + if (this.workflowObject.validation_errors) { + this.injectValidationErrorsIntoExtraData(); + } + return this.workflowObject._extra_data; } onValidationProblems(problems: SchemaValidationProblems) { diff --git a/record-editor/src/app/shared/interfaces/workflow-object.ts b/record-editor/src/app/shared/interfaces/workflow-object.ts index 42f98317ab..a8c6e6ef41 100644 --- a/record-editor/src/app/shared/interfaces/workflow-object.ts +++ b/record-editor/src/app/shared/interfaces/workflow-object.ts @@ -3,6 +3,7 @@ import { JsonPatch } from './json-patch'; export interface WorkflowObject { id: number; + validation_errors?: Array; _extra_data?: { validation_errors?: Array; callback_url?: string;