-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add support for Redis Sentinel #133
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
f81922c
to
94e650f
Compare
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. |
b15f744
to
057968f
Compare
fa4f0d3
to
f7f5814
Compare
Add Django 3.2, drop Django 1.11 and 3.1. Drop Python 2 support, and therefore six. Set Django 3.2 as the 'installed' version.
xlrd needs updating for recent Python versions, but the version that supports Python 3.9 no longer handles XLSX files. This removes the constraint on xlrd and adds a new pyexcel-xlsx plugin as well as setting this for .xslx files.
We can just use the venv module to create the virtualenv, rather than needing an additional package installed.
This adds basic support for using Redis Sentinel to mediate connections to the primary Redis server used by the API functionality. Setting `REDIS_SENTINEL_HOSTS` to a dict of "'host': port" key/values will override any settings for `REDIS_DB_HOST` and `REDIS_DB_PORT` with values provided by Sentinel. Fixes #132
6659085
to
764b1a1
Compare
This has now been rebased over |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, couple of questions just to check. Looks also like commits might need tidying, there's two that now say they drop Django 3.1, I mean, I can take a look at that when ready.
conf/pre_deploy_actions.bash
Outdated
# Install GDAL, correct version, right headers | ||
gdal_version=$(gdal-config --version) | ||
# stretch version of GDAL doesn't have matching pypi version | ||
if [ $gdal_version = "2.1.2" ]; then gdal_version="2.1.3"; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we said we could drop this line now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, it's only needed on older operating systems - we'd only need it if we ever want to deploy this PR to Debian Stretch. I'll take that out.
conf/pre_deploy_actions.bash
Outdated
gdal_version=$(gdal-config --version) | ||
# stretch version of GDAL doesn't have matching pypi version | ||
if [ $gdal_version = "2.1.2" ]; then gdal_version="2.1.3"; fi | ||
C_INCLUDE_PATH=/usr/include/gdal CPLUS_INCLUDE_PATH=/usr/include/gdal pip install GDAL==$gdal_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And you said in a different PR this might not be needed like this any more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe so; testing this on newer OSes and the package builds successfully without it. I'll take that out as well to bring it in-line with the other deployments.
Debian Stretch is very close to the end of LTS support, so we no longer need to check for GDAL 2.1.2, the version packaged on Debian Stretch, and instead install 2.1.3, the nearest version available in PyPI. In addition, settting environment variables no longer appears to be needed, so this removes these.
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(not needed, now mocking)REDIS_SENTINEL_HOSTS
is set.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