Lee-W commented on code in PR #71104:
URL: https://github.com/apache/airflow/pull/71104#discussion_r3736670712
##########
airflow-core/src/airflow/provider_info.schema.json:
##########
@@ -432,38 +432,49 @@
"type": "array",
"description": "Apply custom decorators to the TaskFlow API. Can
be accessed by users via '@task.<name>'",
"items": {
- "name": {
- "type": "string"
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "Name the decorator is exposed under,
following '@task.'",
+ "type": "string"
+ },
+ "class-name": {
+ "description": "Class name that implements the
decorator",
+ "type": "string"
+ }
},
- "path": {
- "type": "string"
- }
+ "required": [
+ "name",
+ "class-name"
+ ]
}
},
"plugins": {
"type": "array",
"description": "Plugins provided by the provider",
"items": {
- "name": {
- "type": "string",
- "description": "Name of the plugin"
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the plugin"
+ },
+ "plugin-class": {
+ "type": "string",
+ "description": "Class to instantiate the plugin"
+ }
},
- "plugin-class": {
- "type": "string",
- "description": "Class to instantiate the plugin"
- }
+ "required": [
+ "name",
+ "plugin-class"
+ ]
}
},
"queues": {
"type": "array",
- "description": "Message Queues exposed by the provider",
+ "description": "Message queue provider class names",
"items": {
- "name": {
- "type": "string"
- },
- "message-queue-class": {
- "type": "string"
- }
+ "type": "string"
Review Comment:
Dropped the `required` blocks and the `queues` `items` constraint from the
runtime schema, so nothing in there can fail validation that passed before. the
old `items` blocks listed the field names as bare keys, which JSON Schema
ignores, so they described validation that was never actually running. They're
now real `properties` with no `required`, purely as documentation. The
`plugins` and `task-decorators` items do still carry `type: object` — happy to
drop that too if you'd rather the runtime schema constrain nothing at all.
##########
airflow-core/src/airflow/provider.yaml.schema.json:
##########
@@ -557,12 +557,21 @@
"type": "array",
"description": "Decorators to use with the TaskFlow API. Can be
accessed by users via '@task.<name>'",
"items": {
- "name": {
- "type": "string"
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "Name the decorator is exposed under,
following '@task.'",
+ "type": "string"
+ },
+ "class-name": {
+ "description": "Class name that implements the
decorator",
+ "type": "string"
+ }
},
- "path": {
- "type": "string"
- }
+ "required": [
Review Comment:
Added on both. Ran the `provider.yaml` check across the tree to confirm it
stays green, and putting a stray key back into one of the entries does make it
fail on that entry, so the guard is actually live. The field sets used by every
in-tree `provider.yaml` match what the schema declares, so nothing gets caught
by accident.
--
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]