Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
|
| task_instance=None, | ||
| owner=user, | ||
| extra=str(list(request.values.items())), | ||
| extra=json.dumps(request.values), |
There was a problem hiding this comment.
Why not fetch str and handle serialization on the client-side?
There was a problem hiding this comment.
The current setup doesn't produce valid json, because it is a list of tuples. It would also be very helpful to be able to query this information in the database, since important context lives in the extra, eg whether or not a clear was confirmed, or a trigger had a conf.
There was a problem hiding this comment.
@kaxil to give more color, we've built an "Airflow Snitch" which alerts based on some user actions (eg user cleared a production DAG). This relies on parsing the extra field to determine if the job was actually cleared since there are two trigger events, and only the confirmed event causes an action.
We've hacked together some extra field parsing, but it isn't very elegant, and this could be done a lot more efficiently in the database if the column was valid json.
There was a problem hiding this comment.
Thanks for the explanation, can you add a test, please
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
It would be very useful to be able to query the the logged extras, to determine if a trigger has a configuration, or a clear operation is confirmed.
Make sure to mark the boxes below before creating PR: [x]
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.