[AIRFLOW-2504] Log username correctly and Add extra to search columns#3438
[AIRFLOW-2504] Log username correctly and Add extra to search columns#3438youngyjd wants to merge 1 commit intoapache:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3438 +/- ##
=======================================
Coverage 76.75% 76.75%
=======================================
Files 203 203
Lines 15100 15100
=======================================
Hits 11590 11590
Misses 3510 3510
Continue to review full report at Codecov.
|
|
Can you please squash commits? |
airflow/www/utils.py
Outdated
There was a problem hiding this comment.
good catch! this seems like a bug and I wonder if we can remove this completely given it's always None.
There was a problem hiding this comment.
We use google authentication and current_user.username is always None, but I am not sure whether there is any other use cases or authentication methods that current_user.username is not None. I did a quick code search for current_user.username and it looks like there are some usage of current_user.username in UI. What do you think?
There was a problem hiding this comment.
Ah yeah, looks like the use case is trivial (airflow logo title) in the main UI, and it's currently returning None when you hover your mouse over it, so it can be replaced as well :)
There was a problem hiding this comment.
Sure. Will replace that part as well. Thanks
There was a problem hiding this comment.
@jgao54 Done. I checked current_user.username for the rbac UI and it worked fine. I assume the bug only exits in the old UI.
|
@kaxil sure. I though it was better to have 2 separate commits.. I will squash them |
d9f7e36 to
37d1e76
Compare
|
Could you prepend your commit with [AIRFLOW-XXX], will merge after. |
fc5b4a8 to
1ce098d
Compare
1ce098d to
b286cd1
Compare
|
Cannot simply change |
|
ah i see! thanks for digging. |
|
does this pr need to change for the rbac UI(under www_rbac directory)? @youngyjd |
|
@feng-tao rbac is using flask g, which works fine. |
Closes apache#3438 from youngyjd/log-username-old-ui
Make sure you have checked all steps below.
JIRA
Description
Tests
Commits
Documentation
Code Quality
git diff upstream/master -u -- "*.py" | flake8 --diff