@@ -98,6 +98,14 @@ variables:
9898 OriginalCommitId : $[coalesce(variables['System.PullRequest.SourceCommitId'], variables['Build.SourceVersion'])]
9999 NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY : true
100100 NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY : 3,1000
101+ # Retry parameters for network operations to improve CI resilency
102+ CURL_RETRY_FLAGS : ' --retry 5 --retry-delay 2 --retry-connrefused --connect-timeout 30 --max-time 120'
103+ GIT_RETRY_CONFIG : ' -c http.retry=5 -c http.retryDelay=2'
104+ GIT_HTTP_RETRY : 5
105+ GIT_HTTP_RETRY_DELAY : 2
106+ PWSH_MAX_RETRY_COUNT : 5
107+ PWSH_RETRY_INTERVAL_SEC : 2
108+ PWSH_TIMEOUT_SEC : 120
101109 DefaultTimeout : 60
102110 DD_INSTRUMENTATION_TELEMETRY_ENABLED : 0
103111 NUKE_TELEMETRY_OPTOUT : 1
@@ -198,7 +206,7 @@ stages:
198206 echo "Using target branch $TARGET_BRANCH"
199207
200208 rm -rf ./s
201- git clone --quiet --no-checkout --depth 1 --branch $TARGET_BRANCH $BUILD_REPOSITORY_URI ./s
209+ git $(GIT_RETRY_CONFIG) clone --quiet --no-checkout --depth 1 --branch $TARGET_BRANCH $BUILD_REPOSITORY_URI ./s
202210 cd s
203211 TARGET_SHA=$(git rev-parse origin/$TARGET_BRANCH)
204212 rm -rf ./s
@@ -4258,7 +4266,8 @@ stages:
42584266 REF=$(Build.SourceBranch)
42594267 BRANCH_NAME="latest_snapshot"
42604268 if [ "$(Build.Reason)" = "PullRequest" ]; then
4261- LABELS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
4269+ LABELS=$(curl -s $(CURL_RETRY_FLAGS) \
4270+ -H "Authorization: token $GITHUB_TOKEN" \
42624271 "https://api.github.com/repos/DataDog/dd-trace-dotnet/pulls/$(System.PullRequest.PullRequestNumber)" \
42634272 | jq -r '.labels[].name')
42644273
@@ -4277,6 +4286,7 @@ stages:
42774286
42784287 echo "Creating dispatch event for https://github.com/DataDog/dd-trace-dotnet/actions/workflows/create-system-test-docker-base-images.yml with ref=$REF and azdo_build_id=$(Build.BuildId) and is_release_version=False"
42794288 curl \
4289+ $(CURL_RETRY_FLAGS) \
42804290 -X POST \
42814291 -H "Accept: application/vnd.github+json" \
42824292 -H "Authorization: token $GITHUB_TOKEN"\
@@ -4734,7 +4744,7 @@ stages:
47344744 versionSpec : ' 3.12'
47354745 displayName : Install python 3.12
47364746
4737- - script : git clone --depth 1 https://github.com/DataDog/system-tests.git
4747+ - script : git $(GIT_RETRY_CONFIG) clone --depth 1 https://github.com/DataDog/system-tests.git
47384748 displayName : Get system tests repo
47394749
47404750 - script : |
@@ -4836,7 +4846,7 @@ stages:
48364846 versionSpec : ' 3.12'
48374847 displayName : Install python 3.12
48384848
4839- - script : git clone --depth 1 https://github.com/DataDog/system-tests.git
4849+ - script : git $(GIT_RETRY_CONFIG) clone --depth 1 https://github.com/DataDog/system-tests.git
48404850 displayName : Get system tests repo
48414851
48424852 - template : steps/download-artifact.yml
@@ -6284,7 +6294,7 @@ stages:
62846294
62856295 - script : |
62866296 python --version
6287- pip install ddapm-test-agent
6297+ pip install --retries 5 --timeout 120 ddapm-test-agent
62886298
62896299 # copied from run-snapshot-test
62906300 echo "##vso[task.setvariable variable=TOKEN]$(System.JobId)"
@@ -6304,6 +6314,7 @@ stages:
63046314 failOnStderr: true
63056315
63066316 - script : |
6317+ dotnet --info
63076318 dotnet tool install dd-trace --tool-path $(smokeTestAppDir)/publish --add-source $(smokeTestAppDir)/artifacts/. --version $(ToolVersion)
63086319 displayName: Install tracer
63096320
0 commit comments