Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add retries when running git fetch #2405

Merged
merged 4 commits into from
Dec 2, 2024
Merged

Conversation

mazhelez
Copy link
Contributor

@mazhelez mazhelez commented Nov 26, 2024

Issue:
Builds sometimes fail with:

Error: Unexpected error when running action. Error Message: Unable to find repoVersion in AL-Go-Settings.json, StackTrace: at Get-MaxAllowedObsoleteVersion, D:\a\BCApps\BCApps\build\scripts\GuardingV2ExtensionsHelper.psm1: line 264 <- at Update-AppSourceCopVersion, D:\a\BCApps\BCApps\build\scripts\GuardingV2ExtensionsHelper.psm1: line 208 <- at Enable-BreakingChangesCheck, D:\a\BCApps\BCApps\build\scripts\GuardingV2ExtensionsHelper.psm1: line 67 <- at <ScriptBlock>, D:\a\BCApps\BCApps\build\scripts\PreCompileApp.ps1: line 63 <- at <ScriptBlock>, D:\a\BCApps\BCApps\build\projects\System Application\.AL-Go\PreCompileApp.ps1: line 7 <- at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.29-preview1267\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 2070 <- at <ScriptBlock>

The underlying error is

  fatal: unable to access 'https://github.com/microsoft/BCApps/': Recv failure: Connection was aborted
  fatal: invalid object name 'origin/main'.

or sometimes

  fatal: unable to access 'https://github.com/microsoft/BCApps/': OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0
  fatal: invalid object name 'origin/main'.

Solution:
Add retries when running git fetch to catch the instability.

Fixes AB#557642

@mazhelez mazhelez requested a review from a team as a code owner November 26, 2024 09:26
@github-actions github-actions bot added the Build: scripts & configs Build scripts and configuration files label Nov 26, 2024
@mazhelez mazhelez requested a review from aholstrup1 November 26, 2024 09:27
@github-actions github-actions bot added this to the Version 26.0 milestone Nov 26, 2024
@mazhelez mazhelez changed the title Fetch .github/AL-Go-Settings.json from the local main branch, instead of the remote Add retries when running git fetch Nov 26, 2024
@mazhelez mazhelez enabled auto-merge (squash) November 28, 2024 12:29
@mazhelez mazhelez merged commit 9b6cf1d into main Dec 2, 2024
31 checks passed
@mazhelez mazhelez deleted the mazhelez/instability-repo-version branch December 2, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build: scripts & configs Build scripts and configuration files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants