You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INSTA-31060 INSTANA_README: fix tag creation, add patching/release info (#16)
* INSTANA_README: fix tag creation, add patching/release info
Fix the description of how to create a tag after the synch: incorporate
the procedure of how to retrieve the last upstream commit and indicate
where exactly you need to write it in the tag message.
Add patching and release info.
The patching mechanism was completely missing from the README, now it is
explained in detail.
The Release procedure is explained and detailed with an Example, based
on the latest Release.
Details of where to find the pipelines in IBM Cloud are given.
* INSTANA_README: add Example in patching
Copy file name to clipboardExpand all lines: INSTANA_README.md
+83-9Lines changed: 83 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,8 +54,8 @@ It is very likely that you will receive a list of conflicts: be sure to copy pas
54
54
4. Solve conflicts
55
55
To solve a conflict, open the file with the conflict. The "HEAD" is the content of the downstream `synch_<year>_<n>_wip` branch, the other stream comes from the upstream's `main` branch.
56
56
Once you identify what is the correct content of the file, save the file and run
57
-
`git add <file>
58
-
when you solved all the conflicts, you are ready to finalize your Merge. If you are not able to solve all the conflicts, go to "partial merges" section.
57
+
`git add <file>`
58
+
When you solve all the conflicts, you are ready to finalize your Merge. If you are not able to solve all the conflicts, go to "partial merges" section.
59
59
60
60
5. How to finalize your merge
61
61
Before doing this, be sure to have the following directory ready somewhere else:
@@ -65,29 +65,38 @@ Execute
65
65
if it is needed, execute
66
66
`git push --force origin synch_2025_01_wip`
67
67
Be careful when you format the Merge Message.
68
-
Format the first line of the commit message as `Sync from upstream (yeah-month-day)`
68
+
Format the first line of the commit message as `Sync from upstream (year-month-day)`
69
69
Format the body of the message as a list of commit messages, coming from the upstream. Be sure to mention Author and Co-author, for every commit.
70
70
You can view this info executing the following command on the local clone of the upstream's opentelemtry-ebpf-profiler:
This format shows the commit hash, author, and commit message, and if there are co-authors, it will display them under "Co-authored-by".
79
81
80
-
6. Open a PR from branch `synch_2025_01_wip`.
81
-
When manual testing is finished and the Pr is approved and merged on `main`, you are ready to create a synch tag.
82
+
6. Open a PR from the synch branch, for example from`synch_2025_01_wip`.
83
+
When manual testing is finished and the PR is approved and merged on `main`, you are ready to create a synch tag.
82
84
83
-
7. Create the tag of the latest synch commit.
85
+
7. Note down the last commit merged from the upstream in the Synch PR
86
+
The merged PR commits can be seen in the GitHub interface in the Conversation or in the Commits section.
87
+
Check the commits before your merge commit, and note down its value: it is really important, since this is a code for releasing the software!
84
88
89
+
8. Create the tag of the latest synch commit.
90
+
91
+
Attention: you need the value <last-upstream-commit>, calculated in the previous step.
85
92
Checkout the local branch main, with HEAD origin/main:
86
93
`git checkout main`
87
94
Be sure you have all the recent updates:
88
95
`git pull`
96
+
Create a new tag in the following exact way (otherwise you break our release pipeline):
89
97
```
90
-
git tag -a synch_<year>_<n> -m "Synch <year> number <n>"
98
+
tag-name = synch_<year>_<n> # compose the tag-name carefully
99
+
git tag -a <tag-name> -m "Synch <year> number <n> upstream commit <last-upstream-commit>"
91
100
git push origin <tag-name>
92
101
```
93
102
@@ -107,8 +116,73 @@ To resolve the merge conflict by choosing the upstream version for binary files,
107
116
108
117
When merging from the upstream, there can be so many complicated conflicts in one commit, that you prefer to stop merging and continue later on after checking more indepently how to re-apply the conflicting commit. But the problem with aborting a merge after you solved a few conflicting commits already is that you “lose” the work you did on fixing those. To not lose partial work, you can "Partially rebase your tree".
109
118
110
-
You have fixed already a few conflicting commits, but then you hit a big conflict and want to stop the merge. To save your rebase progress, you need to just save your current HEAD.
119
+
You have fixed already a few conflicting commits, but then you hit a big conflict and want to stop the merge. To save your rebase progress, you need to just save your current `HEAD`.
111
120
So from this very point, create a branch:
112
121
```
113
122
git branch synch_<year>_<n>_partial
114
123
```
124
+
125
+
## The Patching system
126
+
127
+
The release pipeline applies patches on top of a tag, this is why is so important to create a tag with the correct name.
128
+
To create n patches from the last tag, apply the following command:
129
+
```
130
+
git format-patch -<n> HEAD
131
+
```
132
+
You will notice that <n> files are created.
133
+
You want to create patches for all the commits done after the last synch.
Now you need to add the patches to the correct repository.
154
+
155
+
Clone locally the repository https://github.ibm.com/instana/ebpf-profiler-cicd, create a branch checking-out from `main` branch and add the patch file(s) in the directory `patches`, paying attention to:
156
+
1. Substitute the hyphens with underscores
157
+
2. Simplify the file name
158
+
3. Modify the file name to start with a sequential number, respecting the order of the patches already present in the directory `patches`.
159
+
4. Reach the pipeline `epbf-profiler-patch-and-build` at
`scripts-repo-branch` from `main` to the branch of ebpf-profiler-cd where the new patches were added
163
+
`repotag` to the last synch tag
164
+
5. Run the manual trigger: if there are no errors, you are ready to release :-)
165
+
166
+
## Release process
167
+
168
+
When a new tag is created, and the testing described in the section [The Patching system](#the-patching-system) are successful, you are ready to release.
0 commit comments