Skip to content

Commit 7620389

Browse files
Merge branch 'thanos-io:main' into tracing
2 parents f12a18e + 78391de commit 7620389

File tree

12 files changed

+68
-22
lines changed

12 files changed

+68
-22
lines changed

.bingo/Variables.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ $(JB): $(BINGO_DIR)/jb.mod
7171
@echo "(re)installing $(GOBIN)/jb-v0.4.0"
7272
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=jb.mod -o=$(GOBIN)/jb-v0.4.0 "github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb"
7373

74-
JSONNET_LINT := $(GOBIN)/jsonnet-lint-v0.17.1-0.20210113194615-cd59751527e0
74+
JSONNET_LINT := $(GOBIN)/jsonnet-lint-v0.17.1-0.20211101230100-b10eae7c683a
7575
$(JSONNET_LINT): $(BINGO_DIR)/jsonnet-lint.mod
7676
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
77-
@echo "(re)installing $(GOBIN)/jsonnet-lint-v0.17.1-0.20210113194615-cd59751527e0"
78-
@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"
77+
@echo "(re)installing $(GOBIN)/jsonnet-lint-v0.17.1-0.20211101230100-b10eae7c683a"
78+
@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"
7979

8080
JSONNET := $(GOBIN)/jsonnet-v0.17.0
8181
$(JSONNET): $(BINGO_DIR)/jsonnet.mod

.bingo/jsonnet-lint.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
22

33
go 1.16
44

5-
require github.com/google/go-jsonnet v0.17.1-0.20210113194615-cd59751527e0 // cmd/jsonnet-lint
5+
require github.com/google/go-jsonnet v0.17.1-0.20211101230100-b10eae7c683a // cmd/jsonnet-lint

.bingo/variables.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ HUGO="${GOBIN}/hugo-v0.80.0"
2626

2727
JB="${GOBIN}/jb-v0.4.0"
2828

29-
JSONNET_LINT="${GOBIN}/jsonnet-lint-v0.17.1-0.20210113194615-cd59751527e0"
29+
JSONNET_LINT="${GOBIN}/jsonnet-lint-v0.17.1-0.20211101230100-b10eae7c683a"
3030

3131
JSONNET="${GOBIN}/jsonnet-v0.17.0"
3232

.github/workflows/mixin.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: mixin
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out code into the Go module directory
15+
uses: actions/checkout@v2
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: ^1.16
21+
22+
- name: Generate
23+
run: make examples
24+
25+
- name: Check
26+
run: make check-examples
27+
28+
lint:
29+
runs-on: ubuntu-latest
30+
name: Linters (Static Analysis) for Jsonnet (mixin)
31+
steps:
32+
- name: Checkout code into the Go module directory.
33+
uses: actions/checkout@v2
34+
35+
- name: Install Go
36+
uses: actions/setup-go@v2
37+
with:
38+
go-version: 1.16.x
39+
40+
- name: Format
41+
run: |
42+
make jsonnet-format
43+
git diff --exit-code
44+
45+
- name: Linting
46+
run: make jsonnet-lint

.mdox.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ localLinksStyle:
1414
hugo:
1515
indexFileName: "_index.md"
1616

17+
linkPrefixForNonMarkdownResources: "https://github.com/thanos-io/thanos/blob/main"
18+
1719
transformations:
1820

1921
- glob: "$(EXTERNAL_GLOB_REL)CHANGELOG.md"

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ jsonnet-format: $(JSONNETFMT)
363363
xargs -n 1 -- $(JSONNETFMT_CMD) -i
364364

365365
.PHONY: jsonnet-lint
366-
jsonnet-lint: $(JSONNET_LINT) ${JSONNET_VENDOR_DIR}
366+
jsonnet-lint: $(JSONNET_LINT) jsonnet-vendor
367367
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
368368
xargs -n 1 -- $(JSONNET_LINT) -J ${JSONNET_VENDOR_DIR}
369369

