-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger a DAG Run via the Stable REST API fails with Bad Request due to external_trigger is set #13740
Comments
Not sure why it is giving you error, the default value is
airflow/airflow/api_connexion/openapi/v1.yaml Lines 1553 to 1556 in 9d9ef1a
|
The issues is caused because the |
@kaxil This looks like an error in the generator. This field is marked read-only and should never be sent for POST requests in the request body. This should be fixed in the generator, not in the specification. |
OpenAPITools/openapi-generator#4190 |
Yes, you are right, this should be handled by the generator. So feel free to close this issue. Just out of curiosity, did you test the This would show if the error only occurs for the |
@houqp Can you check it? |
Apache Airflow version:
2.0.0
Environment:
uname -a
): Linux 77f8efd77516 4.4.0-193-generic PrestoToMySqlTransfer #224-UbuntuWhat happened:
I am trying to trigger a DAG run via the new stable REST-API
1.0.0
by using a Java-based client. The Java client is generated from the Airflow OpenAPI specification with OpenAPI generator version5.0.0
.In Airflow I have one active DAG
demo
I trigger the DAG execution via the java client with the following code snippet:
However, I receive the following exception:
BAD REQUEST
What you expected to happen:
By checking the airflow logs it turned out that the
external_trigger
value of theDAGRun
is set but this is actually a read-only value and not allowed to be set which results in theBAD REQUEST
response.Adding the
nullable: true
setting to theexternal_trigger
and recreating the java client resolved the issue!How to reproduce it:
Create the Java client (probably any client will produce this error) via OpenAPI generator:
java -jar codegen/openapi-generator-cli-5.0.0.jar generate -i openapi.yaml -g java -o .
The text was updated successfully, but these errors were encountered: