Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update go version and FDB versions for e2e testing #2194

Merged
merged 3 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.10
go-version: 1.23.5
- name: Get dependencies
run: curl -L --fail "https://github.com/apple/foundationdb/releases/download/${FDB_VER}/foundationdb-clients_${FDB_VER}-1_amd64.deb" -o fdb.deb
- name: Install dependencies
Expand All @@ -42,7 +42,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.10
go-version: 1.23.5
- name: Fetch all tags
run: git fetch --force --tags
- name: Get dependencies
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.10
go-version: 1.23.5
- name: Fetch all tags
run: git fetch --force --tags
- name: Get dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.10
go-version: 1.23.5
# https://github.com/goreleaser/goreleaser/issues/1311
- name: Get current semver tag
run: echo "::set-output name=CURRENT_TAG::$(git describe --tags --match "v*" --abbrev=0)"
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ linters:
- dogsled
- errcheck
- errorlint
- exportloopref
- copyloopvar
# - goconst
# - gocritic
# - gocyclo
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG FDB_VERSION=6.2.29
ARG FDB_WEBSITE=https://github.com/apple/foundationdb/releases/download

# Build the manager binary
FROM docker.io/library/golang:1.22.10 AS builder
FROM docker.io/library/golang:1.23.5 AS builder

ARG FDB_VERSION
ARG FDB_WEBSITE
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CONTROLLER_GEN_PKG?=sigs.k8s.io/controller-tools/cmd/[email protected]
CONTROLLER_GEN=$(GOBIN)/controller-gen
KUSTOMIZE_PKG?=sigs.k8s.io/kustomize/kustomize/[email protected]
KUSTOMIZE=$(GOBIN)/kustomize
GOLANGCI_LINT_PKG=github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.2
GOLANGCI_LINT_PKG=github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.4
GOLANGCI_LINT=$(GOBIN)/golangci-lint
GORELEASER_PKG=github.com/goreleaser/[email protected]
GORELEASER=$(GOBIN)/goreleaser
Expand Down
3 changes: 2 additions & 1 deletion api/v1beta2/foundationdbcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package v1beta2

import (
"errors"
"fmt"
"k8s.io/apimachinery/pkg/util/intstr"
"math"
Expand Down Expand Up @@ -2918,7 +2919,7 @@ func (cluster *FoundationDBCluster) Validate() error {
return nil
}

return fmt.Errorf(strings.Join(validations, ", "))
return errors.New(strings.Join(validations, ", "))
}

// IsTaintFeatureDisabled return true if operator is configured to not replace Pods tainted Nodes OR
Expand Down
10 changes: 5 additions & 5 deletions e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ TIMEOUT?=168h
CLUSTER_NAME?=
NAMESPACE?=
CONTEXT?=
FDB_VERSION?=7.1.63
FDB_VERSION?=7.1.57
# This will be the version used for upgrade tests.
NEXT_FDB_VERSION?=7.3.43
NEXT_FDB_VERSION?=7.3.59
## Expectation is that you are running standard build image which generates both regular and debug (Symbols) images.
FDB_IMAGE?=foundationdb/foundationdb:$(FDB_VERSION)
UNIFIED_FDB_IMAGE?=foundationdb/fdb-kubernetes-monitor:$(FDB_VERSION)
SIDECAR_IMAGE?=foundationdb/foundationdb-kubernetes-sidecar:$(FDB_VERSION)-1
FDB_IMAGE?=foundationdb/foundationdb
UNIFIED_FDB_IMAGE?=foundationdb/fdb-kubernetes-monitor
SIDECAR_IMAGE?=foundationdb/foundationdb-kubernetes-sidecar
OPERATOR_IMAGE?=foundationdb/fdb-kubernetes-operator:latest
REGISTRY?=docker.io
CLEANUP?=true
Expand Down
16 changes: 0 additions & 16 deletions e2e/fixtures/cluster_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,22 +517,6 @@ func (config *ClusterConfig) CalculateRoleCounts() fdbv1beta2.RoleCounts {
return roleCounts
}

