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

[WIP] PR to debug transient .NET isolated CI failures #2921

Draft
wants to merge 8 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/smoketest-dotnet-isolated-v4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:

# Validation is blocked on https://github.com/Azure/azure-functions-host/issues/7995
- name: Run V4 .NET Isolated Smoke Test
run: test/SmokeTests/e2e-test.ps1 -DockerfilePath test/SmokeTests/OOProcSmokeTests/DotNetIsolated/Dockerfile -HttpStartPath api/StartHelloCitiesTyped -NoValidation
run: test/SmokeTests/e2e-test.ps1 -DockerfilePath test/SmokeTests/OOProcSmokeTests/DotNetIsolated/Dockerfile -HttpStartPath api/StartHelloCitiesTyped
shell: pwsh
42 changes: 20 additions & 22 deletions test/SmokeTests/e2e-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ param(
[string]$ImageName="dfapp",
[string]$ContainerName="app",
[switch]$NoSetup=$false,
[switch]$NoValidation=$false,
[int]$Sleep=30,
[switch]$SetupSQLServer=$false,
[string]$pw="$env:SA_PASSWORD",
Expand Down Expand Up @@ -107,34 +106,33 @@ try {
$pingUrl = "http://localhost:8080/admin/host/ping"
Write-Host "Pinging app at $pingUrl to ensure the host is healthy" -ForegroundColor Yellow
Invoke-RestMethod -Method Post -Uri "http://localhost:8080/admin/host/ping"
Write-Host "Host is healthy" -ForegroundColor Green
Exit-OnError

if ($NoValidation -eq $false) {
# Note that any HTTP protocol errors (e.g. HTTP 4xx or 5xx) will cause an immediate failure
$startOrchestrationUri = "http://localhost:8080/$HttpStartPath"
Write-Host "Starting a new orchestration instance via POST to $startOrchestrationUri..." -ForegroundColor Yellow
# Note that any HTTP protocol errors (e.g. HTTP 4xx or 5xx) will cause an immediate failure
$startOrchestrationUri = "http://localhost:8080/$HttpStartPath"
Write-Host "Starting a new orchestration instance via POST to $startOrchestrationUri..." -ForegroundColor Yellow

$result = Invoke-RestMethod -Method Post -Uri $startOrchestrationUri
Write-Host "Started orchestration with instance ID '$($result.id)'!" -ForegroundColor Yellow
Write-Host "Waiting for orchestration to complete..." -ForegroundColor Yellow
$result = Invoke-RestMethod -Method Post -Uri $startOrchestrationUri
Write-Host "Started orchestration with instance ID '$($result.id)'!" -ForegroundColor Yellow
Write-Host "Waiting for orchestration to complete..." -ForegroundColor Yellow

$retryCount = 0
$success = $false
$statusUrl = $result.statusQueryGetUri
$retryCount = 0
$success = $false
$statusUrl = $result.statusQueryGetUri

while ($retryCount -lt 15) {
$result = Invoke-RestMethod -Method Get -Uri $statusUrl
$runtimeStatus = $result.runtimeStatus
Write-Host "Orchestration is $runtimeStatus" -ForegroundColor Yellow
while ($retryCount -lt 15) {
$result = Invoke-RestMethod -Method Get -Uri $statusUrl
$runtimeStatus = $result.runtimeStatus
Write-Host "Orchestration is $runtimeStatus" -ForegroundColor Yellow

if ($result.runtimeStatus -eq "Completed") {
$success = $true
break
}

Start-Sleep -Seconds 1
$retryCount = $retryCount + 1
if ($result.runtimeStatus -eq "Completed") {
$success = $true
break
}

Start-Sleep -Seconds 1
$retryCount = $retryCount + 1
}

if ($success -eq $false) {
Expand Down
Loading