Retry when doing multiple commits to same repo
@@ -183,8 +183,13 @@ func resourceGitRepositoryFileCreate(d *schema.ResourceData, m interface{}) erro
_, err = clients.GitReposClient.CreatePush(ctx, *args)
if err != nil {
+ // Retry if commit has already occured
+ if utils.ResponseContainsStatusMessage(err, "has already been updated by another client") {
+ return resource.RetryableError(err)
+ } else {
return resource.NonRetryableError(err)
}
+ }
return nil
})
