diff --git a/.bingo/Variables.mk b/.bingo/Variables.mk index a41c39073b..3408557cd5 100644 --- a/.bingo/Variables.mk +++ b/.bingo/Variables.mk @@ -71,11 +71,11 @@ $(JB): $(BINGO_DIR)/jb.mod @echo "(re)installing $(GOBIN)/jb-v0.4.0" @cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=jb.mod -o=$(GOBIN)/jb-v0.4.0 "github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb" -JSONNET_LINT := $(GOBIN)/jsonnet-lint-v0.17.1-0.20210113194615-cd59751527e0 +JSONNET_LINT := $(GOBIN)/jsonnet-lint-v0.17.1-0.20211101230100-b10eae7c683a $(JSONNET_LINT): $(BINGO_DIR)/jsonnet-lint.mod @# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies. - @echo "(re)installing $(GOBIN)/jsonnet-lint-v0.17.1-0.20210113194615-cd59751527e0" - @cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=jsonnet-lint.mod -o=$(GOBIN)/jsonnet-lint-v0.17.1-0.20210113194615-cd59751527e0 "github.com/google/go-jsonnet/cmd/jsonnet-lint" + @echo "(re)installing $(GOBIN)/jsonnet-lint-v0.17.1-0.20211101230100-b10eae7c683a" + @cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=jsonnet-lint.mod -o=$(GOBIN)/jsonnet-lint-v0.17.1-0.20211101230100-b10eae7c683a "github.com/google/go-jsonnet/cmd/jsonnet-lint" JSONNET := $(GOBIN)/jsonnet-v0.17.0 $(JSONNET): $(BINGO_DIR)/jsonnet.mod diff --git a/.bingo/jsonnet-lint.mod b/.bingo/jsonnet-lint.mod index c033962a8b..02fd68c7ef 100644 --- a/.bingo/jsonnet-lint.mod +++ b/.bingo/jsonnet-lint.mod @@ -2,4 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT go 1.16 -require github.com/google/go-jsonnet v0.17.1-0.20210113194615-cd59751527e0 // cmd/jsonnet-lint +require github.com/google/go-jsonnet v0.17.1-0.20211101230100-b10eae7c683a // cmd/jsonnet-lint diff --git a/.bingo/variables.env b/.bingo/variables.env index 26f79c0e31..ab626fb75e 100644 --- a/.bingo/variables.env +++ b/.bingo/variables.env @@ -26,7 +26,7 @@ HUGO="${GOBIN}/hugo-v0.80.0" JB="${GOBIN}/jb-v0.4.0" -JSONNET_LINT="${GOBIN}/jsonnet-lint-v0.17.1-0.20210113194615-cd59751527e0" +JSONNET_LINT="${GOBIN}/jsonnet-lint-v0.17.1-0.20211101230100-b10eae7c683a" JSONNET="${GOBIN}/jsonnet-v0.17.0" diff --git a/.github/workflows/mixin.yaml b/.github/workflows/mixin.yaml new file mode 100644 index 0000000000..fca2dd9375 --- /dev/null +++ b/.github/workflows/mixin.yaml @@ -0,0 +1,46 @@ +name: mixin + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ^1.16 + + - name: Generate + run: make examples + + - name: Check + run: make check-examples + + lint: + runs-on: ubuntu-latest + name: Linters (Static Analysis) for Jsonnet (mixin) + steps: + - name: Checkout code into the Go module directory. + uses: actions/checkout@v2 + + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: 1.16.x + + - name: Format + run: | + make jsonnet-format + git diff --exit-code + + - name: Linting + run: make jsonnet-lint diff --git a/.mdox.yaml b/.mdox.yaml index d4f3222292..5d3e75b276 100644 --- a/.mdox.yaml +++ b/.mdox.yaml @@ -14,6 +14,8 @@ localLinksStyle: hugo: indexFileName: "_index.md" +linkPrefixForNonMarkdownResources: "https://github.com/thanos-io/thanos/blob/main" + transformations: - glob: "$(EXTERNAL_GLOB_REL)CHANGELOG.md" diff --git a/Makefile b/Makefile index 2fdf7f0f79..c01c3e4e4e 100644 --- a/Makefile +++ b/Makefile @@ -363,7 +363,7 @@ jsonnet-format: $(JSONNETFMT) xargs -n 1 -- $(JSONNETFMT_CMD) -i .PHONY: jsonnet-lint -jsonnet-lint: $(JSONNET_LINT) ${JSONNET_VENDOR_DIR} +jsonnet-lint: $(JSONNET_LINT) jsonnet-vendor find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \ xargs -n 1 -- $(JSONNET_LINT) -J ${JSONNET_VENDOR_DIR} @@ -399,4 +399,3 @@ $(PROTOC): @echo ">> installing protoc@${PROTOC_VERSION}" @mv -- "$(TMP_GOPATH)/bin/protoc" "$(GOBIN)/protoc-$(PROTOC_VERSION)" @echo ">> produced $(GOBIN)/protoc-$(PROTOC_VERSION)" - diff --git a/mixin/dashboards/compact.libsonnet b/mixin/dashboards/compact.libsonnet index 96888a2598..21112417cd 100644 --- a/mixin/dashboards/compact.libsonnet +++ b/mixin/dashboards/compact.libsonnet @@ -1,5 +1,4 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet'; -local utils = import '../lib/utils.libsonnet'; { local thanos = self, diff --git a/mixin/dashboards/query_frontend.libsonnet b/mixin/dashboards/query_frontend.libsonnet index a4cd653b99..c5ba200ad5 100644 --- a/mixin/dashboards/query_frontend.libsonnet +++ b/mixin/dashboards/query_frontend.libsonnet @@ -14,7 +14,6 @@ local utils = import '../lib/utils.libsonnet'; grafanaDashboards+:: { [if thanos.queryFrontend != null then 'query_frontend.json']: local queryFrontendHandlerSelector = utils.joinLabels([thanos.queryFrontend.dashboard.selector, 'handler="query-frontend"']); - local queryFrontendTripperwareSelector = utils.joinLabels([thanos.queryFrontend.dashboard.selector, 'tripperware="query_range"']); local queryFrontendOpSelector = utils.joinLabels([thanos.queryFrontend.dashboard.selector, 'op="query_range"']); g.dashboard(thanos.queryFrontend.title) .addRow( diff --git a/mixin/lib/thanos-grafana-builder/builder.libsonnet b/mixin/lib/thanos-grafana-builder/builder.libsonnet index 97d7b0bde6..ecbc61e69c 100644 --- a/mixin/lib/thanos-grafana-builder/builder.libsonnet +++ b/mixin/lib/thanos-grafana-builder/builder.libsonnet @@ -1,5 +1,3 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local template = grafana.template; local utils = import '../utils.libsonnet'; (import 'grafana-builder/grafana.libsonnet') + diff --git a/pkg/httpconfig/http.go b/pkg/httpconfig/http.go index 7fb142ca6b..ed5fdda13a 100644 --- a/pkg/httpconfig/http.go +++ b/pkg/httpconfig/http.go @@ -76,14 +76,14 @@ func (b BasicAuth) IsZero() bool { // Transport configures client's transport properties. type TransportConfig struct { - MaxIdleConns int `yaml:"max_idle_conns"` - MaxIdleConnsPerHost int `yaml:"max_idle_conns_per_host"` - IdleConnTimeout int `yaml:"idle_conn_timeout"` - ResponseHeaderTimeout int `yaml:"response_header_timeout"` - ExpectContinueTimeout int `yaml:"expect_continue_timeout"` - MaxConnsPerHost int `yaml:"max_conns_per_host"` - DisableCompression bool `yaml:"disable_compression"` - TLSHandshakeTimeout int `yaml:"tls_handshake_timeout"` + MaxIdleConns int `yaml:"max_idle_conns"` + MaxIdleConnsPerHost int `yaml:"max_idle_conns_per_host"` + IdleConnTimeout int64 `yaml:"idle_conn_timeout"` + ResponseHeaderTimeout int64 `yaml:"response_header_timeout"` + ExpectContinueTimeout int64 `yaml:"expect_continue_timeout"` + MaxConnsPerHost int `yaml:"max_conns_per_host"` + DisableCompression bool `yaml:"disable_compression"` + TLSHandshakeTimeout int64 `yaml:"tls_handshake_timeout"` } var defaultTransportConfig TransportConfig = TransportConfig{ @@ -91,10 +91,10 @@ var defaultTransportConfig TransportConfig = TransportConfig{ MaxIdleConnsPerHost: 2, ResponseHeaderTimeout: 0, MaxConnsPerHost: 0, - IdleConnTimeout: int(90 * time.Second), - ExpectContinueTimeout: int(10 * time.Second), + IdleConnTimeout: int64(90 * time.Second), + ExpectContinueTimeout: int64(10 * time.Second), DisableCompression: false, - TLSHandshakeTimeout: int(10 * time.Second), + TLSHandshakeTimeout: int64(10 * time.Second), } func NewClientConfigFromYAML(cfg []byte) (*ClientConfig, error) { diff --git a/website/data/adopters.yml b/website/data/adopters.yml index 96fa4b52cf..8fac093d8e 100644 --- a/website/data/adopters.yml +++ b/website/data/adopters.yml @@ -165,3 +165,6 @@ adopters: - name: Wehkamp url: https://www.wehkamp.nl logo: wehkamp.png +- name: SoundCloud + url: https://www.soundcloud.com + logo: soundcloud.png diff --git a/website/static/logos/soundcloud.png b/website/static/logos/soundcloud.png new file mode 100644 index 0000000000..7067f7dcfa Binary files /dev/null and b/website/static/logos/soundcloud.png differ