This document explain the process of contributing to the Thanos project.
First of all please follow the code of conduct in all your interactions with the project.
The philosophy of Thanos and our community is borrowing much from UNIX philosophy and the golang programming language.
If you encounter any issue or you have an idea to improve, please:
If you encounter security vulnerability, please refer to Reporting a Vulnerability process
When contributing not obvious change to Thanos repository, please first discuss the change you wish to make via issue or slack, or any other method with the owners of this repository before making a change.
Adding a large new feature or/and component to Thanos should be done by first creating a proposal document outlining the design decisions of the change, motivations for the change, and any alternatives that might have been considered.
Thanos is a distributed system composed with several services and CLI tools as listed here.
When we refer to them as technical reference we use verb form:
query. This includes:
However, when speaking about those or explaining we use
actor noun form:
store gateway, compactor, ruler, querier. This includes areas like:
$ mkdir -p $GOPATH/src/github.com/thanos-io $ cd $GOPATH/src/github.com/thanos-io $ git clone https://github.com/<your_github_id>/thanos.git $ cd thanos $ git remote add upstream https://github.com/thanos-io/thanos.git $ git remote update $ git merge upstream/master $ make build $ ./thanos -h
$ git checkout master $ git remote update $ git merge upstream/master $ git checkout -b <your_branch_for_new_pr> $ make build $ <Iterate your development> $ git push origin <your_branch_for_new_pr>
If you skip all of these, the store specific tests will be run against memory object storage only. CI runs GCS and inmem tests only for now. Not having these variables will produce auth errors against GCS, AWS, Azure or COS tests.
#thanos-prschannel on our slack for review!
The Thanos project uses Go modules to manage dependencies on external packages. This requires a working Go environment with version 1.11 or greater and git installed.
To add or update a new dependency, use the
go get command:
# Pick the latest tagged release. go get example.com/some/module/pkg # Pick a specific version. go get example.com/some/module/pkg@vX.Y.Z
Tidy up the
make deps git add go.mod go.sum git commit
You have to commit the changes to
go.sum before submitting the pull request.