[AIRFLOW-5393] UI crashes in the Ad Hoc Query menu (PULL REQUEST FIX)#6000
[AIRFLOW-5393] UI crashes in the Ad Hoc Query menu (PULL REQUEST FIX)#6000ashb merged 1 commit intoapache:v1-10-stablefrom drexpp:v1-10-stable
Conversation
|
Not sure what is the problem with travis since it exists because of a time out. |
|
I restarted the jobs. We have some stability problems with Kubernetes jobs :(. working on it. |
|
shouldn't you should target the PR to v1-10-test branch? |
|
If that error is also present in master - it should go to master and then we can cherry-pick it to v1-10-test for the 1.10.6 release. |
|
Ad-hoc is only in 1.10. My general workflow for the v1-10-* branches is that -stable is the target of PRs (as those have tests run by travis, so we know they work before we merge) and reserve v1-10-test for our manual cherry-picking and rebasing. |
|
@potiuk Well that feature must have been moved/deleted from master since I cannot find any reference to "QueryView" or anything related to v1.10.4 version which had the problem. I think it must be related to this issue AIRFLOW-1846 # Allow Ad Hoc Query and Charts pages to be disabled via configs which can be resumen in the following message:
So I believe this "bug" is not anymore a problem in the next relases but it stills affect on the deployed version. If you consider the Issue and pull request as "closed", please procceed to close them. @ashb Oh okay so then I probably did fine doing the pull request to -stable, thanks for taking your time to reply. Anyway, this won't be an issue in +1.10.4 versions so it is fine not to merge it. Thanks everyone! |
Codecov Report
@@ Coverage Diff @@
## v1-10-stable #6000 +/- ##
===============================================
Coverage ? 10.73%
===============================================
Files ? 509
Lines ? 34256
Branches ? 0
===============================================
Hits ? 3678
Misses ? 30578
Partials ? 0
Continue to review full report at Codecov.
|
|
Is it okay to close it when changes are merged? Thanks for the review @ashb. |
Make sure you have checked all steps below.
Jira
Description
There was a crash in the Airflow Ad Hoc Query menu when you hit the ".csv" button to obtain a csv file of the query if the query is empty. This happened due to a "df variable referenced before assigment", the "df" variable is catched inside a try / except block and "df" is never assigned, instead there is an "error" variable which can be used to detect when the query was empty or the connection could not be stablished.
In the screenshot it fails in line 2295 and the "error" variable will be True.
In line 2317 you can see the proposed change adding "and not error"
Tests
My PR adds the following unit tests OR does not need testing for this extremely good reason:
I didn't know exactly how to unit test this, if you have any advice I will do a test for it. Other than that, I did test checking that the behaviour was as expected:
Commits
Documentation
Code Quality
flake8