f0restron07 commented on issue #34563:
URL: https://github.com/apache/airflow/issues/34563#issuecomment-1732505294
Hi,
Thank you for sharing this. It appears there is a mismatch between the API
documentation and the actual behavior of the endpoint, which is resulting in a
KeyError for the dry_run variable.
Suggested Steps:
Bug Report:
If not already done, consider reporting this as a bug in the official
Airflow GitHub repository or check if there is already an existing issue
reported for this behavior.
Temporary Workaround:
As a temporary workaround, you can include the dry_run variable with a value
of false in your API requests to avoid the KeyError, until the issue is fixed
in the codebase.
Code Modification:
You can also modify the code to handle the absence of the dry_run variable
properly, making it optional as per the documentation, and set it to false as
the default value if it's not provided in the request.
Example Code Modification:
data.get("dry_run", False)
This would access the dry_run value if it exists in the data dictionary and
would default to False if it doesn’t exist, avoiding the KeyError.
Next Steps:
Await for feedback on the submitted bug report.
Follow the status of the issue and apply the official fix once it’s
available in the future release.
In the meantime, it would be helpful to always provide the dry_run variable
with your requests as mentioned above.
I hope this helps and makes your interaction with Airflow’s REST API
smoother.
Best Regards,
f0restron
--
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]