Provision database after creating a branch, optionally with base data

Related products: Software Factory

During development with the Software Factory, we usually work in branches. With every branch we make, a database would need to be created so I can test my changes in action.

It would be awesome if the Software Factory could either:

  1. Copy an existing database, based on a selected runtime configuration, or;
  2. Create a new database, based on the data model of the Origin of my branch.

Of course, this copy or create of a database should be run in the background.

Additionally, a great nice-to-have would be that I can list base data for my tables in the data model. This would look similar to Mock data, or Data sets used for Unit tests. But this can be left out of scope for the original idea.

NewOpen

@HarryA We have point 1 covered in our Deployment project, right? Could you add our solution as inspiration to this Idea?


@HarryA We have point 1 covered in our Deployment project, right? Could you add our solution as inspiration to this Idea?

Yes but not exactly, i’ll give a brief explanation of our solution. What’ve build is a dedicated Deployment project that we use to upgrade our applications using the concepts explained here. However, before starting the upgrade we create a backup of the DB so if we’ve messed something up we can easily restore this. We store these backups in an AWS S3 bucket (like this for anyone interested) , and write the location of these back-ups to a table in the Deployment project. This way we always have a relative new back-up.

For the actual branching we’ve created a task in the Deployment project. In this task you can specify the branch name and this wel kick-off the branching project. First we make an indicium call using an HTTP connector to kick-off the actual branching, after this we look in the back-up table to see what the most recent backup is and restore it under the same name as the branch. Lastly we update the runtime config in the SF with some code to configure our new branch. 

 


Hello @Mark Jongeling , this sounds great! Is this something we can expect being implemented in de Software Factory and if so, when can we expect it? Will creating the branche also result into copying the runtime config and it’s corresponding users for which this runtime config is enabled from the trunk to the branche as well?


Hello @HarryA , this sounds great! Is this something we can expect being implemented in de Software Factory and if so, when can we expect it? Will creating the branche also result into copying the runtime config and it’s corresponding users for which this runtime config is enabled from the trunk to the branche as well?

See i tagged you Harry, but the question was actually meant for @Mark Jongeling to see if this could be included in his idea as well.


Hello @HarryA , this sounds great! Is this something we can expect being implemented in de Software Factory and if so, when can we expect it? Will creating the branche also result into copying the runtime config and it’s corresponding users for which this runtime config is enabled from the trunk to the branche as well?

Well, it's just an Idea so we haven't planned it yet. I posted it here to see how many votes the idea would get. The 2023.1 release is just around the corner and we are looking what to include into 2023.2.

Whilst part 2 of the idea is relatively simple as we already have Data sets for Unit tests, part 1 will be quite tricky as we of course would need to implement and support it for every RDBMS and Cloud platform we support.

At the moment, whoever creates a branch will automatically have this branch as his/her “My models”; sort of like Favorites. Others will have to include the branch in their My models list. We have created a Task at both Model and Branch screens to easily add them. You can create a separate idea for linking new branches automatically to all users that had the Origin branch in their My models list.


Hello @Mark Jongeling , this sounds great! Is this something we can expect being implemented in de Software Factory and if so, when can we expect it? Will creating the branche also result into copying the runtime config and it’s corresponding users for which this runtime config is enabled from the trunk to the branche as well?

Please don't do this by default! We wish to have individual developers to each work in their own Branch and not automatically add all Trunk users to all Branches.


Hello @Mark Jongeling , this sounds great! Is this something we can expect being implemented in de Software Factory and if so, when can we expect it? Will creating the branche also result into copying the runtime config and it’s corresponding users for which this runtime config is enabled from the trunk to the branche as well?

Please don't do this by default! We wish to have individual developers to each work in their own Branch and not automatically add all Trunk users to all Branches.

We'll certainly not change this behavior by default. If anything, it will be a checkbox to either copy all or only yourself.