diff --git a/.github/workflows/_function_app_deploy.yml b/.github/workflows/_function_app_deploy.yml index b9172c67..682a4b27 100644 --- a/.github/workflows/_function_app_deploy.yml +++ b/.github/workflows/_function_app_deploy.yml @@ -49,7 +49,7 @@ on: description: Time between canary traffic increment steps type: number required: false - default: 300000 + default: 100000 concurrency: group: ${{ github.workflow }}-cd cancel-in-progress: true @@ -251,7 +251,17 @@ jobs: # Wait the specified time before the next iteration delaySeconds=$((afterMs / 1000)) echo "Waiting for $delaySeconds seconds..." - sleep $delaySeconds + + while [ "$delaySeconds" -gt 0 ]; do + if [ "$delaySeconds" -gt 10 ]; then + sleep 10 + delaySeconds=$((delaySeconds - 10)) + echo "Waiting for $delaySeconds seconds..." + else + sleep "$delaySeconds" + delaySeconds=0 + fi + done # If nextIncrementPercentage reach 100 # the loop is interrupted diff --git a/apps/io-web-profile/src/deployment/canary.ts b/apps/io-web-profile/src/deployment/canary.ts index 8feec36a..c4ddfcdb 100644 --- a/apps/io-web-profile/src/deployment/canary.ts +++ b/apps/io-web-profile/src/deployment/canary.ts @@ -23,7 +23,9 @@ const params: RequestsQueryParams[] = [ { query: ` AppRequests - | where TimeGenerated > ago(5m) + | where TimeGenerated > ago(${Math.floor( + canaryConfig.CANARY_NEXT_STEP_AFTER_MS / 1000 + )}s) | where AppRoleName == "${canaryConfig.FUNCTION_APP_NAME}-staging" | summarize totalRequests = count(), failedRequests = countif(toint(ResultCode) > 499) `,