Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use exists query instead of count in clean-duplicate-history command. #1015

Merged
merged 3 commits into from
Sep 28, 2023

Conversation

bigtimecriminal
Copy link
Contributor

Description

Instead of using a nested count query in clean-duplicate-history, use exists unless we're at verbose >= 2

Related Issue

#1014

Motivation and Context

Removes costly query that only exists to log something out on a log that might not be called.

How Has This Been Tested?

Ran all tests. Command is already being tested by test suite

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have run the pre-commit run command to format and lint.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have added my name and/or github handle to AUTHORS.rst
  • I have added my change to CHANGES.rst
  • All new and existing tests passed.

rossmechanic
rossmechanic previously approved these changes Dec 2, 2022
Copy link
Collaborator

@rossmechanic rossmechanic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ddabble ddabble linked an issue Mar 31, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Merging #1015 (bf8bfd2) into master (fd9aa52) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1015      +/-   ##
==========================================
- Coverage   96.94%   96.87%   -0.08%     
==========================================
  Files          23       23              
  Lines        1277     1278       +1     
  Branches      210      211       +1     
==========================================
  Hits         1238     1238              
  Misses         21       21              
- Partials       18       19       +1     
Files Coverage Δ
...ory/management/commands/clean_duplicate_history.py 96.05% <100.00%> (-1.29%) ⬇️

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

Copy link
Member

@ddabble ddabble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this was simply forgotten about, so I'll merge now :)

@ddabble ddabble merged commit 0fc4686 into jazzband:master Sep 28, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make unneeded count operation optional in clean-duplicate-history.
3 participants