Skip to content

Commit

Permalink
Update CONTRIBUTING.md for Core Migration (#4944)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kruse <ctkruse99@gmail.com>

Signed-off-by: Christian Kruse <ctkruse99@gmail.com>
  • Loading branch information
c-kruse committed Jan 24, 2023
1 parent adf024a commit 124efef
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions CONTRIBUTING.md
Expand Up @@ -218,29 +218,9 @@ Once you make a change to any `*.proto` file within the **types** package, you w
Sensu uses [Go modules](https://github.com/golang/go/wiki/Modules) for managing
its dependencies.

The sensu-go repository contains multiple go modules. `github.com/sensu/sensu-go` is the main module containing the bulk of sensu's logic, and has dependencies on the other sensu-go modules.
`github.com/sensu/sensu-go/types`, `github.com/sensu/sensu-go/api/core/v2` and `github.com/sensu/sensu-go/api/core/v3` are supporting modules that define sensu's API resources.

#### Working with local dependencies

When developing changes across multiple modules in the sensu-go repository it can be helpful to use [workspaces](https://go.dev/ref/mod#workspaces) (go 1.18+) locally.

Example:
```
$ go work init && go work use . ./types ./api/core/v2 ./api/core/v3
```

#### Staging PRs changing multiple modules

If it is most convenient to review changes to multiple modules in the sensu-go repository in a single PR, we recommend that you organize commits by module.
You may then `go get` a dependency by either commit sha or pushed `-dev` tag in a subsequent commit to the dependent module.

Example CL for a PR:
```
bad91f2 (HEAD -> razzle-dazzle-feat) Add RazzleDazzle HTTP Routes to sensu-go
8171511 Bump sensu-go /api/core/v3 dependency to v1.0.1-dev
76e86d0 (tag: v1.0.1-dev) Add /api/core/v3/RazzleDazzle Resource
```
**Note:**
Historically, sensu-go contained several modules. The main application `gihub.com/sensu/sensu-go`, our api definitions `github.com/sensu/sensu-go/core/v2` and `github.com/sensu/sensu-go/core/v3`, and `github.com/sensu/sensu-go/types`.
Presently `github.com/sensu/sensu-go` is the only actively developed module in this repository, with the api definitions migrated to `github.com/sensu/core`, and the types module deprecated.

## Testing

Expand Down

0 comments on commit 124efef

Please sign in to comment.