django-celery-beat icon indicating copy to clipboard operation
django-celery-beat copied to clipboard

fix get unique timezones

Open beedub opened this issue 6 months ago • 8 comments

the previous query did not actually get distinct timezones

beedub avatar May 14 '25 17:05 beedub

Please run pre-commit on django_celery_beat/schedulers.py

cclauss avatar May 14 '25 18:05 cclauss

@cclauss updated

beedub avatar May 14 '25 18:05 beedub

Codecov Report

:x: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 87.99%. Comparing base (70d381b) to head (2c23b14). :warning: Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
django_celery_beat/schedulers.py 75.00% 1 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #896      +/-   ##
==========================================
- Coverage   88.19%   87.99%   -0.20%     
==========================================
  Files          32       32              
  Lines        1008     1008              
  Branches      105      105              
==========================================
- Hits          889      887       -2     
- Misses        101      102       +1     
- Partials       18       19       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar May 15 '25 05:05 codecov[bot]

@alirafiei75 please take a look

auvipy avatar May 17 '25 08:05 auvipy

@auvipy can you suggest what additional tests you want here?

beedub avatar May 17 '25 15:05 beedub

The rebase didn’t work. Please make it errorless again

auvipy avatar May 18 '25 18:05 auvipy

it's the same test as the one below test_timezone_offset_with_zoneinfo_object_param, except that it tests with string timezone names, which as discussed, is not possible given that timezone always returns ZoneInfo

beedub avatar May 19 '25 21:05 beedub

if you're referring to the codecov note, then i would guess it's b/c the tests only run with sqlite. can you confirm?

if so, i don't have have the bandwidth to update the test suite to also run a build with non-sqlite (eg. postgres). i can remove the sqlite/non-sqlite conditional in that code even though it'll be less performant, but i think it'll increase the codecov by virtue of not having a non-tested branch

re: regressions, there are existing tests from the original PR that introduced this change that should cover regressions. this change is a performance improvement

beedub avatar May 20 '25 16:05 beedub