Skip to content

Commit

Permalink
[Chore] Bump to Go 1.23 (#660)
Browse files Browse the repository at this point in the history
* Bump to Go1.23

* fix(scripts workflow): Pull go version from src

Selects the version of go to use from the src/go.mod file in the scripts
workflow.

---------

Co-authored-by: Carson Long <12767276+ctlong@users.noreply.github.com>
  • Loading branch information
aqstack and ctlong authored Jan 6, 2025
1 parent 2b0704c commit 752e9de
Show file tree
Hide file tree
Showing 30 changed files with 29 additions and 37 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
check-latest: true
go-version-file: "src/go.mod"
- run: ./scripts/subtests/unit-test

lint:
Expand All @@ -27,6 +26,5 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
check-latest: true
go-version-file: "src/go.mod"
- run: ./scripts/subtests/lint
2 changes: 1 addition & 1 deletion packages/binding-cache/packaging
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -ex

source /var/vcap/packages/golang-1.22-linux/bosh/compile.env
source /var/vcap/packages/golang-1.23-linux/bosh/compile.env
export GOPATH=/var/vcap

go build -mod=vendor -o ${BOSH_INSTALL_TARGET}/binding-cache ./cmd/syslog-binding-cache
2 changes: 1 addition & 1 deletion packages/binding-cache/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: binding-cache

dependencies:
- golang-1.22-linux
- golang-1.23-linux
files:
- cmd/syslog-binding-cache/**/*.go
- pkg/**/*.go
Expand Down
2 changes: 1 addition & 1 deletion packages/forwarder-agent-windows/packaging
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
. ./exiter.ps1
. C:\var\vcap\packages\golang-1.22-windows\bosh\compile.ps1
. C:\var\vcap\packages\golang-1.23-windows\bosh\compile.ps1
$env:GOPATH="C:\var\vcap"

$ErrorActionPreference = "Stop";
Expand Down
2 changes: 1 addition & 1 deletion packages/forwarder-agent-windows/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: forwarder-agent-windows

dependencies:
- golang-1.22-windows
- golang-1.23-windows

files:
- exiter.ps1
Expand Down
2 changes: 1 addition & 1 deletion packages/forwarder-agent/packaging
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -ex

source /var/vcap/packages/golang-1.22-linux/bosh/compile.env
source /var/vcap/packages/golang-1.23-linux/bosh/compile.env
export GOPATH=/var/vcap

go build -mod=vendor -o ${BOSH_INSTALL_TARGET}/forwarder-agent ./cmd/forwarder-agent
2 changes: 1 addition & 1 deletion packages/forwarder-agent/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: forwarder-agent

dependencies:
- golang-1.22-linux
- golang-1.23-linux
files:
- cmd/forwarder-agent/**/*.go
- pkg/**/*.go
Expand Down
2 changes: 0 additions & 2 deletions packages/golang-1.22-linux/spec.lock

This file was deleted.

2 changes: 0 additions & 2 deletions packages/golang-1.22-windows/spec.lock

This file was deleted.

2 changes: 1 addition & 1 deletion packages/loggregator_agent/packaging
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -ex

source /var/vcap/packages/golang-1.22-linux/bosh/compile.env
source /var/vcap/packages/golang-1.23-linux/bosh/compile.env
export GOPATH=/var/vcap

go build -mod=vendor -o ${BOSH_INSTALL_TARGET}/loggregator-agent ./cmd/loggregator-agent
2 changes: 1 addition & 1 deletion packages/loggregator_agent/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: loggregator_agent

dependencies:
- golang-1.22-linux
- golang-1.23-linux
files:
- cmd/loggregator-agent/**/*.go
- pkg/**/*.go
Expand Down
2 changes: 1 addition & 1 deletion packages/loggregator_agent_windows/packaging
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
. ./exiter.ps1
. C:\var\vcap\packages\golang-1.22-windows\bosh\compile.ps1
. C:\var\vcap\packages\golang-1.23-windows\bosh\compile.ps1
$env:GOPATH="C:\var\vcap"

$ErrorActionPreference = "Stop";
Expand Down
2 changes: 1 addition & 1 deletion packages/loggregator_agent_windows/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: loggregator_agent_windows

dependencies:
- golang-1.22-windows
- golang-1.23-windows

files:
- exiter.ps1
Expand Down
2 changes: 1 addition & 1 deletion packages/otel-collector-windows/packaging
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
. ./exiter.ps1
. C:\var\vcap\packages\golang-1.22-windows\bosh\compile.ps1
. C:\var\vcap\packages\golang-1.23-windows\bosh\compile.ps1
$env:CGO_ENABLED="0"

$ErrorActionPreference = "Stop";
Expand Down
2 changes: 1 addition & 1 deletion packages/otel-collector-windows/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: otel-collector-windows

dependencies:
- golang-1.22-windows
- golang-1.23-windows

files:
- exiter.ps1
Expand Down
2 changes: 1 addition & 1 deletion packages/otel-collector/packaging
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e -x

source /var/vcap/packages/golang-1.22-linux/bosh/compile.env
source /var/vcap/packages/golang-1.23-linux/bosh/compile.env

export CGO_ENABLED=0

Expand Down
2 changes: 1 addition & 1 deletion packages/otel-collector/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: otel-collector

dependencies:
- golang-1.22-linux
- golang-1.23-linux

files:
- otel-collector-builder/**/*
Expand Down
2 changes: 1 addition & 1 deletion packages/prom_scraper/packaging
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -ex

source /var/vcap/packages/golang-1.22-linux/bosh/compile.env
source /var/vcap/packages/golang-1.23-linux/bosh/compile.env
export GOPATH=/var/vcap

go build -mod=vendor -o ${BOSH_INSTALL_TARGET}/prom-scraper ./cmd/prom-scraper
Expand Down
2 changes: 1 addition & 1 deletion packages/prom_scraper/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: prom_scraper

dependencies:
- golang-1.22-linux
- golang-1.23-linux
files:
- cmd/prom-scraper/**/*.go
- cmd/prom-scraper/get-metrics.sh
Expand Down
2 changes: 1 addition & 1 deletion packages/prom_scraper_windows/packaging
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
. ./exiter.ps1
. C:\var\vcap\packages\golang-1.22-windows\bosh\compile.ps1
. C:\var\vcap\packages\golang-1.23-windows\bosh\compile.ps1
$env:GOPATH="C:\var\vcap"

$ErrorActionPreference = "Stop";
Expand Down
2 changes: 1 addition & 1 deletion packages/prom_scraper_windows/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: prom_scraper_windows

dependencies:
- golang-1.22-windows
- golang-1.23-windows

files:
- exiter.ps1
Expand Down
2 changes: 1 addition & 1 deletion packages/syslog-agent-windows/packaging
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
. ./exiter.ps1
. C:\var\vcap\packages\golang-1.22-windows\bosh\compile.ps1
. C:\var\vcap\packages\golang-1.23-windows\bosh\compile.ps1
$env:GOPATH="C:\var\vcap"

$ErrorActionPreference = "Stop";
Expand Down
2 changes: 1 addition & 1 deletion packages/syslog-agent-windows/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: syslog-agent-windows

dependencies:
- golang-1.22-windows
- golang-1.23-windows

files:
- exiter.ps1
Expand Down
2 changes: 1 addition & 1 deletion packages/syslog-agent/packaging
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -ex

source /var/vcap/packages/golang-1.22-linux/bosh/compile.env
source /var/vcap/packages/golang-1.23-linux/bosh/compile.env
export GOPATH=/var/vcap

go build -mod=vendor -o ${BOSH_INSTALL_TARGET}/syslog-agent ./cmd/syslog-agent
2 changes: 1 addition & 1 deletion packages/syslog-agent/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: syslog-agent

dependencies:
- golang-1.22-linux
- golang-1.23-linux
files:
- cmd/syslog-agent/**/*.go
- pkg/**/*.go
Expand Down
2 changes: 1 addition & 1 deletion packages/udp-forwarder/packaging
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -ex

source /var/vcap/packages/golang-1.22-linux/bosh/compile.env
source /var/vcap/packages/golang-1.23-linux/bosh/compile.env
export GOPATH=/var/vcap

go build -mod=vendor -o ${BOSH_INSTALL_TARGET}/udp-forwarder ./cmd/udp-forwarder
2 changes: 1 addition & 1 deletion packages/udp-forwarder/spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: udp-forwarder

dependencies:
- golang-1.22-linux
- golang-1.23-linux
files:
- cmd/udp-forwarder/**/*.go
- pkg/**/*.go
Expand Down
4 changes: 1 addition & 3 deletions src/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module code.cloudfoundry.org/loggregator-agent-release/src

go 1.22.0

toolchain go1.22.10
go 1.23.0

require (
code.cloudfoundry.org/go-batching v0.0.0-20241223135445-b8f45a03eb70
Expand Down
2 changes: 1 addition & 1 deletion src/otel-collector-builder/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module code.cloudfoundry.org/loggregator-agent-release/src/otel-collector-builder

go 1.22.0
go 1.23.0

require go.opentelemetry.io/collector/cmd/builder v0.103.0

Expand Down
2 changes: 1 addition & 1 deletion src/otel-collector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module code.cloudfoundry.org/loggregator-agent-release/src/otel-collector

go 1.21.0

toolchain go1.22.7
toolchain go1.23.4

require (
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.103.0
Expand Down

0 comments on commit 752e9de

Please sign in to comment.