Code Review Process
Introduction
After connecting to an external Git repository, to make full use of you new setup, you can enforce a pull request & code review process.
Example workflow with Code Review
Aside from the steps in the default workflow with version control in Holistics, the code review process should happen before Deployment.
In AML Studio, after a data developer Commit and Push their code, instead of clicking Deploy to production right away, they should go through the code review process as follow:
- The data developer goes to the external Git repository, and create a Pull Request (PR), then ask for a review from another team member.
- If the PR is approved, the developer merges the PR to the
master
/main
branch. Then go back to Holistics AML studio and click Deploy to Production. - If the reviewer requests some changes, the developer should go back to AML studio, modifies as requested, and push again.
How to enforce the Code Review process
Currently, Holistics have not implemented an internal code review feature similar to that of GitHub/GitLab, and users can deploy directly to production right after committing.
To make sure the changes must go through a review before deployment, you can use the Branch Protection feature of GitHub / GitLab. For example, in GitHub:
Go to your GitHub repository, go to Settings -> Branches -> Add branch protection rule. Input
master
to the Branch name pattern field, and select any protection rule you need. Require a pull request before emerging is a must.Now you will not be able to to deploy to production without first creating a Pull Request (PR). In this step, you must use option
Create a merge commit
instead ofSquash and merge
orRebase and merge
.The reason is that our Git Actions depend on Commit History. Thus, if you use either
Squash and Merge
orRebase and merge
methods, the commit history is modified so that Holistics cannot detect if the deployed commit is merged to master or not.After the PR has been successfully merged to
master
, return to Holistics and click Deploy to Production.
Here is a video demonstrating the whole process:
You can learn more about this process via the official docs of the Git providers: