taarifa / TaarifaAPI

A REST API for the Taarifa platform handling services and resources
http://taarifa.org
Other
14 stars 8 forks source link

Upgrade to Eve 0.6 / PyMongo 2.8 #9

Open kynan opened 8 years ago

kynan commented 8 years ago

MongoLab recently upgraded all client databases to MongoDB 3.0, which introduces a new default authentication scheme and requires a MongoDB 3.0 and SCRAM-SHA-1-compatible driver for authentication.

kynan commented 8 years ago

I have now pushed the upgrade and deployed to http://dashboard.taarifa.org

There were 2 main issues with deploying:

  1. I had to update the Python runtime to 2.7.10 (otherwise pip fails due to a InsecurePlatformWarning.
  2. I had to disable the collectstatic task since this task calls manage.py, which fails because it cannot authenticate against the MongoDB database. This was a chicken-egg problem: we can't authenticate because we need to upgrade but we can't upgrade because we can't authenticate... Fortunately we don't need collectstatic, so I left it disabled:

    heroku config:set DISABLE_COLLECTSTATIC=1
kynan commented 8 years ago

Tentatively fixed in e6453b0

There is a pending pull request nicolaiarocci/eve#740, which is required to restore full functionality.

The problem is that schemas are now validated. Our rather unusual use of schemas for dynamic endpoints is tripped up by this and it doesn't make much sense to add exceptions for all cases.