@@ -7,14 +7,13 @@ At present, this means the following repositories:
77- [ podman] ( https://github.com/containers/podman )
88- [ buildah] ( https://github.com/containers/buildah )
99- [ skopeo] ( https://github.com/containers/skopeo )
10- - [ common] ( https://github.com/containers/common )
11- - [ image] ( https://github.com/containers/image )
12- - [ storage] ( https://github.com/containers/storage )
10+ - [ container-libs] ( https://github.com/containers/container-libs )
1311- [ libhvee] ( https://github.com/containers/libhvee )
1412- [ psgo] ( https://github.com/containers/psgo )
1513
1614## Topics
1715
16+ * [ Unit Tests] ( #unit-tests )
1817* [ Go Dependency updates] ( #go-dependency-updates )
1918* [ Testing changes in a dependent repository] ( #testing-changes-in-a-dependent-repository )
2019* [ git bisect a change in a Go dependency] ( #git-bisect-a-change-in-a-go-dependency )
@@ -31,22 +30,29 @@ The bot automatically opens new PRs with updates that should be merged by mainta
3130
3231However sometimes, especially during development, it can be the case that you like to update a dependency.
3332
34- To do so you can use the ` go get ` command, for example to update containers/ storage to the a specific version use:
33+ To do so you can use the ` go get ` command, for example to update the storage library to the a specific version use:
3534```
36- $ go get github.com/containers/ storage@v1.55.1
35+ $ go get go.podman.io/ storage@v1.60.0
3736```
3837
3938Or to update it to the latest commit from main use:
4039```
41- $ go get github.com/containers /storage@main
40+ $ go get go.podman.io /storage@main
4241```
4342
44- This command will update the go.mod/go.sum files, because we use [ go's vendor mechanism] ( https://go.dev/ref/mod#vendoring )
45- you must also update the files in the vendor dir. To do so use
43+ This command will update the go.mod/go.sum files, in some repos we use [ go's vendor mechanism] ( https://go.dev/ref/mod#vendoring )
44+ so there you must also update the files in the vendor dir. To do so use:
4645```
4746$ make vendor
4847```
4948
49+ If you are working in the [ container-libs] ( https://github.com/containers/container-libs ) monorepo use:
50+ ```
51+ make tidy
52+ ```
53+ This command syncs the dependency versions across all modules in the repo.
54+
55+
5056Then commit the changes and open a PR. If you want to add other changes it is recommended to keep the
5157dependency updates in their own commit as this makes reviewing them much easier.
5258
@@ -57,16 +63,16 @@ dependencies to ensure all our tools use the same properly tested library versio
5763
5864Sometimes it is helpful (or a maintainer asks for it) to test your library changes in the final binary, e.g. podman.
5965
60- Assume we like to test a containers /common PR in Podman so that we can have the full CI tests run there.
61- First you need to push your containers /common changes to your github fork (if not already done).
66+ Assume we like to test a container-libs /common PR in Podman so that we can have the full CI tests run there.
67+ First you need to push your container-libs /common changes to your github fork (if not already done).
6268Now open the podman repository, create a new branch there and then use.
6369```
64- $ go mod edit -replace github.com/containers/ common=github.com/<account name>/<fork name>@<branch name>
70+ $ go mod edit -replace go.podman.io/ common=github.com/<account name>/<fork name>/common @<branch name>
6571```
66- Replace the variable with the correct values, in my case it the reference might be ` github.com/Luap99/common@netns-dir ` , where
72+ Replace the variable with the correct values, in my case it the reference might be ` github.com/Luap99/container-libs/ common@myfeature ` , where
6773 - account name == ` Luap99 `
68- - fork name == ` common `
69- - branch name that I like to test == ` netns-dir `
74+ - fork name == ` container-libs `
75+ - branch name that I like to test == ` myfeature `
7076
7177Then just run the vendor command again.
7278```
@@ -88,12 +94,13 @@ If you performed a the git bisect and the resulting commit is one that updated a
8894the problem is in that library instead. In such cases it may be needed to find the bad commit from this
8995repository instead. Thankfully this is not much more difficult than the normal bisect usage.
9096
91- Clone the library repository locally (for this example assume we it is github.com/containers/storage),
97+ Clone the library repository locally (for this example we assume it is github.com/containers/container-libs)
98+ which contains the storage library as module in a subdirectory,
9299I assume it is in a directory next to the podman repo.
93100
94101Then in podman run (where you replace the path to the storage repo with your actual one)
95102```
96- $ go mod edit -replace github.com/containers/ storage=/path/to/storage
103+ $ go mod edit -replace go.podman.io/ storage=/path/to/container-libs /storage
97104$ make vendor
98105```
99106
0 commit comments