You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/08/27 17:56:09 UTC

[GitHub] [airflow] BasPH commented on a change in pull request #5743: [AIRFLOW-5088][AIP-24] Persisting serialized DAG in DB for webserver scalability

BasPH commented on a change in pull request #5743: [AIRFLOW-5088][AIP-24] Persisting serialized DAG in DB for webserver scalability
URL: https://github.com/apache/airflow/pull/5743#discussion_r318217289
 
 

 ##########
 File path: airflow/dag/serialization/schema.json
 ##########
 @@ -0,0 +1,233 @@
+{
+  "$schema": "http://json-schema.org/draft-07/schema#",
+  "$id": "https://airflow.apache.com/schemas/serialized-dags.json",
+  "definitions": {
+    "datetime": {
+      "type": "object",
+      "properties": {
+        "__type": {
+          "type": "string",
+          "const": "datetime"
+        },
+        "__var": {
+          "type": "string",
+          "format": "date-time"
+        }
+      },
+      "required": [
+        "__type",
+        "__var"
+      ],
+      "additionalProperties": false
+    },
+    "timedelta": {
+      "type": "object",
+      "properties": {
+        "__type": {
+          "type": "string",
+          "const": "timedelta"
+        },
+        "__var": {
+          "type": "number",
+          "exclusiveMinimum": 0
 
 Review comment:
   Just tried out this PR and hit an issue with `airflow db reset`: `jsonschema.exceptions.ValidationError: 0.0 is less than or equal to the minimum of 0` as a result of `timedelta(seconds=0)` in /airflow/tests/dags/test_retry_handling_job.py.
   
   ```suggestion
             "minimum": 0
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services