Skip to content

Commit

Permalink
EVERERST-107 update go version to 1.24 (#1130)
Browse files Browse the repository at this point in the history
* EVEREST-107 update go version to 1.24

* EVEREST-107 linting

* EVEREST-107 fix "non-constant format string" go vet errors

* EVEREST-107 update dev operator dockerfile to go 1.24
  • Loading branch information
recharte authored Feb 21, 2025
1 parent ac1ef45 commit 357d16a
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cli-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [ 1.23.x ]
go-version: [ 1.24.x ]
name: CLI ${{inputs.make_target}}
runs-on: ubuntu-latest
timeout-minutes: 60
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dev-be-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [ 1.23.x ]
go-version: [ 1.24.x ]
may-fail: [ false ]

continue-on-error: ${{ matrix.may-fail }}
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.23.x]
go-version: [1.24.x]
may-fail: [false]

continue-on-error: ${{ matrix.may-fail }}
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [ 1.23.x ]
go-version: [ 1.24.x ]
may-fail: [ false ]

name: API Integration Tests
Expand Down Expand Up @@ -382,7 +382,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [ 1.23.x ]
go-version: [ 1.24.x ]
may-fail: [ false ]

runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-fe-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [ 1.23.x ]
go-version: [ 1.24.x ]
may-fail: [ false ]
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/feature-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [ 1.23.x ]
go-version: [ 1.24.x ]
may-fail: [ false ]

continue-on-error: ${{ matrix.may-fail }}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can find the definition of the custom resources in the [Everest operator rep

### Run everest locally
0. Prerequisites:
- Golang 1.23.x
- Golang 1.24.x
- Make 3.x
- Docker 20.x
- Git 2.x
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.23-alpine as build
FROM golang:1.24-alpine as build

WORKDIR /everest

Expand Down
2 changes: 1 addition & 1 deletion commands/namespaces/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func printNamespacesTable(nsList []namespaces.NamespaceInfo) error {
case columnName:
row = append(row, ns.Name)
case columnManagedByEverest:
row = append(row, len(ns.InstalledOperators) != 0)
row = append(row, len(ns.InstalledOperators) > 0)
case columnOperators:
row = append(row, strings.Join(ns.InstalledOperators, ", "))
}
Expand Down
2 changes: 1 addition & 1 deletion dev/everest-operator.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY ./bin/manager ./manager
ENTRYPOINT ["./manager"]

# Build the Delve debuger
FROM golang:1.23-alpine as delve
FROM golang:1.24-alpine as delve
RUN go install github.com/go-delve/delve/cmd/dlv@v1.24.0
RUN chmod +x /go/bin/dlv

Expand Down
2 changes: 1 addition & 1 deletion dev/everest.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ EXPOSE 8080
ENTRYPOINT ["./everest-api"]

# Build the Delve debuger
FROM golang:1.23-alpine as delve
FROM golang:1.24-alpine as delve
RUN go install github.com/go-delve/delve/cmd/dlv@v1.24.0
RUN chmod +x /go/bin/dlv

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/percona/everest

go 1.23.4
go 1.24

replace (
github.com/containerd/containerd v1.7.12 => github.com/containerd/containerd v1.7.13
Expand Down
8 changes: 4 additions & 4 deletions packaging/everestctl_builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ install_go() {
ARCH=$(echo $(uname -m) | sed -e 's:i686:i386:g')
rm -rf /usr/local/go
if [ x"$ARCH" = "xx86_64" ]; then
wget https://go.dev/dl/go1.23.0.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.23.0.linux-amd64.tar.gz
wget https://go.dev/dl/go1.24.0.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.24.0.linux-amd64.tar.gz
else
wget https://go.dev/dl/go1.23.0.linux-arm64.tar.gz
tar -C /usr/local -xzf go1.23.0.linux-arm64.tar.gz
wget https://go.dev/dl/go1.24.0.linux-arm64.tar.gz
tar -C /usr/local -xzf go1.24.0.linux-arm64.tar.gz
fi
update-alternatives --install /usr/bin/go go /usr/local/go/bin/go 1
update-alternatives --set go /usr/local/go/bin/go
Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,20 +228,20 @@ func (o *Installer) printPostInstallMessage(out io.Writer) {

count := 1
if len(o.cfg.NamespaceAddConfig.NamespaceList) == 0 {
message += fmt.Sprintf("\n\n%s", output.Numeric(count, titleStyle.Render("PROVISION A NAMESPACE FOR YOUR DATABASE:")))
message += fmt.Sprintf("\n\n%s", output.Numeric(count, "%s", titleStyle.Render("PROVISION A NAMESPACE FOR YOUR DATABASE:")))
count++
message += "Install a namespace for your databases using the following command:\n\n"
message += fmt.Sprintf("\t%s", commandStyle.Render("everestctl namespaces add [NAMESPACE]"))
}

message += fmt.Sprintf("\n\n%s", output.Numeric(count, titleStyle.Render("RETRIEVE THE INITIAL ADMIN PASSWORD:")))
message += fmt.Sprintf("\n\n%s", output.Numeric(count, "%s", titleStyle.Render("RETRIEVE THE INITIAL ADMIN PASSWORD:")))
count++
message += "Run the following command to get the initial admin password:\n\n"
message += fmt.Sprintf("\t%s\n\n", commandStyle.Render("everestctl accounts initial-admin-password"))
message += output.Warn("NOTE: The initial password is stored in plain text. For security, change it immediately using the following command:\n")
message += fmt.Sprintf("\t%s", commandStyle.Render("everestctl accounts set-password --username admin"))

message += fmt.Sprintf("\n\n%s", output.Numeric(count, titleStyle.Render("ACCESS THE EVEREST UI:")))
message += fmt.Sprintf("\n\n%s", output.Numeric(count, "%s", titleStyle.Render("ACCESS THE EVEREST UI:")))
count++
message += "To access the web UI, set up port-forwarding and visit http://localhost:8080 in your browser:\n\n"
message += fmt.Sprintf("\t%s\n", commandStyle.Render("kubectl port-forward -n everest-system svc/everest 8080:8080"))
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/namespaces/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (n *NamespaceAdder) GetNamespaceInstallSteps(ctx context.Context, dbNSChart
err := n.validateNamespaceUpdate(ctx, namespace)
if errors.Is(err, ErrCannotRemoveOperators) {
msg := "Removal of an installed operator is not supported. Proceeding without removal."
_, _ = fmt.Fprint(os.Stdout, output.Warn(msg)) //nolint:govet
_, _ = fmt.Fprint(os.Stdout, output.Warn("%s", msg))
n.l.Warn(msg)
break
} else if err != nil {
Expand Down
4 changes: 1 addition & 3 deletions tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/percona/everest/tools

go 1.23.0

toolchain go1.23.4
go 1.24

require (
github.com/daixiang0/gci v0.13.5
Expand Down

0 comments on commit 357d16a

Please sign in to comment.