From 23d98fbc2ca054d48b669340af55ac99ee965617 Mon Sep 17 00:00:00 2001 From: Selvi Kadirvel Date: Sun, 24 Aug 2025 16:51:45 -0700 Subject: [PATCH 1/3] Include handling of families c4d and m4 for GCP --- .../cloudinfo/providers/google/cloudinfo.go | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/internal/cloudinfo/providers/google/cloudinfo.go b/internal/cloudinfo/providers/google/cloudinfo.go index ff908991..4cca9d86 100755 --- a/internal/cloudinfo/providers/google/cloudinfo.go +++ b/internal/cloudinfo/providers/google/cloudinfo.go @@ -38,15 +38,15 @@ import ( const svcGke = "gke" var regionNames = map[string]string{ - "asia-east1": "Asia Pacific (Taiwan)", - "asia-east2": "Asia Pacific (Hong Kong)", - "asia-northeast1": "Asia Pacific (Tokyo)", - "asia-northeast2": "Asia Pacific (Osaka)", - "asia-northeast3": "Asia Pacific (Seoul)", - "asia-south1": "Asia Pacific (Mumbai)", - "asia-south2": "Asia Pacific (Delhi)", - "asia-southeast1": "Asia Pacific (Singapore)", - "asia-southeast2": "Asia Pacific (Jakarta)", + "asia-east1": "Asia Pacific (Taiwan)", + "asia-east2": "Asia Pacific (Hong Kong)", + "asia-northeast1": "Asia Pacific (Tokyo)", + "asia-northeast2": "Asia Pacific (Osaka)", + "asia-northeast3": "Asia Pacific (Seoul)", + "asia-south1": "Asia Pacific (Mumbai)", + "asia-south2": "Asia Pacific (Delhi)", + "asia-southeast1": "Asia Pacific (Singapore)", + "asia-southeast2": "Asia Pacific (Jakarta)", "australia-southeast1": "Asia Pacific (Sydney)", "australia-southeast2": "Asia Pacific (Melbourne)", @@ -257,7 +257,8 @@ func (g *GceInfoer) Initialize() (map[string]map[string]types.Price, error) { func isSupportedFamily(family string) bool { return family == "a2" || family == "a3" || family == "c3" || family == "c3d" || family == "c4" || family == "e2" || family == "g2" || family == "h3" || family == "n2" || family == "n4" || family == "m3" || - family == "c4a" || family == "t2a" || family == "n2d" || family == "c2d" || family == "t2d" || family == "z3" + family == "c4a" || family == "t2a" || family == "n2d" || family == "c2d" || family == "t2d" || family == "z3" || + family == "c4d" || family == "m4" } func (g *GceInfoer) getPrice() (map[string]map[string]map[string]float64, error) { @@ -331,7 +332,7 @@ func (g *GceInfoer) getPrice() (map[string]map[string]map[string]float64, error) } resMatch := (descSplit[1] == "Instance" && (descSplit[2] == "Ram" || descSplit[2] == "Core")) || (descSplit[2] == "Instance" && (descSplit[3] == "Ram" || descSplit[3] == "Core") && - (descSplit[1] == "Memory-optimized" || descSplit[1] == "Arm" || descSplit[1] == "AMD")) + (descSplit[1] == "Memory-optimized" || descSplit[1] == "Arm" || descSplit[1] == "AMD")) if !resMatch { continue } From fcedc6c2e60150d108892a2dcd4047d3db2efe2a Mon Sep 17 00:00:00 2001 From: Selvi Kadirvel Date: Sun, 24 Aug 2025 17:12:09 -0700 Subject: [PATCH 2/3] Include family a4 in GCP --- internal/cloudinfo/providers/google/cloudinfo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cloudinfo/providers/google/cloudinfo.go b/internal/cloudinfo/providers/google/cloudinfo.go index 4cca9d86..e621e53f 100755 --- a/internal/cloudinfo/providers/google/cloudinfo.go +++ b/internal/cloudinfo/providers/google/cloudinfo.go @@ -258,7 +258,7 @@ func isSupportedFamily(family string) bool { return family == "a2" || family == "a3" || family == "c3" || family == "c3d" || family == "c4" || family == "e2" || family == "g2" || family == "h3" || family == "n2" || family == "n4" || family == "m3" || family == "c4a" || family == "t2a" || family == "n2d" || family == "c2d" || family == "t2d" || family == "z3" || - family == "c4d" || family == "m4" + family == "c4d" || family == "m4" || family == "a4" } func (g *GceInfoer) getPrice() (map[string]map[string]map[string]float64, error) { From aa95a6656c6ded997007d788afbfb69f68dd2ef2 Mon Sep 17 00:00:00 2001 From: Selvi Kadirvel Date: Sun, 24 Aug 2025 17:56:16 -0700 Subject: [PATCH 3/3] Update github workflow action from v2 to v3 --- .github/workflows/ci.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3db35d15..e701f79e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,7 +29,7 @@ jobs: - name: Cache Go module dependencies id: cache-go-module-dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/go/pkg/mod key: go-mod-cache-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('go.sum') }} @@ -44,7 +44,7 @@ jobs: - name: Cache licenses id: cache-licenses - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: .licensei.cache key: licensei-v1-${{ steps.set-git-refname.outputs.git_refname }}-${{ hashFiles('go.sum') }} @@ -89,7 +89,7 @@ jobs: - name: Cache Go module dependencies id: cache-go-module-dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/go/pkg/mod key: go-mod-cache-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('go.sum') }} @@ -116,7 +116,7 @@ jobs: - name: Restore Go module dependencies cache id: cache-go-module-dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/go/pkg/mod key: go-mod-cache-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('go.sum') }} @@ -143,7 +143,7 @@ jobs: - name: Restore Go module dependencies cache id: cache-go-module-dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/go/pkg/mod key: go-mod-cache-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('go.sum') }}