{Feedback} Fix feedback minification#17301
Conversation
The previous implementation had 3 bugs: - IndexError when only 1 line in error_string; - infinite loop when repeatedly can't strip down error_string; - ", ln" instead of ", in" in one matching expression that rendered it useless. Also the logic itself was "magical": it removed 4 lines at a time, starting from a middle line but if possible (never successfully) from a line before that has an exception start in it... This change should fix all these problems.
|
Thank you for your contribution gukoff! We will review the pull request and get back to you soon. |
|
feedback |
|
@gukoff, first thanks for the careful work. Actually, we are considering removing the feedback minification logic, as it has caused us many problems (#16386). Also, given modern browsers are already accepting URL length exceeding the old limitation (https://stackoverflow.com/a/417184): the motivation to minify the |
|
If you're not doing it before the next release, this fix still makes sense :) I agree that minification needs a revamp - large parts of code seem unnecessary and not tested. The URL length limit is still there, it's just usually higher than 2KB. E.g. the (undocumented?) GitHub's serverside limit on URL length is 8KB. Perpahs minification could always strip the prefix of the error message. Also, after the minification (or instead of it) we can ask the user in the CLI if opening the issue was successful. If not, write the manual instructions to the terminal: "1. open this page", "2. copy-paste this text". About GitHub serverside limit: |
Of course. But for the time being I really don't have enough time to go through your code thoroughly. 😥
Yes, we do have this logic. I will make it more user-friendly. |

The previous implementation had 3 bugs:
IndexErrorwhen only 1 line inerror_string[example: Error when adding multiple databases to a failover group #11889];error_string;Also the logic itself was "magical": it removed 4 lines at a time, starting from a middle line but if possible (never successfully) from a line before that has an exception start in it...
This change should fix all these problems.