From 85fd6d1547be427a849dd49eaa22eceaf001046c Mon Sep 17 00:00:00 2001 From: Lukasz Mierzwa Date: Wed, 14 Sep 2022 12:54:26 +0100 Subject: [PATCH] Use Go 1.19.1 --- .github/workflows/benchmark.yml | 2 +- .github/workflows/compile.yml | 2 +- .github/workflows/examples.yml | 2 +- .github/workflows/go-mod-tidy.yml | 2 +- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 2 +- cmd/pint/tests/0023_enabled_checks.txt | 2 +- cmd/pint/tests/0025_config.txt | 16 ++++++++-------- cmd/pint/tests/0056_prometheus_required.txt | 9 ++++++--- .../tests/0079_check_promql_series_invalid.txt | 2 +- internal/checks/promql_series_test.go | 4 ++-- 11 files changed, 25 insertions(+), 22 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index a068fc0e..aff223a4 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.19.1 - name: Test run: make benchmark diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 7d980a6f..31deebb1 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.19.1 - name: Check out code uses: actions/checkout@v3 diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index cdafd67f..1eb5b7b0 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.19.1 - name: Build binary run: make diff --git a/.github/workflows/go-mod-tidy.yml b/.github/workflows/go-mod-tidy.yml index a6d91906..b90a1871 100644 --- a/.github/workflows/go-mod-tidy.yml +++ b/.github/workflows/go-mod-tidy.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.19.1 - name: Run go mod tidy run: go mod tidy diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 793bfb76..aad627b7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.19.1 - name: Check out code uses: actions/checkout@v3 @@ -29,7 +29,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.19.1 - name: Check out code uses: actions/checkout@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba295a24..3f7b8140 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.19.1 - name: Test run: make test diff --git a/cmd/pint/tests/0023_enabled_checks.txt b/cmd/pint/tests/0023_enabled_checks.txt index d7e876b7..cc0e9283 100644 --- a/cmd/pint/tests/0023_enabled_checks.txt +++ b/cmd/pint/tests/0023_enabled_checks.txt @@ -21,7 +21,7 @@ parser { relaxed = ["rules/.*"] } prometheus "prom" { - uri = "https://" + uri = "http://127.0.0.1" required = true } diff --git a/cmd/pint/tests/0025_config.txt b/cmd/pint/tests/0025_config.txt index daac005a..bb23b3df 100644 --- a/cmd/pint/tests/0025_config.txt +++ b/cmd/pint/tests/0025_config.txt @@ -13,7 +13,7 @@ level=info msg="Loading configuration file" path=.pint.hcl "prometheus": [ { "name": "prom", - "uri": "https://", + "uri": "http://127.0.0.1", "timeout": "2m", "concurrency": 16, "rateLimit": 100, @@ -22,7 +22,7 @@ level=info msg="Loading configuration file" path=.pint.hcl }, { "name": "custom-concurrency", - "uri": "https://", + "uri": "http://127.0.0.1", "timeout": "2m0s", "concurrency": 32, "rateLimit": 100, @@ -31,7 +31,7 @@ level=info msg="Loading configuration file" path=.pint.hcl }, { "name": "custom-cache", - "uri": "https://", + "uri": "http://127.0.0.1", "timeout": "10s", "concurrency": 16, "rateLimit": 100, @@ -40,7 +40,7 @@ level=info msg="Loading configuration file" path=.pint.hcl }, { "name": "custom-rateLimit", - "uri": "https://", + "uri": "http://127.0.0.1", "timeout": "15s", "concurrency": 16, "rateLimit": 1, @@ -157,25 +157,25 @@ level=info msg="Loading configuration file" path=.pint.hcl } -- .pint.hcl -- prometheus "prom" { - uri = "https://" + uri = "http://127.0.0.1" timeout = "2m" required = true } prometheus "custom-concurrency" { - uri = "https://" + uri = "http://127.0.0.1" required = false concurrency = 32 } prometheus "custom-cache" { - uri = "https://" + uri = "http://127.0.0.1" timeout = "10s" cache = 32 } prometheus "custom-rateLimit" { - uri = "https://" + uri = "http://127.0.0.1" timeout = "15s" rateLimit = 1 } diff --git a/cmd/pint/tests/0056_prometheus_required.txt b/cmd/pint/tests/0056_prometheus_required.txt index 880d7193..eed2ccbc 100644 --- a/cmd/pint/tests/0056_prometheus_required.txt +++ b/cmd/pint/tests/0056_prometheus_required.txt @@ -1,7 +1,10 @@ +http response prometheus / 500 Offline +http start prometheus 127.0.0.1:7056 + pint.ok -l debug --no-color lint rules ! stdout . -stderr 'level=error msg="Query returned an error" error="Post \\"https:///api/v1/query\\": http: no Host in request URL" query=count\(up\) uri=https://' -stderr 'level=error msg="Query returned an error" error="failed to query Prometheus config: Get \\"https:///api/v1/status/config\\": http: no Host in request URL" query=/api/v1/status/config uri=https://' +stderr 'level=error msg="Query returned an error" error="server error: 500" query=count\(up\) uri=http://127.0.0.1:7056' +stderr 'level=error msg="Query returned an error" error="server error: 500" query=/api/v1/status/config uri=http://127.0.0.1:7056' stderr 'level=info msg="Problems found" Warning=12' -- rules/1.yaml -- @@ -17,7 +20,7 @@ stderr 'level=info msg="Problems found" Warning=12' -- .pint.hcl -- prometheus "prom" { - uri = "https://" + uri = "http://127.0.0.1:7056" required = false } parser { diff --git a/cmd/pint/tests/0079_check_promql_series_invalid.txt b/cmd/pint/tests/0079_check_promql_series_invalid.txt index 7e34eae8..80a15d4d 100644 --- a/cmd/pint/tests/0079_check_promql_series_invalid.txt +++ b/cmd/pint/tests/0079_check_promql_series_invalid.txt @@ -7,7 +7,7 @@ level=info msg="Loading configuration file" path=.pint.hcl level=fatal msg="Fatal error" error="failed to load config file \".pint.hcl\": .pint.hcl:7,3-6: Unsupported argument; An argument named \"bob\" is not expected here." -- .pint.hcl -- prometheus "prom" { - uri = "https://" + uri = "http://127.0.0.1" required = true } diff --git a/internal/checks/promql_series_test.go b/internal/checks/promql_series_test.go index 1b7d0d2d..48f0c631 100644 --- a/internal/checks/promql_series_test.go +++ b/internal/checks/promql_series_test.go @@ -97,7 +97,7 @@ func TestSeriesCheck(t *testing.T) { content: "- record: foo\n expr: sum(foo)\n", checker: newSeriesCheck, prometheus: func(s string) *promapi.FailoverGroup { - return simpleProm("prom", "http://", time.Second*5, false) + return simpleProm("prom", "http://127.127.127.127", time.Second*5, false) }, problems: func(uri string) []checks.Problem { return []checks.Problem{ @@ -105,7 +105,7 @@ func TestSeriesCheck(t *testing.T) { Fragment: "foo", Lines: []int{2}, Reporter: checks.SeriesCheckName, - Text: checkErrorUnableToRun(checks.SeriesCheckName, "prom", "http://", `Post "http:///api/v1/query": http: no Host in request URL`), + Text: checkErrorUnableToRun(checks.SeriesCheckName, "prom", "http://127.127.127.127", `connection refused`), Severity: checks.Warning, }, }