Skip to content

Commit 6654ea5

Browse files
committed
docs: HCC processes
From working session with Daniel Franco today
1 parent 9320089 commit 6654ea5

File tree

1 file changed

+102
-15
lines changed

1 file changed

+102
-15
lines changed

docs/hcc.md

Lines changed: 102 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,55 @@
1-
# git-source-control for Health Connect Cloud Overview
2-
3-
## Development Workflow
4-
5-
git-source-control has two main use modes: Basic and Expert. For Health Connect Cloud, we recommend beginning with Basic Mode, since it includes all of the necessary functionality for proper source control development while being easy to use for those with less Git experience. The recommended workflow for Health Connect Cloud is to create interface branches, create merge requests into development, and then pull the changes into the main dev development namespace.
6-
7-
A Health Connect Cloud Dev deployment will have a main namespace (which is also present in Test and Prod) and should also have a dedicated namespace for each developer contributing. These namespaces can be configured via the Cloud Portal. It is important for changes to originate in developer-specific namespaces; the main namespace in the dev deployment should always be kept up to date with the development branch in GitLab, either through a CI/CD pipeline or by use of the Git Pull page from git-source-control.
1+
# Change Control with Embedded Git for Health Connect Cloud
2+
3+
## Glossary
4+
# TODO: move to end and move definitions inline
5+
* User Namespace: a namespace dedicated for in-progress work by a particular Health Connect Cloud user.
6+
* Protected Namespace: a namespace that exists with the same name in all deployments (Dev, Test, and Prod) in which the main interoperability production runs. Changes to protected namespaces are applied through CI/CD only.
7+
* Deployment: a Health Connect Cloud instance accessible through the Cloud Portal. There is typically a Dev, Test, and Prod deployment for each organization.
8+
* Dev Deployment: the Health Connect Cloud instance with a User Namespace for each user and one or more Protected Namespaces in which all development work originates
9+
* Test Deployment: the Health Connect Cloud instance in which interoperability components are tested prior to deployment to Prod.
10+
* Prod Deployment: the Health Connect Cloud instance serving actual production systems with interoperability.
11+
* protected branch: a branch in Git to which all commits must originate from a merge request
12+
* development branch: the protected branch associated with a Protected Namespace in the Dev Deployment. This branch is automatically present in the GitLab repository.
13+
* test branch: the protected branch associated with a Protected Namespace in the Test Deployment. This branch is automatically present in the GitLab repository.
14+
* live branch: the protected branch associated with a Protected Namespace in the Prod Deployment. This branch is automatically present in the GitLab repository.
15+
16+
## General
17+
18+
The recommended workflow for Health Connect Cloud is to: create an interface branch, make changes, sync them to GitLab, create a merge request, review and approve the merge request, and then pull the changes into a protected namespace.
19+
20+
# TODO: attach git strategy powerpoint images
21+
22+
A Health Connect Cloud Dev deployment will have at least one Protected Namespace and should also have a dedicated User Namespace for each user. These namespaces can be configured via the Cloud Portal for the selected Health Connect Cloud deployment. It is important for changes to originate in User Namespaces. Protected Namespaces in the Dev deployment must always be kept up to date with the development branch of the associated GitLab repo, either through a CI/CD pipeline or by use of the Git Pull page from Embedded Git.
23+
# TODO: picture of GitLab/deployment/branch relationship
24+
25+
# InterSystems Responsibilities
26+
- Create GitLab Repository for the Organization
27+
- Grant appropriate access and privileges to the GitLab Repository
28+
- Onboard Customers on Source Control Tools for Health Connect Cloud
29+
- Update Change Control Documentation and Videos
30+
- [Official Change Control Documentation](https://docs.intersystems.com)
31+
- [Learning Videos](https://learning.intersystems.com/course/view.php?name=HCCSourceControlUI)
32+
33+
# Customer Responsibilities
34+
35+
# Example Use Case 1: Inbound HL7 Service
36+
> As a Health Connect Cloud user, I want to add a new inbound HL7 service to receive HL7 messages from a lab.
37+
38+
- Log in
39+
- Go to production configuration page for your User Namespace
40+
- Create an interface branch
41+
- Add the service
42+
- Test the service
43+
- Sync: After this operation, the User Namespace has everything from the Protected Namespace in addition to changes made in the interface branch, and all of the modified files have been pushed to GitLab.
44+
- Technical level for the git-savvy: this commits to the interface branch locally, rebases the interface branch on the latest state of the development branch, updates the User Namespace with any changes made as a result, and force pushes the interface branch out to GitLab.
45+
- Click the link to create a merge request
46+
- Have the merge request approved and merged to the development branch
47+
- CI/CD deploys to the Protected Namespace on the Dev deployment OR use Git Pull page
48+
- Test in the Protected Namespace on the Dev Deployment
849

950
### Interface Branches
1051

11-
The first step in making changes in Health Connect Cloud using git-source-control is making an interface (feature) branch. To start out, you should be in your own personal development namespace. In order for changes to be tracked by source control properly, each change (also called a feature) should be made on it's own branch, so as to not interfere with other changes, and allow for testing of its effects on the production environment. To create a new feature branch, use the source control menu and select "Create new branch".
52+
The first step in making changes in Health Connect Cloud using Embedded Git is making an interface (feature) branch. To start out, you should be in your own personal development namespace. In order for changes to be tracked by source control properly, each change (also called a feature) should be made on it's own branch, so as to not interfere with other changes, and allow for testing of its effects on the production environment. To create a new feature branch, use the source control menu and select "Create new branch".
1253

1354
![Creating a new branch](images/hcc/newbranchmenu.png)
1455

@@ -34,9 +75,9 @@ Use the link in the output of the sync in order to create a merge request in the
3475

3576
### Switching Branches
3677

37-
Suppose you begin working on a larger project in one branch, and then need to shift to something else. The proper approach to this in git-source-control is to commit your in-progress work on the first interface, and then to switch to a new branch. This branch will be based on the development branch and may be missing components from the first project, but that's OK. You can always switch back to the first interface branch to continue work there.
78+
Suppose you begin working on a larger project in one branch, and then need to shift to something else. The proper approach to this in Embedded Git is to commit your in-progress work on the first interface, and then to switch to a new branch. This branch will be based on the development branch and may be missing components from the first project, but that's OK. You can always switch back to the first interface branch to continue work there.
3879

39-
## Configuring Git on a New Namespace
80+
### Configuring Git on a New Namespace
4081

4182
When creating a new namespace on the Health Connect instance, you will need to ensure that the Git configuration matches that in other namespaces. The steps to do so are:
4283

@@ -52,18 +93,64 @@ When creating a new namespace on the Health Connect instance, you will need to e
5293

5394
![Import All (Force)](images/hcc/importallforce.png)
5495

55-
## Deploying Changes to the Main Dev Namespace
96+
### Deploying Changes to the Main Dev Namespace
5697

5798
If you are using a CI/CD pipeline in GitLab, simply merging the feature branch to development is enough; your change will be deployed to the main development namespace automatically.
5899

59100
If you are not using a CI/CD pipeline, you can get merged changes into the main development namespace using the "Git Pull" link from the Favorites section in the Health Connect Cloud home page. This will load and compile the incremental set of changes from new commits to the development branch.
60101

61-
## Deploying Changes to Test and Prod
102+
### Deploying Changes to Test and Prod
62103

63-
### Deploying using CI/CD Pipelines
104+
#### Deploying using CI/CD Pipelines
64105

65106
With CI/CD pipelines in place, the most important thing is that there is a branch in GitLab that corresponds to the main namespace in Test and another that corresponds to the main namespace on Prod, so that you can see exactly when changes made it to each branch/environment. With CI/CD pipelines, there's no action needed to move the change forward - merging the merge request is sufficient. The recommended workflow for this is to create additional merge requests from the interface branch to each of Test and Prod. Other Git branching and change flows may be appropriate if you have a strong opinion about them.
66107

67-
### Deploying using the Deployment Manager
68108

69-
Another way to move work from the main Dev namespace to the corresponding namespace in Test and Prod environments is using the Deployment Manager to move from Dev to Test, then Test to Prod. This loses the traceability of a clean branch-to-environment mapping, but is perhaps simpler technically and involves less time wrangling merge requests in GitLab. For guidance on using the deployment manager, see [InterSystems Documentation](https://docs.intersystems.com/irisforhealthlatest/csp/docbook/Doc.View.cls?KEY=EGDV_deploying).
109+
### Change Control Workflow for Code Deployment to Target Environment
110+
111+
This guide provides step-by-step instructions for developers on how to perform code changes and move code from a local repository to a target environment using a Change Control tool based on VSCode and GitLab.
112+
113+
## Persona: Developer
114+
115+
> Example Use Case: As a Interface Engineer, I want to create a new Adapter to a Production and configure it with a new DTL class created via VSCode.
116+
117+
118+
### **(*Optional*) Create an Issue**
119+
- If necessary, create an issue in GitLab to describe the work to be done and document any requirements. This can help track progress and serve as a reference for the changes made.
120+
121+
### **Create New Branch via GitLab**
122+
- Navigate to the GitLab repository and create a new branch. This branch will serve as the workspace for your changes.
123+
- Branch naming should follow your team's conventions (e.g., `feature/issue-1234`).
124+
125+
### **Perform Change in Health Connect Cloud**
126+
- Make the necessary modifications in Health Connect Cloud according to your issue's requirements or planned changes.
127+
- Ensure that changes are tested and validated locally to avoid issues downstream.
128+
129+
### **Export Change from Health Connect Cloud to VSCode**
130+
- Export the updated components or files from Health Connect Cloud and open them in VSCode.
131+
- This ensures your local repository reflects the changes you made in the cloud environment.
132+
133+
#### **Review Changes in VSCode**
134+
- Review the changes within VSCode to confirm they are accurate and meet the requirements outlined in the issue (if applicable).
135+
- Ensure the code adheres to coding standards and best practices.
136+
137+
#### **Add Commit Remarks**
138+
- Add detailed commit remarks in VSCode to describe the changes. This helps other team members understand the purpose and details of the update.
139+
140+
#### **Commit Change in VSCode**
141+
- Commit the reviewed and validated changes in VSCode. Use the commit message format that aligns with your team's guidelines.
142+
143+
#### **Sync Reviewed Changes in VSCode**
144+
- Push the committed changes from VSCode to the corresponding branch in GitLab. This step synchronizes your local updates with the remote repository.
145+
146+
### **Merge Changes in GitLab from Local Repository to Target Environment**
147+
- After confirming that all necessary changes are pushed, prepare to merge from your feature branch to the target environment (e.g., development, test or production).
148+
149+
#### **Create New Merge Request from Local to Target Environment**
150+
- In GitLab, create a new Merge Request (MR) from your feature branch to the target environment.
151+
- Include relevant details in the MR description, such as the issue number, summary of changes, and any additional notes.
152+
- Assign reviewers or approvers as required.
153+
154+
#### **Review and Approval**
155+
- Wait for the required reviews and approvals before merging.
156+
- After the MR is approved, complete the merge to move the code to the target environment.

0 commit comments

Comments
 (0)