-
Notifications
You must be signed in to change notification settings - Fork 6
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
Load admin-index fixtures in docker startup script #1296
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1296 +/- ##
===========================================
- Coverage 95.13% 95.10% -0.04%
===========================================
Files 983 983
Lines 35837 35845 +8
===========================================
- Hits 34094 34090 -4
- Misses 1743 1755 +12 ☔ View full report in Codecov by Sentry. |
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.
Can we exclude the possibility that fixtures need to be loaded in a certain order? Might not work for us even if it works for OpenZaak.
Afaik this only should be necessary for django-admin-index. The other fixtures in our project have unintended consequences. Lets create a separate dir for the fixtures to be auto-loaded, and ensure that this fixture_dir is also copied over within our Dockerfile. Copying over the Open Zaak functionality is too simple and will break things |
- include autoload directory for fixtures that should be automatically loaded when building the Docker container - update generate_admin_index_fixture script to copy fixture to autoload directory - taken from the open_zaak Dockerfile
e0c0cab
to
67f41ed
Compare
It seems that loading the django-admin-index fixture through Django's post-migrate signal is broken (see https://taiga.maykinmedia.nl/project/dimpact-enschede-ssc-ict-1/issue/107). Running the migrations produces the error, but manually loading the fixture immediately afterwards works (after updating the fixture, that is). I could not figure out why this started happening, so this needs further investigation. For immediate purposes, I updated the fixture and disabled automatic loading via the signal for manual builds. I also updated the docker startup script, so we have the autoload functionality when the app is build and run with Docker. |
67f41ed
to
73e2881
Compare
@alextreme I discussed this with @pi-sigma and we identified two reasons autoload using the
Both have been fixed in #1307. Point 1 is a structural issue that recurs quite frequently: With #1307 we should have the desired behavior in both vanilla and Docker environments. Given that we don't currently auto-load any other fixtures, we decided that this PR can be abandoned for now, until we actually have >1 fixtures we want to auto-load. Closing this, but we can re-open it if you feel differently. |
Taken from open_zaak Dockerfile