Skip to content

Conversation

@mdanish-kh
Copy link
Contributor

@mdanish-kh mdanish-kh commented Apr 25, 2025

Based on discussion in #502 (comment), I thought we did retry on a sync fork failure, but after looking at the code again, it appears we don't. This change makes it so that we attempt to sync fork multiple times if the first attempt fails for any reason. Doing this as it appears users are running into this issue even with the changes made in #581 (but can't confirm if they are in fact using the latest version). I think it's generally better if we attempt retries on sync fork step.

Validation

Validated manually by setting response to have a 422 status code (to throw a GenericSyncForkException) in UpdateForkedRepoWithUpstreamCommits function as

//var response = await httpClient.PostAsync(url, content);
var response = new HttpResponseMessage
{
    StatusCode = System.Net.HttpStatusCode.UnprocessableEntity
};

Microsoft Reviewers: Open in CodeFlow

@AmelBawa-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AmelBawa-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AmelBawa-msft
Copy link
Contributor

Ignoring test fails as there seem to be a pipeline issue.

Related link: #558

@AmelBawa-msft AmelBawa-msft merged commit 76ccf86 into microsoft:main Jun 26, 2025
3 of 5 checks passed
@mdanish-kh mdanish-kh deleted the retry-sync branch June 26, 2025 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants