jazzband / django-silk

Silky smooth profiling for Django
MIT License
4.35k stars 333 forks source link

Fix double EXPLAIN when calling explain on queryset #654

Open stereodamage opened 1 year ago

stereodamage commented 1 year ago

Closes #597, #650.

There's also an idea to wrap call to database into try..except and throw something like ProgrammingError (according to PEP 249) or custom error based on ProgrammingError.

codecov[bot] commented 1 year ago

Codecov Report

Merging #654 (0416234) into master (274898f) will decrease coverage by 0.03%. The diff coverage is 75.00%.

@@            Coverage Diff             @@
##           master     #654      +/-   ##
==========================================
- Coverage   86.51%   86.48%   -0.03%     
==========================================
  Files          52       52              
  Lines        2091     2094       +3     
==========================================
+ Hits         1809     1811       +2     
- Misses        282      283       +1     
Impacted Files Coverage Δ
silk/sql.py 78.26% <75.00%> (-0.53%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

pawelzar commented 5 months ago

Hey, I just encountered this issue too. I think the changes look good but test coverage is failing. I can help you add some unit tests if you'd like @stereodamage.

stereodamage commented 5 months ago

@pawelzar that would be nice of you, I appreciate that. Didn't really had much time to look into it again and write new test myself. Anything needed from my side?