Skip to content

Commit 36a4061

Browse files
authored
Merge pull request #294 from Luap99/contributing
update CONTRIBUTING docs with new links and new module layout
2 parents bc4f2a2 + ded0323 commit 36a4061

File tree

6 files changed

+33
-24
lines changed

6 files changed

+33
-24
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Please read the [contributing guidelines](https://github.com/containers/common-files/blob/master/CONTRIBUTING.md) of the [Containers Group Project](https://github.com/containers).
1+
Please read the [contributing guidelines](https://github.com/containers/container-libs/blob/main/CONTRIBUTING.md) of the [Containers Group Project](https://github.com/containers).

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!--- Please read the [contributing guidelines](https://github.com/containers/common-files/blob/master/.github/CONTRIBUTING.md) before proceeding --->
1+
<!--- Please read the [contributing guidelines](https://github.com/containers/container-libs/blob/main/CONTRIBUTING.md) before proceeding --->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!--- Please read the [contributing guidelines](https://github.com/containers/common-files/blob/master/.github/CONTRIBUTING.md) before proceeding --->
1+
<!--- Please read the [contributing guidelines](https://github.com/containers/container-libs/blob/main/CONTRIBUTING.md) before proceeding --->

CODE-OF-CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Containers Logo](https://github.com/containers/common/blob/main/logos/containers-full-horiz.png)
1+
![Containers Logo](https://github.com/containers/.github/blob/main/profile/logos/containers-full-horiz.png)
22
## Containers Community Code of Conduct
33

44
### Contributor Code of Conduct

CONTRIBUTING.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ This document applies to the following projects:
1212
- [podman](https://github.com/containers/podman)
1313
- [buildah](https://github.com/containers/buildah)
1414
- [skopeo](https://github.com/containers/skopeo)
15-
- [common](https://github.com/containers/common)
16-
- [image](https://github.com/containers/image)
17-
- [storage](https://github.com/containers/storage)
15+
- [container-libs](https://github.com/containers/container-libs)
1816
- [libhvee](https://github.com/containers/libhvee)
1917
- [psgo](https://github.com/containers/psgo)
2018
- [netavark](https://github.com/containers/netavark)
@@ -34,6 +32,10 @@ However, most of the things here listed are very generic and apply when contribu
3432

3533
* [Reporting Issues](#reporting-issues)
3634
* [Submitting Pull Requests](#submitting-pull-requests)
35+
* [Describe your Changes in Commit Messages](#describe-your-changes-in-commit-messages)
36+
* [Sign your PRs](#sign-your-prs)
37+
* [Code review](#code-review)
38+
* [Rebasing](#rebasing)
3739
* [Find bad changes with git bisect](#find-bad-changes-with-git-bisect)
3840

3941
## Reporting Issues
@@ -136,7 +138,7 @@ It’s important to describe the change in plain English for the reviewer to ver
136138
Solve only one problem per patch.
137139
If your description starts to get long, that’s a sign that you probably need to split up your patch.
138140

139-
If the patch fixes a logged bug entry, refer to that bug entry by number and URL.
141+
If the patch fixes a logged bug entry, refer to that bug entry by number or URL.
140142
If the patch follows from a mailing list discussion, give a URL to the mailing list archive.
141143
Please format these lines as `Fixes:` followed by the URL or, for Github bugs, the bug number preceded by a #.
142144
For example:

CONTRIBUTING_GO.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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

3231
However 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

3938
Or 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+
5056
Then commit the changes and open a PR. If you want to add other changes it is recommended to keep the
5157
dependency 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

5864
Sometimes 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).
6268
Now 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

7177
Then 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
8894
the problem is in that library instead. In such cases it may be needed to find the bad commit from this
8995
repository 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,
9299
I assume it is in a directory next to the podman repo.
93100

94101
Then 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

Comments
 (0)