ferruzzi commented on code in PR #70148:
URL: https://github.com/apache/airflow/pull/70148#discussion_r3693502137


##########
airflow-core/src/airflow/serialization/schema.json:
##########
@@ -201,6 +201,11 @@
                     "type": "array",
                     "items": { "$ref": "#/definitions/dict" }
                 },
+                {
+                    "$comment": "Once persisted, a Dag's deadline alerts live 
as rows in the deadline_alert table and the serialized Dag keeps only a list of 
UUID strings referencing them (see 
SerializedDagModel._generate_deadline_uuids). This branch lets the stored form 
validate at any lifecycle stage, not only before the dict->UUID rewrite.",
+                    "type": "array",
+                    "items": { "type": "string" }

Review Comment:
   As written, this accepts any string, we could tighten it by adding a regex 
pattern to validate that it is a UUID7:
   
   ```json
     "items": {
         "type": "string",
         "pattern": 
"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
     }
   ```



##########
airflow-core/src/airflow/serialization/schema.json:
##########
@@ -201,6 +201,11 @@
                     "type": "array",
                     "items": { "$ref": "#/definitions/dict" }
                 },
+                {
+                    "$comment": "Once persisted, a Dag's deadline alerts live 
as rows in the deadline_alert table and the serialized Dag keeps only a list of 
UUID strings referencing them (see 
SerializedDagModel._generate_deadline_uuids). This branch lets the stored form 
validate at any lifecycle stage, not only before the dict->UUID rewrite.",

Review Comment:
   I don't see `$comment`s anywhere else, which makes this feel a bit out of 
place?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to