@@ -399,4 +399,3 @@ $(PROTOC):
399399
@echo ">> installing protoc@${PROTOC_VERSION}"
400400
@mv -- "$(TMP_GOPATH)/bin/protoc" "$(GOBIN)/protoc-$(PROTOC_VERSION)"
401401
@echo ">> produced $(GOBIN)/protoc-$(PROTOC_VERSION)"
402-

mixin/dashboards/compact.libsonnet

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
local g = import '../lib/thanos-grafana-builder/builder.libsonnet';
2-
local utils = import '../lib/utils.libsonnet';
32

43
{
54
local thanos = self,

mixin/dashboards/query_frontend.libsonnet

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ local utils = import '../lib/utils.libsonnet';
1414
grafanaDashboards+:: {
1515
[if thanos.queryFrontend != null then 'query_frontend.json']:
1616
local queryFrontendHandlerSelector = utils.joinLabels([thanos.queryFrontend.dashboard.selector, 'handler="query-frontend"']);
17-
local queryFrontendTripperwareSelector = utils.joinLabels([thanos.queryFrontend.dashboard.selector, 'tripperware="query_range"']);
1817
local queryFrontendOpSelector = utils.joinLabels([thanos.queryFrontend.dashboard.selector, 'op="query_range"']);
1918
g.dashboard(thanos.queryFrontend.title)
2019
.addRow(

mixin/lib/thanos-grafana-builder/builder.libsonnet

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
local grafana = import 'grafonnet/grafana.libsonnet';
2-
local template = grafana.template;
31
local utils = import '../utils.libsonnet';
42

53
(import 'grafana-builder/grafana.libsonnet') +

pkg/httpconfig/http.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,25 @@ func (b BasicAuth) IsZero() bool {
7676

7777
// Transport configures client's transport properties.
7878
type TransportConfig struct {
79-
MaxIdleConns int `yaml:"max_idle_conns"`
80-
MaxIdleConnsPerHost int `yaml:"max_idle_conns_per_host"`
81-
IdleConnTimeout int `yaml:"idle_conn_timeout"`
82-
ResponseHeaderTimeout int `yaml:"response_header_timeout"`
83-
ExpectContinueTimeout int `yaml:"expect_continue_timeout"`
84-
MaxConnsPerHost int `yaml:"max_conns_per_host"`
85-
DisableCompression bool `yaml:"disable_compression"`
86-
TLSHandshakeTimeout int `yaml:"tls_handshake_timeout"`
79+
MaxIdleConns int `yaml:"max_idle_conns"`
80+
MaxIdleConnsPerHost int `yaml:"max_idle_conns_per_host"`
81+
IdleConnTimeout int64 `yaml:"idle_conn_timeout"`
82+
ResponseHeaderTimeout int64 `yaml:"response_header_timeout"`
83+
ExpectContinueTimeout int64 `yaml:"expect_continue_timeout"`
84+
MaxConnsPerHost int `yaml:"max_conns_per_host"`
85+
DisableCompression bool `yaml:"disable_compression"`
86+
TLSHandshakeTimeout int64 `yaml:"tls_handshake_timeout"`
8787
}
8888

8989
var defaultTransportConfig TransportConfig = TransportConfig{
9090
MaxIdleConns: 100,
9191
MaxIdleConnsPerHost: 2,
9292
ResponseHeaderTimeout: 0,
9393
MaxConnsPerHost: 0,
94-
IdleConnTimeout: int(90 * time.Second),
95-
ExpectContinueTimeout: int(10 * time.Second),
94+
IdleConnTimeout: int64(90 * time.Second),
95+
ExpectContinueTimeout: int64(10 * time.Second),
9696
DisableCompression: false,
97-
TLSHandshakeTimeout: int(10 * time.Second),
97+
TLSHandshakeTimeout: int64(10 * time.Second),
9898
}
9999

100100
func NewClientConfigFromYAML(cfg []byte) (*ClientConfig, error) {

0 commit comments

Comments
 (0)