Skip to content

Commit

Permalink
Merge branch 'thanos-io:main' into tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
metonymic-smokey committed Nov 29, 2021
2 parents f12a18e + 78391de commit 7620389
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .bingo/jsonnet-lint.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .bingo/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/mixin.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions .mdox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down Expand Up @@ -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)"

1 change: 0 additions & 1 deletion mixin/dashboards/compact.libsonnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
local g = import '../lib/thanos-grafana-builder/builder.libsonnet';
local utils = import '../lib/utils.libsonnet';

{
local thanos = self,
Expand Down
1 change: 0 additions & 1 deletion mixin/dashboards/query_frontend.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 0 additions & 2 deletions mixin/lib/thanos-grafana-builder/builder.libsonnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
local grafana = import 'grafonnet/grafana.libsonnet';
local template = grafana.template;
local utils = import '../utils.libsonnet';

(import 'grafana-builder/grafana.libsonnet') +
Expand Down
22 changes: 11 additions & 11 deletions pkg/httpconfig/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,25 @@ 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{
MaxIdleConns: 100,
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) {
Expand Down
3 changes: 3 additions & 0 deletions website/data/adopters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file added website/static/logos/soundcloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7620389

Please sign in to comment.