Skip to content

Commit

Permalink
Update builds to use Go 1.21 (#4946)
Browse files Browse the repository at this point in the history
Fixes #4919
  • Loading branch information
rfratto authored Aug 25, 2023
1 parent cc3e80d commit b9dc712
Show file tree
Hide file tree
Showing 16 changed files with 110 additions and 108 deletions.
126 changes: 63 additions & 63 deletions .drone/drone.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go 1.20
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: "1.20.3"
go-version: "1.21.0"
cache: true
- name: Test
run: make GO_TAGS="nodocker" test
16 changes: 10 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ Main (unreleased)

- New Grafana Agent Flow components:

- `otelcol.connector.spanlogs` - creates logs from spans. It is the flow mode equivalent
- `otelcol.connector.spanlogs` - creates logs from spans. It is the flow mode equivalent
to static mode's `automatic_logging` processor. (@ptodev)

### Other changes

- Use Go 1.21.0 for builds. (@rfratto)

v0.36.0-rc.0 (2023-08-25)
--------------------

Expand All @@ -30,7 +34,7 @@ v0.36.0-rc.0 (2023-08-25)
to enable decompression explicitly. See the [upgrade guide][] for migration
instructions. (@thampiotr)

- `otelcol.exporter.prometheus`: Set `include_scope_info` to `false` by default. You can set
- `otelcol.exporter.prometheus`: Set `include_scope_info` to `false` by default. You can set
it to `true` to preserve previous behavior. (@gouthamve)

- `prometheus.remote_write`: Set `retry_on_http_429` to `true` by default in the `queue_config` block.
Expand Down Expand Up @@ -123,7 +127,7 @@ v0.36.0-rc.0 (2023-08-25)
- Fix an issue that lead the `loki.source.docker` container to use excessive
CPU and memory. (@tpaschalis)

- Fix issue where `otelcol.exporter.loki` was not normalizing label names
- Fix issue where `otelcol.exporter.loki` was not normalizing label names
to comply with Prometheus conventions. (@ptodev)

- Agent Management: Fix issue where an integration defined multiple times could lead to undefined behaviour. (@jcreixell)
Expand All @@ -148,7 +152,7 @@ v0.35.3 (2023-08-09)

- (Agent static mode) Jaeger remote sampling works again, through a new `jaeger_remote_sampling`
entry in the traces config. It is no longer configurable through the jaeger receiver.
Support Jaeger remote sampling was removed accidentally in v0.35, and it is now restored,
Support Jaeger remote sampling was removed accidentally in v0.35, and it is now restored,
albeit via a different config entry.

- Clustering: Nodes take part in distributing load only after loading their
Expand Down Expand Up @@ -243,8 +247,8 @@ v0.35.0 (2023-07-18)

- The `remote_sampling` block has been removed from `otelcol.receiver.jaeger`. (@ptodev)

- (Agent static mode) Jaeger remote sampling used to be configured using the Jaeger receiver configuration.
This receiver was updated to a new version, where support for remote sampling in the receiver was removed.
- (Agent static mode) Jaeger remote sampling used to be configured using the Jaeger receiver configuration.
This receiver was updated to a new version, where support for remote sampling in the receiver was removed.
Jaeger remote sampling is available as a separate configuration field starting in v0.35.3. (@ptodev)

### Deprecations
Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agent-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.29.0 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.0 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.29.0 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.0 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agent/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM grafana/agent-build-image:0.29.0-windows as builder
FROM grafana/agent-build-image:0.30.0-windows as builder
ARG VERSION
ARG RELEASE_BUILD=1

Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agentctl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.29.0 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.0 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down
2 changes: 1 addition & 1 deletion cmd/grafana-agentctl/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM grafana/agent-build-image:0.29.0-windows as builder
FROM grafana/agent-build-image:0.30.0-windows as builder
ARG VERSION
ARG RELEASE_BUILD=1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ func testSyslogTargetWithTLSVerifyClientCertificate(t *testing.T, fmtFunc format

buf := make([]byte, 1)
_, err = c.Read(buf)
require.EqualError(t, err, "remote error: tls: bad certificate")
require.ErrorContains(t, err, "remote error: tls:")
})

