edgexfoundry / edgexfoundry/cd-management
v2.1.0 not reachable from the main branch
- Dominant language
- No language data
- Stars
- 6
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
The `v2.1.0` tag is not reachable from the main branches on [projects with LTS](https://wiki.edgexfoundry.org/pages/viewpage.action?pageId=70948690). This is only relevant to Go projects.
The reason is that the `v2.1.0` tag is associated to a commit that checks-in the the `vendor` directory inside the `jakarta` branch (e.g. https://github.com/edgexfoundry/edgex-go/commit/b350bc7f0b5978358426c58bec3f554618d1aae9)
To verify:
```
$ git tag --help
...
--merged []
Only list tags whose commits are reachable from the specified commit (HEAD if not specified).
--no-merged []
Only list tags whose commits are not reachable from the specified commit (HEAD if not specified).
...
```
```
$ git clone https://github.com/edgexfoundry/edgex-go.git
$ git checkout main
$ git tag --merged | tail -n 15
v2.0.1-dev.96
v2.0.1-dev.97
v2.0.1-dev.98
v2.0.1-dev.99
v2.2.0-dev.1 <--------- jumped from 2.0.1-x to 2.2.0-x
v2.2.0-dev.10
v2.2.0-dev.11
v2.2.0-dev.2
v2.2.0-dev.3
v2.2.0-dev.4
v2.2.0-dev.5
v2.2.0-dev.6
v2.2.0-dev.7
v2.2.0-dev.8
v2.2.0-dev.9
$ git tag --no-merged
0.6.0
0.6.1
0.7.0
0.7.1
v1.0.0
v1.0.1
v1.1.0
v1.3.1
v2.1.0 <--------- v2.1.0 not reachable from here
$ git log v2.1.0
not in main ---------> commit b350bc7f0b5978358426c58bec3f554618d1aae9 (tag: v2.1.0, origin/jakarta)
Author: edgex-jenkins
Date: Wed Nov 17 23:34:23 2021 +0000
ci(lts-release): LTS release v2.1.0 @0e57188
...
```
As a result, we faced few issues:
1. Prior to having the first `v2.2.0-dev.X` pre-release on main, the latest `2.1.0` snap builds were being published using a `2.0.1-dev.Y` version.
2. Snapcraft was unable to fetch the tag for `v2.1.0` when setting depth to 1. This may be a problem with snapcraft on how it handles tag and depth. We fixed that by fetching the branch instead (https://github.com/edgexfoundry/edgex-go/commit/f650799c2872b5746043592dbca86bb6f356332d - see lines 816-818).
3. Cloning the repo with a **limited depth** will not fetch the tag. This could be a problem in CI systems or for a developer trying to checkout `v2.1.0` from main without fetching the entire history (there are of course workarounds to fetch the branch, if the user is aware of the underlying situation). See below:
```
$ git clone https://github.com/edgexfoundry/edgex-go.git --depth=100
Cloning into 'edgex-go'...
remote: Enumerating objects: 2166, done.
remote: Counting objects: 100% (2166/2166), done.
remote: Compressing objects: 100% (1136/1136), done.
remote: Total 2166 (delta 1074), reused 1683 (delta 810), pack-reused 0
Receiving objects: 100% (2166/2166), 921.85 KiB | 3.12 MiB/s, done.
Resolving deltas: 100% (1074/1074), done.
$ cd edgex-go
$ git tag | tail -n 15
v2.0.1-dev.96
v2.0.1-dev.97
v2.0.1-dev.98
v2.0.1-dev.99
v2.2.0-dev.1 <------- There is no v2.1.0 tag here at all, merged or unmerged
v2.2.0-dev.10
v2.2.0-dev.11
v2.2.0-dev.2
v2.2.0-dev.3
v2.2.0-dev.4
v2.2.0-dev.5
v2.2.0-dev.6
v2.2.0-dev.7
v2.2.0-dev.8
v2.2.0-dev.9
$ git checkout v2.1.0
error: pathspec 'v2.1.0' did not match any file(s) known to git
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the v2.1.0 tag and the main and jakarta branch history in the affected Go repositories. Inspect the release automation around commit f650799c2872b5746043592dbca86bb6f356332d, especially lines 816-818, and verify behavior with the git tag and shallow-clone commands shown. Done means v2.1.0 is reachable from main and can be obtained from a limited-depth clone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, go
- Domain
- ci-cd, devops, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100