From 51081d522e1b699ca0fefd00726ba716a34ea2e4 Mon Sep 17 00:00:00 2001 From: Andrew Marine Date: Thu, 5 Feb 2026 02:15:41 -0700 Subject: [PATCH 1/2] temporarily disable go version checks --- VERSION | 5 +-- cmd/goci/main.go | 92 ++++++++++++++++++++++++------------------------ 2 files changed, 49 insertions(+), 48 deletions(-) diff --git a/VERSION b/VERSION index 38d9e26..4f900ad 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,7 @@ -v1.5.3 -Push Docker images to one ECR region +v1.5.4 +Temporarily disable Go version checks Previously: +- Push Docker images to one ECR region - add option to pass branch name and dryRun to catalog-sync - add shared workflow for Claude actions diff --git a/cmd/goci/main.go b/cmd/goci/main.go index 4037ccd..614703e 100644 --- a/cmd/goci/main.go +++ b/cmd/goci/main.go @@ -2,17 +2,13 @@ package main import ( "context" - "errors" "fmt" "io" "net/http" "os" "regexp" - "strconv" "strings" - "golang.org/x/mod/modfile" - "github.com/Clever/catapult/gen-go/models" "github.com/Clever/ci-scripts/internal/backstage" "github.com/Clever/ci-scripts/internal/catapult" @@ -165,56 +161,60 @@ func validateRun() error { return &ValidationError{Message: fmt.Sprintf("branch name %s contains a `/` character, which is not supported by catapult", environment.Branch())} } - latestGoVersion, releaseDate, err := fetchLatestGoVersion() - if err != nil { - return fmt.Errorf("failed to fetch latest Go version: %v", err) - } + // TODO: Re-enable Go version check after golden images project is complete + // Go version check temporarily disabled for golden images project + /* + latestGoVersion, releaseDate, err := fetchLatestGoVersion() + if err != nil { + return fmt.Errorf("failed to fetch latest Go version: %v", err) + } - goModPath := "./go.mod" - fileBytes, err := os.ReadFile(goModPath) - // If the go.mod file is not found, we will skip the go version check - if errors.Is(err, os.ErrNotExist) { - return nil - } else if err != nil { - return fmt.Errorf("failed to read go.mod file: %v", err) - } + goModPath := "./go.mod" + fileBytes, err := os.ReadFile(goModPath) + // If the go.mod file is not found, we will skip the go version check + if errors.Is(err, os.ErrNotExist) { + return nil + } else if err != nil { + return fmt.Errorf("failed to read go.mod file: %v", err) + } - f, err := modfile.Parse("./go.mod", fileBytes, nil) - if err != nil { - return fmt.Errorf("failed to parse go.mod file: %v", err) - } + f, err := modfile.Parse("./go.mod", fileBytes, nil) + if err != nil { + return fmt.Errorf("failed to parse go.mod file: %v", err) + } - // trim the patch value from the authoring repositories go version - if 2 dots are present - var trimmedVersion string - if strings.Count(f.Go.Version, ".") == 2 { - trimmedVersion = f.Go.Version[:len(f.Go.Version)-2] - } else { - trimmedVersion = f.Go.Version - } + // trim the patch value from the authoring repositories go version - if 2 dots are present + var trimmedVersion string + if strings.Count(f.Go.Version, ".") == 2 { + trimmedVersion = f.Go.Version[:len(f.Go.Version)-2] + } else { + trimmedVersion = f.Go.Version + } - repoVersion, e := strconv.ParseFloat(trimmedVersion, 64) + repoVersion, e := strconv.ParseFloat(trimmedVersion, 64) - if e != nil { - return fmt.Errorf("failed to parse go version: %v", e) - } + if e != nil { + return fmt.Errorf("failed to parse go version: %v", e) + } - // We will begin enforcing this policy for go version 1.24 and above, for now set the minimum version to 1.23 - var enforceGoVersionUpgrade float64 = 1.23 + // We will begin enforcing this policy for go version 1.24 and above, for now set the minimum version to 1.23 + var enforceGoVersionUpgrade float64 = 1.23 - // trim the patch value from the latest go version - latestGoVersion = latestGoVersion[:len(latestGoVersion)-2] - newestGoVersion, e := strconv.ParseFloat(latestGoVersion, 64) - if e != nil { - return fmt.Errorf("failed to parse go version: %v", e) - } + // trim the patch value from the latest go version + latestGoVersion = latestGoVersion[:len(latestGoVersion)-2] + newestGoVersion, e := strconv.ParseFloat(latestGoVersion, 64) + if e != nil { + return fmt.Errorf("failed to parse go version: %v", e) + } - // Once 1.23 is no longer supported, we will enforce the policy for 1.24 and above - if (repoVersion <= enforceGoVersionUpgrade) && (enforceGoVersionUpgrade < newestGoVersion-0.01) { - return &ValidationError{Message: fmt.Sprintf("Your applications go version %v is no longer supported. Please upgrade to version %v.", repoVersion, newestGoVersion)} - } else if repoVersion <= newestGoVersion-0.01 { - // We'll give a PR comment to the Author to warn them about the need to upgrade - fmt.Printf("A new Go version is out, released on (%v). After 6 months of release, Your current Go version (%v) will fail CI workflows if it is not upgraded.\n", releaseDate, f.Go.Version) - } + // Once 1.23 is no longer supported, we will enforce the policy for 1.24 and above + if (repoVersion <= enforceGoVersionUpgrade) && (enforceGoVersionUpgrade < newestGoVersion-0.01) { + return &ValidationError{Message: fmt.Sprintf("Your applications go version %v is no longer supported. Please upgrade to version %v.", repoVersion, newestGoVersion)} + } else if repoVersion <= newestGoVersion-0.01 { + // We'll give a PR comment to the Author to warn them about the need to upgrade + fmt.Printf("A new Go version is out, released on (%v). After 6 months of release, Your current Go version (%v) will fail CI workflows if it is not upgraded.\n", releaseDate, f.Go.Version) + } + */ return nil } From 27fb46f12f71259b6c123ac22936425bc9eee723 Mon Sep 17 00:00:00 2001 From: Andrew Marine Date: Thu, 5 Feb 2026 02:17:08 -0700 Subject: [PATCH 2/2] run go mod tidy to mark golang.org/x/mod as indirect --- go.mod | 2 +- go.sum | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 883247a..9b0dcd1 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,6 @@ require ( github.com/docker/docker v23.0.2+incompatible github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 github.com/moby/buildkit v0.11.5 - golang.org/x/mod v0.25.0 golang.org/x/sync v0.15.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -69,6 +68,7 @@ require ( github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/sirupsen/logrus v1.9.0 // indirect go.mongodb.org/mongo-driver v1.17.4 // indirect + golang.org/x/mod v0.25.0 // indirect golang.org/x/net v0.41.0 // indirect golang.org/x/sys v0.33.0 // indirect golang.org/x/time v0.12.0 // indirect diff --git a/go.sum b/go.sum index 7be7c11..3538b62 100644 --- a/go.sum +++ b/go.sum @@ -3,16 +3,8 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg6 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Clever/catapult/gen-go/models v1.206.0 h1:O338A6BsJXawrcj1YRDzceapfv7kWhGSo2n91S47Uoo= github.com/Clever/catapult/gen-go/models v1.206.0/go.mod h1:a2Mjvx842kCgdnwgCbF8S361vdrDTeeDG/iowbCjkB0= -github.com/Clever/circle-ci-integrations/gen-go/client v0.0.0-20250515140338-c4907a8ff0c0 h1:hFKnyXa1O9DdMA270JK+8QLtEljl4p1VxMh3qHFmN6s= -github.com/Clever/circle-ci-integrations/gen-go/client v0.0.0-20250515140338-c4907a8ff0c0/go.mod h1:zfaHIz55lTkvsMS9jIL11l9szB8ThG0RenysMz35/e4= -github.com/Clever/circle-ci-integrations/gen-go/client v0.0.0-20251112223700-5c855479cbac h1:rWhJx24guNjw33aa3c/CHtCKpqqsak+uUvWlOOMGm6Y= -github.com/Clever/circle-ci-integrations/gen-go/client v0.0.0-20251112223700-5c855479cbac/go.mod h1:wpdliPGHx46byqcV9J05VN7JUoGb5NDZFxVt7PQpMQ0= github.com/Clever/circle-ci-integrations/gen-go/client v0.14.0 h1:O4XAIg8zcree7X7WVqjc2+z1a9Z13eXiiFXE6xa5hEs= github.com/Clever/circle-ci-integrations/gen-go/client v0.14.0/go.mod h1:wpdliPGHx46byqcV9J05VN7JUoGb5NDZFxVt7PQpMQ0= -github.com/Clever/circle-ci-integrations/gen-go/models v0.0.0-20250515140338-c4907a8ff0c0 h1:8Dz3nDusLZlF2Te4FdmLO2/J9WJ1rdCsd+7BuE/UCjw= -github.com/Clever/circle-ci-integrations/gen-go/models v0.0.0-20250515140338-c4907a8ff0c0/go.mod h1:mHbAHSsROUodDWapy/Po6KKrpmXzTl1DKIpRKTY2Yz0= -github.com/Clever/circle-ci-integrations/gen-go/models v0.0.0-20251112223700-5c855479cbac h1:NdpzsAyAzCmZMt+YQsEk6hHtAsf128qSmOuFbLRCsS4= -github.com/Clever/circle-ci-integrations/gen-go/models v0.0.0-20251112223700-5c855479cbac/go.mod h1:t6kpy0bDHmkDfPkxpoc1DE49mBfo0DbEh9e5MZAJDTc= github.com/Clever/circle-ci-integrations/gen-go/models v0.14.0 h1:5Ys+a5lnL/GxEMxHHTu3BEjGcChQ/bFzlAHBP4zfoAo= github.com/Clever/circle-ci-integrations/gen-go/models v0.14.0/go.mod h1:t6kpy0bDHmkDfPkxpoc1DE49mBfo0DbEh9e5MZAJDTc= github.com/Clever/discovery-go v1.9.1 h1:4swV6hvVOeEVVVHkSaArczkrLlWfjXF+EtUfErcrFro=