openblocks
openblocks copied to clipboard
Feature request: Add datasource and query libraries export/import
Add ability to export and import datasources and query libraries. This would make it a lot easier for devops when installing/migrating/upgrading openblocks with apps. It would also be easier to spin up a QA/Test environment with an application (in CI/CD pipeline or just for a developer).
Hi @ludomikula. For query libraries, you can import/export queries from/to JSON files (new feature in v1.1.3). Currently it's only possible to operate one query every single time. For data sources, export/import ability is not supported because it may cause database credentials to be leaked.
Yes I am aware about the import/export of one query library, however that's not very practical. I can see the problem with leaked credentials, but this could be handled by removing credentials during export.
Maybe creating an openblocks-ctl command line utility (or enhancing existing openblocks-cli) would make more sense? The security considerations would be gone, since if somebody has access to the underlying system, you're in trouble anyway :)
Something like:
openblocks-ctl export datasource [name,name2,name3]
- without list of names, exports all datasources
openblocks-ctl export query-library [name,name2,name3]
- without list of names, exports all query libraries
And similar commands for importing them.
Nice idea. Really appreciate that 😃 Back to your initial needs of installing/migrating/upgrading openblocks with apps, we agree on the difficulty in migrating between multiple Openblocks environments. Actually, we're planning to introduce a new concept called "project". In an Openblocks "project", there are app pages, query library, modules, data sources, etc. Then you can export/import those content in bulk by utilizing the "project" feature. Maybe this is of some help to you?
Yes! That would be definitely helpful. Even more if exposed via an API endpoint :) (but would help a lot even without it)
Hopefully the proposed project feature will fix app and module import export issues mentioned in https://github.com/openblocks-dev/openblocks/issues/94#issuecomment-1426617552