Closed gideonmaina closed 1 month ago
👍🏽
If I understand what we're trying to do, then I see this as breaking change i.e. the new secure endpoints are no longer v1 but v2 (or whatever v we're currently on).
My approach would be:
- Create new v2 endpoints that work exactly like the equivalent v1 endpoints but secure.
- Test and deploy backend to PROD.
- Upgrade the front-end up to point to v2 endpoints.
- Test and deploy front-end to PROD.
- Remove or redirect unsecure v1 endpoints.
- Test and deploy backend to PROD.
- Profit
Cool, makes sense @gideonmaina I'll setup a review to plan for this implementation approach
PS: Not sure what SENSORSAFRICA_CELERY_SLACK_WEBHOOK_FAILURES_ONLY
is for. If we need to send errors notifications to Slack, the best approach it to integrate with Sentry and Sentry will send notifications over email, Slack, etc.
Changes should be merged in #138 , Tracked in #134
Description
The main aim of this PR is to simplify local development and implement authentication for key endpoints prone to bot crawling or misuse by clients whilst fixing a few issues related to dependencies and migrations. The affected endpoints/views in API
v1
aredata
,now
andnode
. This will attempt to reduce the lag observed when making calls to the API.Fixes issues #134, #135, #136
Setup changes
feinstaub sensors app
was removed from the working tree as pip install takes care of that.*04
in sensorsafrica app was removed as it is applied before a dependencyTests for these changes were both done using local and staging databases.
Type of change
Screenshots
Checklist: