Version Control e.g. github
-
Are there best practices for control app level changes to the UI and configuration?
Here is the use case - update an existing UI which also requires new data source or new points to an existing data source.
- Check out existing UI on dev or whatever environment
- Make changes to data sources
- Make changes to UI
- Test
- Commit changes
JSON stores are store in your DB so that is essentially a blackbox. Is the best approach is to both use the overrides and file store folders? Regarding the datasource, I assume one exports the data source and store the resulting file,
I'm open to suggestions on how best to track changes and by who via github type tools.pjc
-
From my experience, version control for files is straightforward, and yes you will want to maintain changes in the overrides folder. Can't really version control a database easily as you need to have the inverse command to reverse changes/modifications that you made to data/file structure.
Filestore directories will at least give you a means to back up data and you can save/load via the Api (assuming your files are not getting stupidly large). Secondly if you are using a JSON store to host all of your settings/configuration then most likely the best thing you can do off the top of my head is to backup and push into a repo to log your changes.So that's my ten cents worth....
-
Thanks. Those scenarios look plausible and will explore them.
pjc
-
Hi chrapchp,
From our perspective, we're usually dealing with backups rather than revision control. With a backup, you should be able to restore to that point in your development. These backups can be created by Mango for you, and the JSON backup could be checked into Github and probably meaningfully diff'ed against subsequent changes (if you wanted, you could have a cron push the current JSON backup to github) but as Fox suggested that's probably not ideal for database files.
What I wanted to contribute here, though, was a suggestion that you see what's stored in the Audit database table in terms of dashboard designer pages, json store items and pages created through the "Edit pages" page. Every time you save, your previous code should be recorded into the audit table. In the future, we intend to supply a way to revert to a previous revision of a dashboard directly within Mango, without having to set up the revision control.