feat(API): Add make reset command for local development#6459
feat(API): Add make reset command for local development#6459
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Docker builds report
|
f6cd804 to
9d912a1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6459 +/- ##
==========================================
+ Coverage 98.07% 98.09% +0.02%
==========================================
Files 1294 1295 +1
Lines 46535 46751 +216
==========================================
+ Hits 45637 45862 +225
+ Misses 898 889 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9d912a1 to
f4eee72
Compare
f4eee72 to
c12df3d
Compare
14f4a90 to
c05a9c5
Compare
Addressed in c05a9c5. |
6181b11 to
a45b8b8
Compare
| ENABLE_ADMIN_ACCESS_USER_PASS = True | ||
|
|
||
| SKIP_MIGRATION_TESTS = True | ||
|
|
There was a problem hiding this comment.
Missing testserver in ALLOWED_HOSTS for local settings
The reset_local_database command uses Django REST Framework's APIClient which makes requests with Host: testserver (Django's default for test clients). However, local.py only adds ".ngrok.io", "127.0.0.1", and "localhost" to ALLOWED_HOSTS, not "testserver". Since DEBUG defaults to False in common.py and isn't overridden in .env-local or local.py, Django will validate the Host header and reject all APIClient requests with a DisallowedHost exception. The tests pass because test.py both sets DEBUG = True and adds "testserver" to ALLOWED_HOSTS, but running make reset with local settings will fail.
Make it easier to run Flagsmith locally.
Changes
make resetcommand that resets the database to a known state.make resetexampleReview effort: 2/5