Skip to content

Commit a92f304

Browse files
quinna-hbouwkast
authored andcommitted
hardcode k8s.io
1 parent 9bf9c68 commit a92f304

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/apps/new_latest_major_versions.go

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ func fetchGoMod(origin, tag string) (*modfile.File, error) {
100100

101101
url := fmt.Sprintf("https://raw.githubusercontent.com/%s/refs/tags/%s/go.mod", repoPath, tag)
102102

103-
// log.Printf("fetching %s\n", url)
104-
105103
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
106104
defer cancel()
107105

@@ -271,16 +269,13 @@ func main() {
271269
if err != nil {
272270
fmt.Printf("Error: %v\n", err)
273271
continue
274-
} else {
275-
fmt.Printf("origin URL: %s\n", origin)
276272
}
277-
278273
// 2. From the VCS url, do `git ls-remote --tags <vcs_url>` to get the tags
279274
// output:
280275
// 3. Parse the tags, and extract all the majors from them (ex v2, v3, v4)
281276
tags, err := getTags(origin)
282277
if err != nil {
283-
fmt.Println("Error fetching tags:", err)
278+
fmt.Println("Error fetching tags: %v", err)
284279
continue
285280
}
286281

@@ -318,8 +313,10 @@ func main() {
318313
for base, contribMajor := range contrib_latests {
319314
if latestGithub, ok := github_latests[base]; ok {
320315
if semver.Compare(latestGithub.Version, contribMajor) > 0 {
321-
if base == "go-redis/redis" && latestGithub.Version == "v9" {
322-
continue // go-redis/redis => redis/go-redis in v9
316+
if (base == "go-redis/redis" && latestGithub.Version == "v9") || (base == "k8s.io/client-go") {
317+
// go-redis/redis => redis/go-redis in v9
318+
// for k8s.io we provide a generic http client middleware that can be plugged with any of the versions
319+
continue
323320
}
324321
fmt.Printf("New latest major %s of repository %s on Github at module: %s\n", latestGithub.Version, base, latestGithub.Module)
325322
fmt.Printf("latest contrib major: %v\n", contribMajor)

0 commit comments

Comments
 (0)