func max(a int, b int) int {
if a > b {
return a
}

return b
}

func min(a int, b int) int {
if a < b {
return a
}

return b
}

func calculateProxies(proxies int) (int, int) {
// This calculation is only a rough estimate and can change based on the workload.
// Use 1/4 of the proxies for GRV or at max 4 processes
Expand Down
12 changes: 4 additions & 8 deletions e2e/fixtures/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ func Unprintable(val string) ([]byte, error) {
if c == '\\' {
i++
if i == len(val) {
return nil, fmt.Errorf(fmt.Sprintf("end after one \\ when unprint [%s]", val))
return nil, fmt.Errorf("end after one \\ when unprint [%s]", val)
}
switch val[i] {
case '\\':
Expand All @@ -497,9 +497,7 @@ func Unprintable(val string) ([]byte, error) {
case 'x':
{
if i+2 >= len(val) {
return nil, fmt.Errorf(
fmt.Sprintf("not have two chars after \\x when unprint [%s]", val),
)
return nil, fmt.Errorf("not have two chars after \\x when unprint [%s]", val)
}
d1, err := unhex(val[i+1])
if err != nil {
Expand All @@ -514,9 +512,7 @@ func Unprintable(val string) ([]byte, error) {
}
default:
{
return nil, fmt.Errorf(
fmt.Sprintf("after \\ it's neither \\ nor x when unprint %s", val),
)
return nil, fmt.Errorf("after \\ it's neither \\ nor x when unprint %s", val)
}
}
} else {
Expand All @@ -538,5 +534,5 @@ func unhex(c byte) (int, error) {
return int(c - 'A' + 10), nil
}

return -1, fmt.Errorf(fmt.Sprintf("failed to unhex %x", c))
return -1, fmt.Errorf("failed to unhex %x", c)
}
5 changes: 3 additions & 2 deletions kubectl-fdb/cmd/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package cmd

import (
"encoding/json"
"errors"
"fmt"
"strings"
"time"
Expand Down Expand Up @@ -158,7 +159,7 @@ func newAnalyzeCmd(streams genericclioptions.IOStreams) *cobra.Command {
errMsg.WriteString(err.Error())
}

return fmt.Errorf(errMsg.String())
return errors.New(errMsg.String())
}

return nil
Expand Down Expand Up @@ -219,7 +220,7 @@ func allConditionsValid(conditions []string) error {
return nil
}

return fmt.Errorf(errString.String())
return errors.New(errString.String())
}

func analyzeCluster(cmd *cobra.Command, kubeClient client.Client, cluster *fdbv1beta2.FoundationDBCluster, autoFix bool, wait bool, ignoreConditions []string, ignoreRemovals bool) error {
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/buggify_crash_loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func newBuggifyCrashLoop(streams genericclioptions.IOStreams) *cobra.Command {
if err != nil {
return err
}
clear, err := cmd.Flags().GetBool("clear")
clearFlag, err := cmd.Flags().GetBool("clear")
if err != nil {
return err
}
Expand All @@ -70,7 +70,7 @@ func newBuggifyCrashLoop(streams genericclioptions.IOStreams) *cobra.Command {
buggifyProcessGroupOptions{
containerName: containerName,
wait: wait,
clear: clear,
clear: clearFlag,
clean: clean,
},
processGroupSelectionOpts,
Expand Down
4 changes: 2 additions & 2 deletions kubectl-fdb/cmd/buggify_no_schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func newBuggifyNoSchedule(streams genericclioptions.IOStreams) *cobra.Command {
if err != nil {
return err
}
clear, err := cmd.Flags().GetBool("clear")
clearFlag, err := cmd.Flags().GetBool("clear")
if err != nil {
return err
}
Expand All @@ -64,7 +64,7 @@ func newBuggifyNoSchedule(streams genericclioptions.IOStreams) *cobra.Command {
return updateNoScheduleList(cmd, kubeClient,
buggifyProcessGroupOptions{
wait: wait,
clear: clear,
clear: clearFlag,
clean: clean,
}, processGroupSelectionOpts)
},
Expand Down
Loading