Skip to content

Commit 50d706e

Browse files
committed
roachtest: get more tags when fetching latest
The GitHub API's tags endpoint returns 30 tags by default; there isn't an explicit ordering. The tests had been erroring as none of the returned django tabs were matches. This change fetches the maximum of 100 tags to increase the likelihood of finding matching tags and getting the latest. Correctness would require fetching all the pages. Fixes: #158186 Fixes: #158185 Fixes: #158233 Fixes: #158234 Fixes: #158177 Epic: none Release note: None
1 parent aa35135 commit 50d706e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cmd/roachtest/tests/canary.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func repeatGitCloneE(
188188
func repeatGetLatestTag(
189189
ctx context.Context, t test.Test, user string, repo string, releaseRegex *regexp.Regexp,
190190
) (string, error) {
191-
url := fmt.Sprintf("https://api.github.com/repos/%s/%s/tags", user, repo)
191+
url := fmt.Sprintf("https://api.github.com/repos/%s/%s/tags?per_page=100", user, repo)
192192
httpClient := &http.Client{Timeout: 10 * time.Second}
193193
type Tag struct {
194194
Name string

0 commit comments

Comments
 (0)