In previous versions, running an SQL report with an error (typo, bad syntax) would yield an error page with the problem syntax highlighted. 21.05 returns only a 500 error. Excerpt from plack-intranet-error.log here: https://pastebin.com/0UCYkU46
Certainly caused by bug 25026.
Created attachment 123446 [details] [review] Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports Since bug 25026 DBMS errors are raised, but the report module is not dealing correctly with the errors. If an error occurred in execute_query, next queries will fail as well, we should skip them. Test plan: 1. Create report from SQL queries, containing errors (invalid syntax, etc.) 'SELECT id FROM borrowers' can do it 2. Execute the query => Without this patch you get a 500 => With this patch applied you see that the error raised at DBMS level is propagated to the UI 3. Confirm that there is no regression on valid queries
Created attachment 123461 [details] [review] Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports Since bug 25026 DBMS errors are raised, but the report module is not dealing correctly with the errors. If an error occurred in execute_query, next queries will fail as well, we should skip them. Test plan: 1. Create report from SQL queries, containing errors (invalid syntax, etc.) 'SELECT id FROM borrowers' can do it 2. Execute the query => Without this patch you get a 500 => With this patch applied you see that the error raised at DBMS level is propagated to the UI 3. Confirm that there is no regression on valid queries Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 123686 [details] [review] Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports Since bug 25026 DBMS errors are raised, but the report module is not dealing correctly with the errors. If an error occurred in execute_query, next queries will fail as well, we should skip them. Test plan: 1. Create report from SQL queries, containing errors (invalid syntax, etc.) 'SELECT id FROM borrowers' can do it 2. Execute the query => Without this patch you get a 500 => With this patch applied you see that the error raised at DBMS level is propagated to the UI 3. Confirm that there is no regression on valid queries Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.03
Depends on Bug 25026 not in 20.11.x
*** Bug 28287 has been marked as a duplicate of this bug. ***