pierrejeambrun commented on code in PR #74041:
URL: https://github.com/apache/airflow/pull/74041#discussion_r4165908943
##########
airflow-core/src/airflow/serialization/schema.json:
##########
@@ -257,7 +257,18 @@
},
"tasks": {
"type": "array",
- "additionalProperties": { "$ref": "#/definitions/operator" }
+ "items": {
+ "type": "object",
+ "required": [ "__type", "__var" ],
+ "properties": {
+ "__type": { "const": "operator" },
+ "__var": {
+ "type": "object",
+ "required": [ "task_id" ],
+ "properties": { "task_id": { "type": "string" } }
+ }
Review Comment:
Can we replace by `"__var": { "$ref": "#/definitions/operator" }`. Also
other schema sync hook looks like it wasn't run for Java. Shouldn't this be run
automatically instead of manually (similarly to the TS one)
For a task entry like
```
{"__type": "operator", "__var": {"task_id": "x", "retries":
"not-a-number"}}
```
It passes `validate_schema` and only surface later. (from_dict I believe)
--
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]