-
Notifications
You must be signed in to change notification settings - Fork 26
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
Inject initial data on startup of backend manage container when a specific env var is set. #1616
Comments
This is a feature which has existed for a long time in the datastore: https://github.com/OpenSlides/openslides-datastore-service/blob/main/docs/development.md#initial-data-creation and https://github.com/OpenSlides/openslides-datastore-service/blob/7a1a15159642c89a4124ce659224fe5b13fa2576/dc.dev.yml#L28 for an example. Feel free to utilize it in the manage service (it's only in the |
The feature request here is that not the manage service initialize the automaticle setup but instead the single manage backend container should do this. One community member is requesting a possibility to initialize everything on startup without any manual intervention. At the moment the manage service is just a GRPC server that waits on commands from outside. If it should do anything extra on startup it has to ensure that the manage service e. g. is already up. That's why we want to propose the solution I described above. Maybe let's discuss which is the best way here. |
But that's exactly what the datastore is capable of: During generation of the yaml file, the manage service would set the variables for the datastore accordingly (see the documentation). Upon first startup, the data from the provided file is automatically loaded into the datastore, if no events are present yet. Upon future starts, it is skipped since other events are already present. Only thing one could argue is that we should let this run via the backend to ensure relation and data integrity, but since only experienced users will use that feature anyway (instances hosted by us will and do not), I think we could put that responsibility into the user's own hands. |
@normanjaeckel ping. Is this still relevant? Maybe we need a draft for an concept? Could you write something? |
A community member (https://github.com/Floens) requested this feature. If the current way directly through the datastore is enough, it is ok for me. But I think this is more like a hidden feature. |
@normanjaeckel Yes, this is a "hidden feature" because you need deep knowledge of OS to know where to set the appropriate variables. What he wished for was a way to do that directly in the manage tool. Since you opened this issue, I assumed you were interested in adding such a feature to the manage service, which is why I pointed out the current way to do it. So now you have to either tell me why this way doesn't suffice and what you need, or we can close this because we either don't want to implement such a feature in the manage service or the current datastore way suffices. |
closing this for now. |
See OpenSlides/openslides-manage-service#212
It would be great if the backend can automaticly inject the default initial data during startup (if db is empty of course) if a specific env var is set. Proposal
DEFAULT_INITIAL_DATA_ON_STARTUP
which should trigger on values like "true" or "1" and not on values like "false" or "0".The text was updated successfully, but these errors were encountered: