Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Thanos to latest main #4585

Merged
merged 2 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* [ENHANCEMENT] Query Frontend: Add setting `-frontend.forward-headers-list` in frontend to configure the set of headers from the requests to be forwarded to downstream requests. #4486
* [BUGFIX] AlertManager: remove stale template files. #4495
* [BUGFIX] Distributor: fix bug in query-exemplar where some results would get dropped. #4582
* [BUGFIX] Update Thanos dependency: compactor tracing support, azure blocks storage memory fix. #4585

## 1.11.0 2021-11-25

Expand Down
7 changes: 2 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ require (
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb
github.com/felixge/fgprof v0.9.1
github.com/fsouza/fake-gcs-server v1.7.0
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.0
github.com/go-openapi/strfmt v0.21.0
github.com/go-openapi/swag v0.19.15
Expand All @@ -32,8 +31,6 @@ require (
github.com/gorilla/mux v1.8.0
github.com/grafana/dskit v0.0.0-20211021180445-3bd016e9d7f1
github.com/json-iterator/go v1.1.12
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/lib/pq v1.3.0
github.com/minio/minio-go/v7 v7.0.10
github.com/mitchellh/go-wordwrap v1.0.0
Expand Down Expand Up @@ -86,8 +83,8 @@ replace google.golang.org/grpc => google.golang.org/grpc v1.38.0
// We only pin this version to avoid problems with running go get: github.com/thanos-io/thanos@main. That
// currently fails because Thanos isn't merging release branches to main branch, and Go modules system is then
// confused about which version is the latest one. v0.22.0 was released in July, but latest tag reachable from main
// is v0.19.1. We pin version from late september here. Feel free to remove when updating to later version.
replace github.com/thanos-io/thanos v0.22.0 => github.com/thanos-io/thanos v0.19.1-0.20211122085937-de0e3848ff60
// is v0.19.1. We pin version from early December here. Feel free to remove when updating to later version.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: is the pin still necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanos release tags are still not on the main branch. This replace pattern allowed me to simply put main on this line, and then go mod vendor correctly resolved it to v0.19.1-0.20211122085937-de0e3848ff60.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.
The comment above says it's about merging release branches, but this kinda looks like a merge of the release branch: thanos-io/thanos#4738
Did it not work? Not what Go is expecting?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a squash merge, not merge commit. It didn't make tag v0.23.1 reachable from main branch.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to update release process instructions in Thanos at thanos-io/thanos#4770 to hopefully fix this situation in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for filing thanos-io/thanos#4770 @pstibrany!

Did it not work? Not what Go is expecting?

So we can do a go get on a release tag, and it works:

$ go get github.com/thanos-io/[email protected]
$ go mod vendor
$ git diff
...
-       github.com/thanos-io/thanos v0.22.0
+       github.com/thanos-io/thanos v0.24.0-rc.1
-replace github.com/thanos-io/thanos v0.22.0 => github.com/thanos-io/thanos v0.19.1-0.20211208205607-d1acaea2a11a
+// replace github.com/thanos-io/thanos v0.22.0 => github.com/thanos-io/thanos v0.19.1-0.20211208205607-d1acaea2a11a

... I don't know how important it is that we be able to do go get github.com/thanos-io/thanos@main, but that still doesn't work:

$ go get github.com/thanos-io/thanos@main
go: downloading github.com/thanos-io/thanos v0.19.1-0.20211213141611-c7a44e23febe
go get: github.com/thanos-io/thanos@main (v0.19.1-0.20211213141611-c7a44e23febe) requires github.com/thanos-io/[email protected], not github.com/thanos-io/thanos@main (v0.19.1-0.20211213141611-c7a44e23febe)

So I guess we have a few options:

  1. Leave as-is, wait for Add step for merging release branch back to main. thanos-io/thanos#4770.
  2. Remove the replace and the comment, require v0.24.0-rc.1 directly.
  3. Remove the replace and the comment, wait for v0.24.0 and require it directly.

replace github.com/thanos-io/thanos v0.22.0 => github.com/thanos-io/thanos v0.19.1-0.20211208205607-d1acaea2a11a

// Pin aws-sdk to version prior to go-kit update, to reduce the bulk of change.
// Un-pin once Cortex 1.11 is released.
Expand Down
98 changes: 4 additions & 94 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion vendor/github.com/google/btree/btree.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions vendor/github.com/google/btree/go.mod

This file was deleted.

4 changes: 2 additions & 2 deletions vendor/github.com/thanos-io/thanos/pkg/block/block.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/thanos-io/thanos/pkg/block/fetcher.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/thanos-io/thanos/pkg/block/index.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/thanos-io/thanos/pkg/block/writer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions vendor/github.com/thanos-io/thanos/pkg/cache/inmemory.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions vendor/github.com/thanos-io/thanos/pkg/cache/memcached.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 69 additions & 0 deletions vendor/github.com/thanos-io/thanos/pkg/cache/redis.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading