Skip to content

Commit 99b3f22

Browse files
yuecongbwplotka
authored andcommitted
Add steps to build Thanos project for contributors (thanos-io#401)
* add steps to build thanos project * add more details about git workflow * typo
1 parent 91b8391 commit 99b3f22

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

CONTRIBUTING.md

+26-5
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,36 @@ Please follow the [code of conduct](CODE_OF_CONDUCT.md) in all your interactions
1010

1111
1. Read [getting started docs](docs/getting_started.md) and prepare Thanos.
1212
2. Familarize yourself with [Makefile](Makefile) commands like `format`, `build`, `proto` and `test`.
13-
3. Keep PRs as small as possible. Chain them if needed (base PR on other PRs).
14-
4. If you don't have a live object store ready add these envvars to skip tests for these:
13+
3. Fork improbable-eng/thanos.git and start development from your own fork. Here are sample steps to setup your development environment:
14+
```console
15+
$ mkdir -p $GOPATH/src/github.com/improbable-eng
16+
$ cd $GOPATH/src/github.com/improbable-eng
17+
$ git clone https://github.com/<your_github_id>/thanos.git
18+
$ cd thanos
19+
$ git add remote upstream https://github.com/improbable-eng/thanos.git
20+
$ git remote update
21+
$ git merge upstream/master
22+
$ make build
23+
$ ./thanos -h
24+
```
25+
4. Keep PRs as small as possible. For each of your PR, you create one branch based on the latest master. Chain them if needed (base PR on other PRs). Here are sample steps you can follow. You can get more details about the workflow from [here](https://gist.github.com/Chaser324/ce0505fbed06b947d962).
26+
```console
27+
$ git checkout master
28+
$ git remote update
29+
$ git merge upstream/master
30+
$ git checkout -b <your_branch_for_new_pr>
31+
$ make build
32+
$ <Iterate your development>
33+
$ git push origin <your_branch_for_new_pr>
34+
```
35+
5. If you don't have a live object store ready add these envvars to skip tests for these:
1536
- THANOS_SKIP_GCS_TESTS to skip GCS tests.
1637
- THANOS_SKIP_S3_AWS_TESTS to skip AWS tests.
1738

1839
If you skip both of these, the store specific tests will be run against memory object storage only.
1940
CI runs GCS and inmem tests only for now. Not having these variables will produce auth errors against GCS or AWS tests.
2041

21-
5. If your change affects users (adds or removes feature) consider adding the item to [CHANGELOG](CHANGELOG.md)
22-
6. You may merge the Pull Request in once you have the sign-off of at least one developers with write access, or if you
42+
6. If your change affects users (adds or removes feature) consider adding the item to [CHANGELOG](CHANGELOG.md)
43+
7. You may merge the Pull Request in once you have the sign-off of at least one developers with write access, or if you
2344
do not have permission to do that, you may request the second reviewer to merge it for you.
24-
7. If you feel like your PR waits too long for a review, feel free to ping [`#thanos-dev`](https://join.slack.com/t/improbable-eng/shared_invite/enQtMzQ1ODcyMzQ5MjM4LWY5ZWZmNGM2ODc5MmViNmQ3ZTA3ZTY3NzQwOTBlMTkzZmIxZTIxODk0OWU3YjZhNWVlNDU3MDlkZGViZjhkMjc) channel on our slack for review!
45+
8. If you feel like your PR waits too long for a review, feel free to ping [`#thanos-dev`](https://join.slack.com/t/improbable-eng/shared_invite/enQtMzQ1ODcyMzQ5MjM4LWY5ZWZmNGM2ODc5MmViNmQ3ZTA3ZTY3NzQwOTBlMTkzZmIxZTIxODk0OWU3YjZhNWVlNDU3MDlkZGViZjhkMjc) channel on our slack for review!

0 commit comments

Comments
 (0)