Skip to content

Commit

Permalink
all: Update Go version to 1.23 (#5561)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirms authored Jan 2, 2025
1 parent 9c71a45 commit 1d4de63
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
go: ["1.22.1"]
go: ["1.23"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -38,7 +38,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
go: ["1.21", "1.22"]
go: ["1.22", "1.23"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -56,7 +56,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
go: ["1.21", "1.22"]
go: ["1.22", "1.23"]
pg: [12, 16]
runs-on: ${{ matrix.os }}
services:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/horizon-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- uses: ./.github/actions/setup-go
with:
go-version: "1.22"
go-version: "1.23"

- name: Check dependencies
run: ./gomod.sh
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/horizon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
go: ["1.21", "1.22"]
go: ["1.22", "1.23"]
pg: [12, 16]
protocol-version: [22]
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -126,6 +126,7 @@ jobs:
name: Test (and push) verify-range image
runs-on: ubuntu-22.04
env:
GO_VERSION: 1.23.4
STELLAR_CORE_VERSION: 22.1.0-2194.0241e79f7.focal
CAPTIVE_CORE_STORAGE_PATH: /tmp
steps:
Expand All @@ -136,7 +137,7 @@ jobs:

- name: Build and test the Verify Range Docker image
run: |
docker build --build-arg="GO_VERSION=$(sed -En 's/^toolchain[[:space:]]+go([[:digit:].]+)$/\1/p' go.mod)" -f services/horizon/docker/verify-range/Dockerfile -t stellar/horizon-verify-range services/horizon/docker/verify-range/
docker build --build-arg="GO_VERSION=$GO_VERSION" -f services/horizon/docker/verify-range/Dockerfile -t stellar/horizon-verify-range services/horizon/docker/verify-range/
# Any range should do for basic testing, this range was chosen pretty early in history so that it only takes a few mins to run
docker run -e BRANCH=$(git rev-parse HEAD) -e FROM=10000063 -e TO=10000127 stellar/horizon-verify-range
Expand Down
2 changes: 1 addition & 1 deletion exp/services/recoverysigner/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-bullseye as build
FROM golang:1.23-bullseye as build

ADD . /src/recoverysigner
WORKDIR /src/recoverysigner
Expand Down
2 changes: 1 addition & 1 deletion exp/services/webauth/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-bullseye as build
FROM golang:1.23-bullseye as build

ADD . /src/webauth
WORKDIR /src/webauth
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/stellar/go

go 1.22

toolchain go1.22.1
go 1.23

require (
cloud.google.com/go/firestore v1.15.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion ingest/ledgerbackend/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (c *CaptiveCoreToml) unmarshal(data []byte, strict bool) error {
return err
} else if err = toml.NewDecoder(bytes.NewReader(withoutPlaceHolders)).Strict(strict).Decode(&body); err != nil {
if message := err.Error(); strings.HasPrefix(message, "undecoded keys") {
return fmt.Errorf(strings.Replace(
return errors.New(strings.Replace(
message,
"undecoded keys",
"these fields are not supported by captive core",
Expand Down
2 changes: 1 addition & 1 deletion services/friendbot/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-bullseye as build
FROM golang:1.23-bullseye as build

ADD . /src/friendbot
WORKDIR /src/friendbot
Expand Down
2 changes: 1 addition & 1 deletion services/galexie/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-bookworm AS builder
FROM golang:1.23-bookworm AS builder

WORKDIR /go/src/github.com/stellar/go

Expand Down
2 changes: 1 addition & 1 deletion services/horizon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ binary-build:
--pull always \
--env CGO_ENABLED=0 \
--env GOFLAGS="-ldflags=-X=github.com/stellar/go/support/app.version=$(VERSION_STRING)" \
golang:1.22-bullseye \
golang:1.23-bullseye \
/bin/bash -c '\
git config --global --add safe.directory /go/src/github.com/stellar/go && \
cd /go/src/github.com/stellar/go && \
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-bookworm AS builder
FROM golang:1.23-bookworm AS builder

ARG VERSION="devel"
WORKDIR /go/src/github.com/stellar/go
Expand Down
2 changes: 2 additions & 0 deletions services/horizon/docker/verify-range/dependencies
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#! /usr/bin/env bash
set -e
set -o xtrace


apt-get update
apt-get install -y curl git libpq-dev libsqlite3-dev libsasl2-dev postgresql-client postgresql postgresql-contrib sudo vim zlib1g-dev wget gnupg2 lsb-release
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Change to Go version used in CI or rebuild with --build-arg.
ARG GO_IMAGE=golang:1.22-bullseye
ARG GO_IMAGE=golang:1.23-bullseye
FROM $GO_IMAGE

WORKDIR /go/src/github.com/stellar/go
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-bullseye as build
FROM golang:1.23-bullseye as build

ADD . /src/regulated-assets-approval-server
WORKDIR /src/regulated-assets-approval-server
Expand Down
2 changes: 1 addition & 1 deletion staticcheck.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/bash
set -e

version='2023.1.7'
version='2024.1.1'

staticcheck='go run honnef.co/go/tools/cmd/staticcheck@'"$version"

Expand Down

0 comments on commit 1d4de63

Please sign in to comment.