-
Notifications
You must be signed in to change notification settings - Fork 15
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
Discuss initial data creation #245
Comments
IMO we should have a |
@normanjaeckel It would be nice if you could be part of this discussion |
Discussed with @peb-adr and @m-schieder with the additional context of OpenSlides/OpenSlides#6745 as well as the burden of currently having to manually/programmatically call
|
When the datastore starts and the
create_initial_data
command is set (see https://github.com/OpenSlides/openslides-datastore-service/blob/main/docs/development.md#initial-data-creation) and the datastore is empty, the datastore inserts initial data to have a functioning state. The initial data file can be provided manually by settingDATASTORE_INITIAL_DATA_FILE
and defaults to the current one under https://github.com/OpenSlides/openslides-backend/blob/main/global/data/initial-data.json.This may however be wrong, e.g. if a feature branch has a lower backend MI than the current initial data file. We could think about how to improve this. A few notes to consider:
DATASTORE_INITIAL_DATA_FILE=https://raw.githubusercontent.com/OpenSlides/openslides-backend/main/global/data/example-data.json
(with the link replaced by the version you'd like) to the datastore writer section in the docker compose file.make run-dev-local
where it is required to have the backend in../openslides-backend
and where the file is then mounted into the datastore container and used as the initial data file, but I think this would be overkill. The other option would be to move this functionality from the datastore to the backend: The backend starts and checks if the datastore is empty (the datastore would need a new dev-only route for this). If it is empty, the backend does the insertion of the initial data via the existing actionorganization.initial_import
. I think this would be the cleanest solution, but also requires some changes to datastore and backend.The text was updated successfully, but these errors were encountered: