Skip to main content
Open

Provision database after creating a branch, optionally with base data

Related products:Software Factory
  • November 24, 2022
  • 8 replies
  • 118 views

Mark Jongeling
Administrator

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.

Did this topic help you find an answer to your question?

8 replies

Jeroen van den Belt
Administrator
Forum|alt.badge.img+9
NewOpen

Arie V
Community Manager
Forum|alt.badge.img+12
  • Community Manager
  • 999 replies
  • November 24, 2022

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


Forum|alt.badge.img+5
  • Captain
  • 47 replies
  • November 24, 2022
Arie V wrote:

@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. 

 


Forum|alt.badge.img+4
  • Warrior
  • 37 replies
  • November 25, 2022

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?


Forum|alt.badge.img+4
  • Warrior
  • 37 replies
  • November 25, 2022
BramG wrote:

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.


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Author
  • Administrator
  • 3945 replies
  • November 25, 2022
BramG wrote:

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.


Arie V
Community Manager
Forum|alt.badge.img+12
  • Community Manager
  • 999 replies
  • November 25, 2022
BramG wrote:

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.


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Author
  • Administrator
  • 3945 replies
  • November 28, 2022
Arie V wrote:
BramG wrote:

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. 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings