mysociety / mapit.mysociety.org

A Django project for running mySociety's main instance of MapIt for the UK
http://mapit.mysociety.org
Other
6 stars 2 forks source link

Add support for Redis Sentinel #133

Closed sagepe closed 2 years ago

sagepe commented 2 years ago

This adds support for optionally using Redis Sentinel to mediate connections to Redis. In order to test, this extends the GitHub Actions with services for both Redis and Redis Sentinel which are used by the tests when REDIS_SENTINEL_HOSTS is set. (not needed, now mocking)

This also includes some updates to get tests passing against Python 3.9 and removes Python 2.7 support from the test suite at the same time as well as Django 1.11.

Currently this also includes commits from #127 rebased against master.

Fixes #132

codecov[bot] commented 2 years ago

Codecov Report

Merging #133 (4145c31) into master (73a576f) will decrease coverage by 0.41%. The diff coverage is 90.90%.

@@            Coverage Diff             @@
##           master     #133      +/-   ##
==========================================
- Coverage   86.49%   86.07%   -0.42%     
==========================================
  Files          48       48              
  Lines        2132     2162      +30     
==========================================
+ Hits         1844     1861      +17     
- Misses        288      301      +13     
Impacted Files Coverage Δ
api_keys/models.py 97.91% <ø> (+0.13%) :arrow_up:
mapit_mysociety_org/middleware.py 76.47% <ø> (-0.68%) :arrow_down:
mapit_mysociety_org/wsgi_monitor.py 0.00% <0.00%> (ø)
subscriptions/models.py 100.00% <ø> (ø)
bulk_lookup/forms.py 69.41% <66.66%> (ø)
api_keys/utils.py 95.23% <80.00%> (-4.77%) :arrow_down:
api_keys/tests.py 100.00% <100.00%> (ø)
api_keys/urls.py 100.00% <100.00%> (ø)
bulk_lookup/csv.py 74.07% <100.00%> (-17.18%) :arrow_down:
bulk_lookup/models.py 85.36% <100.00%> (+0.18%) :arrow_up:
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 73a576f...4145c31. Read the comment docs.

sagepe commented 2 years ago

Noting that I attempted to update the various pyexcel-* packages to more recent versions, but these generated additional errors. Perhaps these can be returned to later.

sagepe commented 2 years ago

This has now been rebased over move-python-packages which in turn was rebased over master, so will effectively supersede #127.