You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Airflow HTTP operator has an optional parameter named response_check that gets a function (docs)
Adding a corresponding schema named http.yaml for a boundary-layer http operator resulted in the next error: boundary_layer.exceptions.InvalidConfig: Invalid config spec in file c:\path_to_venv\site-packages\boundary_layer_default_plugin\config\operators\http.yaml: {'parameters_jsonschema': ["Invalid JSON schema: 'function' is not valid under any of the given schemas\n\nFailed validating 'anyOf' in schema['properties']['properties']['additionalProperties']['properties']['type']:\n {'anyOf': [{'$ref': '#/definitions/simpleTypes'},\n {'items': {'$ref': '#/definitions/simpleTypes'},\n 'minItems': 1,\n 'type': 'array',\n 'uniqueItems': True}]}\n\nOn instance['properties']['response_check']['type']:\n 'function'"]}
http.yaml content is: (with problematic parameter #'d out)
hi @moryakub thanks for the question and for working to add the http operator. The only way to define functions in boundary-layer at this time is by using string-valued parameters, and supplying those parameters as verbatim strings in the dag (meaning strings that are enclosed by the delimiters << and >>, which get pasted directly into the generated python code).
Examples of other function-valued parameters that work this way are the on_failure_callback and other callbacks that are supported by the base operator config.
To use this in your YAML workflow, you would have to do something like:
Airflow HTTP operator has an optional parameter named
response_check
that gets a function (docs)Adding a corresponding schema named
http.yaml
for aboundary-layer
http operator resulted in the next error:boundary_layer.exceptions.InvalidConfig: Invalid config spec in file c:\path_to_venv\site-packages\boundary_layer_default_plugin\config\operators\http.yaml: {'parameters_jsonschema': ["Invalid JSON schema: 'function' is not valid under any of the given schemas\n\nFailed validating 'anyOf' in schema['properties']['properties']['additionalProperties']['properties']['type']:\n {'anyOf': [{'$ref': '#/definitions/simpleTypes'},\n {'items': {'$ref': '#/definitions/simpleTypes'},\n 'minItems': 1,\n 'type': 'array',\n 'uniqueItems': True}]}\n\nOn instance['properties']['response_check']['type']:\n 'function'"]}
http.yaml
content is: (with problematic parameter #'d out)The text was updated successfully, but these errors were encountered: