fix(migrations): cancel GitLab version probes (#39023)

Bind the GitLab version probe to the migration context so a cancelled
migration does not remain blocked on a remote response.
This commit is contained in:
bircni
2026-08-22 03:54:07 +02:00
committed by GitHub
parent d2bc0097bc
commit 1f349eb1eb
2 changed files with 24 additions and 1 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ func NewGitlabDownloader(ctx context.Context, baseURL, repoPath, token string) (
var resp *gitlab.Response
u, _ := url.Parse(baseURL)
for len(pathParts) >= 2 {
_, resp, err = gitlabClient.Version.GetVersion()
_, resp, err = gitlabClient.Version.GetVersion(gitlab.WithContext(ctx))
if err == nil || resp != nil && resp.StatusCode == http.StatusUnauthorized {
err = nil // if no authentication given, this still should work
break