[GitHub] [airflow] alex-astronomer commented on issue #18217: Audit Logging for Variables, Connections, Pools

2021-09-21 Thread GitBox


alex-astronomer commented on issue #18217:
URL: https://github.com/apache/airflow/issues/18217#issuecomment-924485066


   Upon further consideration, I'd like to not use a SQLAlchemy event to make 
this happen.  The way that we handle audit logging right now happens (from what 
I've seen) mostly through decorators and I'd like to take a similar approach to 
this problem just for clarity.  I feel like a sqlalchemy event could have the 
potential to be lost in the code in some obscure spot and I'd like to have the 
audit logging occur at the source of the change, right next to the code that 
makes that change.  Right now after the research that I've done both the API 
and CLI call the `Variable.set(...)` `classmethod` when making their changes to 
variables.  I'm starting with Audit Logging for setting Variables through CLI, 
API, and UI.  What do you think about that @potiuk?


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [airflow] alex-astronomer commented on issue #18217: Audit Logging for Variables, Connections, Pools

2021-09-14 Thread GitBox


alex-astronomer commented on issue #18217:
URL: https://github.com/apache/airflow/issues/18217#issuecomment-919323312


   Love that idea.  I was starting to look in the Variables (`variables.py`) 
and found a `set(...)` function that looks like the root for where variables 
are set.  That was my first glance, and seemed like a good place to start or 
add a logging decorator or something.  I like the idea of SQLAlchemy events 
though.  Makes sure that every time that changes it gets captured.  I'll 
definitely look into this more before getting assigned.  I think this might be 
a tough one for an early contributor like me but definitely something I'm 
willing to take a crack at.


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org