Skip to content

Commit 1a72b45

Browse files
authored
Merge pull request #13777 from prezha/fix-k8s-versions
use upstream github project's release versions' tags insted of just release tags for stable, latest and edge
2 parents f3e7565 + 1033e05 commit 1a72b45

File tree

6 files changed

+8
-12
lines changed

6 files changed

+8
-12
lines changed

Diff for: go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ require (
2424
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
2525
github.com/google/go-cmp v0.5.8
2626
github.com/google/go-containerregistry v0.6.0
27-
github.com/google/go-github/v36 v36.0.0
2827
github.com/google/slowjam v1.0.0
2928
github.com/google/uuid v1.3.0
3029
github.com/hashicorp/go-getter v1.6.1

Diff for: go.sum

-2
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,6 @@ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
576576
github.com/google/go-containerregistry v0.6.0 h1:niQ+8XD//kKgArIFwDVBXsWVWbde16LPdHMyNwSC8h4=
577577
github.com/google/go-containerregistry v0.6.0/go.mod h1:euCCtNbZ6tKqi1E72vwDj2xZcN5ttKpZLfa/wSo5iLw=
578578
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
579-
github.com/google/go-github/v36 v36.0.0 h1:ndCzM616/oijwufI7nBRa+5eZHLldT+4yIB68ib5ogs=
580-
github.com/google/go-github/v36 v36.0.0/go.mod h1:LFlKC047IOqiglRGNqNb9s/iAPTnnjtlshm+bxp+kwk=
581579
github.com/google/go-github/v43 v43.0.0 h1:y+GL7LIsAIF2NZlJ46ZoC/D1W1ivZasT0lnWHMYPZ+U=
582580
github.com/google/go-github/v43 v43.0.0/go.mod h1:ZkTvvmCXBvsfPpTHXnH/d2hP9Y0cTbvN9kr5xqyXOIc=
583581
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=

Diff for: hack/preload-images/kubernetes.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"context"
2121
"strings"
2222

23-
"github.com/google/go-github/v36/github"
23+
"github.com/google/go-github/v43/github"
2424

2525
"k8s.io/klog/v2"
2626
)

Diff for: hack/update/github.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"golang.org/x/mod/semver"
2727
"golang.org/x/oauth2"
2828

29-
"github.com/google/go-github/v36/github"
29+
"github.com/google/go-github/v43/github"
3030
"k8s.io/klog/v2"
3131
)
3232

@@ -36,7 +36,7 @@ const (
3636
ghListPerPage = 100
3737

3838
// ghSearchLimit limits the number of searched items to be <= N * ghListPerPage.
39-
ghSearchLimit = 100
39+
ghSearchLimit = 300
4040
)
4141

4242
var (
@@ -55,13 +55,13 @@ func ghCreatePR(ctx context.Context, owner, repo, base, branch, title string, is
5555
ghc := ghClient(ctx, token)
5656

5757
// get base branch
58-
baseBranch, _, err := ghc.Repositories.GetBranch(ctx, owner, repo, base)
58+
baseBranch, _, err := ghc.Repositories.GetBranch(ctx, owner, repo, base, true)
5959
if err != nil {
6060
return nil, fmt.Errorf("unable to get base branch: %w", err)
6161
}
6262

6363
// get base commit
64-
baseCommit, _, err := ghc.Repositories.GetCommit(ctx, owner, repo, *baseBranch.Commit.SHA)
64+
baseCommit, _, err := ghc.Repositories.GetCommit(ctx, owner, repo, *baseBranch.Commit.SHA, &github.ListOptions{PerPage: ghListPerPage})
6565
if err != nil {
6666
return nil, fmt.Errorf("unable to get base commit: %w", err)
6767
}
@@ -216,12 +216,12 @@ func GHReleases(ctx context.Context, owner, repo string) (stable, latest, edge s
216216
// walk through the paginated list of up to ghSearchLimit newest releases
217217
opts := &github.ListOptions{PerPage: ghListPerPage}
218218
for (opts.Page+1)*ghListPerPage <= ghSearchLimit {
219-
rls, resp, err := ghc.Repositories.ListTags(ctx, owner, repo, opts)
219+
rls, resp, err := ghc.Repositories.ListReleases(ctx, owner, repo, opts)
220220
if err != nil {
221221
return "", "", "", err
222222
}
223223
for _, rl := range rls {
224-
ver := *rl.Name
224+
ver := rl.GetTagName()
225225
if !semver.IsValid(ver) {
226226
continue
227227
}

Diff for: pkg/minikube/constants/constants.go

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ var (
3232

3333
const (
3434
// DefaultKubernetesVersion is the default Kubernetes version
35-
// dont update till #10545 is solved
3635
DefaultKubernetesVersion = "v1.23.6"
3736
// NewestKubernetesVersion is the newest Kubernetes version to test against
3837
// NOTE: You may need to update coreDNS & etcd versions in pkg/minikube/bootstrapper/images/images.go

Diff for: pkg/perf/monitor/github.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"os"
2323
"time"
2424

25-
"github.com/google/go-github/v36/github"
25+
"github.com/google/go-github/v43/github"
2626
"github.com/pkg/errors"
2727
"golang.org/x/oauth2"
2828
)

0 commit comments

Comments
 (0)