t.Run("WithClientCertificate", func(t *testing.T) {
Expand Down
44 changes: 22 additions & 22 deletions converter/internal/staticconvert/testdata/integrations.river
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,28 @@ prometheus.scrape "integrations_blackbox" {
job_name = "integrations/blackbox"
}

prometheus.exporter.snmp "integrations_snmp" {
target "network_switch_1" {
address = "192.168.1.2"
module = "if_mib"
auth = "public"
walk_params = "public"
}

target "network_router_2" {
address = "192.168.1.3"
module = "mikrotik"
auth = "private"
walk_params = "private"
}
}

prometheus.scrape "integrations_snmp" {
targets = prometheus.exporter.snmp.integrations_snmp.targets
forward_to = [prometheus.remote_write.integrations.receiver]
job_name = "integrations/snmp"
}

prometheus.exporter.cloudwatch "integrations_cloudwatch_exporter" {
sts_region = "us-east-2"
fips_disabled = false
Expand Down Expand Up @@ -315,28 +337,6 @@ prometheus.scrape "integrations_redis_exporter" {
job_name = "integrations/redis_exporter"
}

prometheus.exporter.snmp "integrations_snmp" {
target "network_switch_1" {
address = "192.168.1.2"
module = "if_mib"
auth = "public"
walk_params = "public"
}

target "network_router_2" {
address = "192.168.1.3"
module = "mikrotik"
auth = "private"
walk_params = "private"
}
}

prometheus.scrape "integrations_snmp" {
targets = prometheus.exporter.snmp.integrations_snmp.targets
forward_to = [prometheus.remote_write.integrations.receiver]
job_name = "integrations/snmp"
}

prometheus.exporter.snowflake "integrations_snowflake" {
account_name = "XXXXXXX-YYYYYYY"
username = "snowflake-user"
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ require (
github.com/prometheus/prometheus v1.99.0
github.com/prometheus/snmp_exporter v0.22.1-0.20230623130038-562ae9055ce3
github.com/prometheus/statsd_exporter v0.22.8
github.com/pyroscope-io/godeltaprof v0.1.1
github.com/pyroscope-io/godeltaprof v0.1.2
github.com/richardartoul/molecule v1.0.1-0.20221107223329-32cfee06a052
github.com/rs/cors v1.9.0
github.com/shirou/gopsutil/v3 v3.23.5
Expand Down Expand Up @@ -621,8 +621,6 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)

require github.com/foxcpp/go-mockdns v1.0.0

require (
github.com/drone/envsubst v1.0.3 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1410,8 +1410,6 @@ github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9
github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI=
github.com/foxcpp/go-mockdns v1.0.0/go.mod h1:lgRN6+KxQBawyIghpnl5CezHFGS9VLzvtVlwxvzXTQ4=
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo=
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
Expand Down Expand Up @@ -3051,6 +3049,8 @@ github.com/prometheus/statsd_exporter v0.22.8/go.mod h1:/DzwbTEaFTE0Ojz5PqcSk6+P
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/pyroscope-io/godeltaprof v0.1.1 h1:+Mmi+b9gR3s/qufuQSxOBjyXZR1fmvS/C12Q73PIPvw=
github.com/pyroscope-io/godeltaprof v0.1.1/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE=
github.com/pyroscope-io/godeltaprof v0.1.2 h1:MdlEmYELd5w+lvIzmZvXGNMVzW2Qc9jDMuJaPOR75g4=
github.com/pyroscope-io/godeltaprof v0.1.2/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ func Test_tlsListener(t *testing.T) {

var urlError *url.Error
require.ErrorAs(t, err, &urlError)
require.Contains(t, urlError.Err.Error(), "tls: bad certificate")
require.Contains(t, urlError.Err.Error(), "tls:")
}
2 changes: 1 addition & 1 deletion tools/crow/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.29.0 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.0 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down
2 changes: 1 addition & 1 deletion tools/make/build-container.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# variable names should be passed through to the container.

USE_CONTAINER ?= 0
BUILD_IMAGE_VERSION ?= 0.29.0
BUILD_IMAGE_VERSION ?= 0.30.0
BUILD_IMAGE ?= grafana/agent-build-image:$(BUILD_IMAGE_VERSION)
DOCKER_OPTS ?= -it

Expand Down
2 changes: 1 addition & 1 deletion tools/smoke/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.29.0 as build
FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.0 as build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down

0 comments on commit b9dc712

Please sign in to comment.