From bb280c96549970633e451071c5c944e4f4b0f4b0 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Agent Date: Thu, 19 Feb 2026 15:46:06 +0100 Subject: [PATCH 1/7] fix(ci): preflight auf main mit qodana-run synchronisieren --- tools/ci/check-code-scanning-tools-zero.sh | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/tools/ci/check-code-scanning-tools-zero.sh b/tools/ci/check-code-scanning-tools-zero.sh index 032ddb7..6650e52 100755 --- a/tools/ci/check-code-scanning-tools-zero.sh +++ b/tools/ci/check-code-scanning-tools-zero.sh @@ -104,6 +104,57 @@ else log "INFO: Event=${EVENT_NAME:-} -> pruefe Code-Scanning Alerts fuer ref=${QUERY_REF}" fi +# On main push events, code-scanning alert state can lag until the qodana workflow for the same SHA +# uploads SARIF. Wait fail-closed for that run to complete to avoid preflight race failures. +if [[ "${EVENT_NAME}" != "pull_request" && "${QUERY_REF}" == "refs/heads/main" && -n "${GITHUB_SHA:-}" ]]; then + wait_attempt=1 + wait_max_attempts=36 + wait_delay=10 + while true; do + qodana_runs_json="${OUT_DIR}/qodana-runs.json" + if ! gh api "repos/${REPO}/actions/runs?head_sha=${GITHUB_SHA}&event=push&per_page=100" > "${qodana_runs_json}" 2>> "${RAW_LOG}"; then + if (( wait_attempt >= wait_max_attempts )); then + fail "Qodana-Runstatus fuer aktuellen SHA konnte nicht geladen werden" + fi + log "WARN: Qodana-Runstatus API-Fehler, retry ${wait_attempt}/${wait_max_attempts}" + sleep "${wait_delay}" + wait_attempt=$((wait_attempt + 1)) + continue + fi + + qodana_status="$(jq -r '.workflow_runs[] | select(.name=="qodana") | .status' "${qodana_runs_json}" | head -n1)" + qodana_conclusion="$(jq -r '.workflow_runs[] | select(.name=="qodana") | .conclusion' "${qodana_runs_json}" | head -n1)" + qodana_url="$(jq -r '.workflow_runs[] | select(.name=="qodana") | .html_url' "${qodana_runs_json}" | head -n1)" + + if [[ -z "${qodana_status}" ]]; then + if (( wait_attempt >= wait_max_attempts )); then + fail "Kein qodana-Run fuer SHA=${GITHUB_SHA} gefunden" + fi + log "INFO: qodana-Run fuer SHA=${GITHUB_SHA} noch nicht sichtbar (retry ${wait_attempt}/${wait_max_attempts})" + sleep "${wait_delay}" + wait_attempt=$((wait_attempt + 1)) + continue + fi + + if [[ "${qodana_status}" != "completed" ]]; then + if (( wait_attempt >= wait_max_attempts )); then + fail "qodana-Run fuer SHA=${GITHUB_SHA} ist nicht abgeschlossen (status=${qodana_status})" + fi + log "INFO: warte auf qodana-Runabschluss (status=${qodana_status}, retry ${wait_attempt}/${wait_max_attempts})" + sleep "${wait_delay}" + wait_attempt=$((wait_attempt + 1)) + continue + fi + + if [[ "${qodana_conclusion}" != "success" ]]; then + fail "qodana-Run fuer SHA=${GITHUB_SHA} ist fehlgeschlagen (conclusion=${qodana_conclusion:-unknown}, url=${qodana_url:-n/a})" + fi + + log "INFO: qodana-Run fuer SHA=${GITHUB_SHA} erfolgreich abgeschlossen (${qodana_url:-n/a})" + break + done +fi + attempt=1 delay=2 max_attempts=3 From adeb32af2ffb58be3c84b2bea9cac0f0b6d55876 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Agent Date: Thu, 19 Feb 2026 15:48:14 +0100 Subject: [PATCH 2/7] fix(ci): qodana-sync auch fuer pr-ref preflight anwenden --- tools/ci/check-code-scanning-tools-zero.sh | 23 +++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/tools/ci/check-code-scanning-tools-zero.sh b/tools/ci/check-code-scanning-tools-zero.sh index 6650e52..f8518af 100755 --- a/tools/ci/check-code-scanning-tools-zero.sh +++ b/tools/ci/check-code-scanning-tools-zero.sh @@ -104,15 +104,27 @@ else log "INFO: Event=${EVENT_NAME:-} -> pruefe Code-Scanning Alerts fuer ref=${QUERY_REF}" fi -# On main push events, code-scanning alert state can lag until the qodana workflow for the same SHA -# uploads SARIF. Wait fail-closed for that run to complete to avoid preflight race failures. -if [[ "${EVENT_NAME}" != "pull_request" && "${QUERY_REF}" == "refs/heads/main" && -n "${GITHUB_SHA:-}" ]]; then +# Alert state can lag until the qodana workflow for the same SHA uploads SARIF. +# Wait fail-closed in both cases: +# - main push validation (ref=main), +# - PR Qodana-cleanup validation (ref=refs/pull//merge). +if [[ -n "${GITHUB_SHA:-}" ]]; then + should_wait_for_qodana="false" + if [[ "${EVENT_NAME}" != "pull_request" && "${QUERY_REF}" == "refs/heads/main" ]]; then + should_wait_for_qodana="true" + fi + if [[ "${QUERY_REF}" != "refs/heads/main" ]]; then + should_wait_for_qodana="true" + fi + + if [[ "${should_wait_for_qodana}" == "true" ]]; then wait_attempt=1 - wait_max_attempts=36 + wait_max_attempts=48 wait_delay=10 + run_event_filter="${EVENT_NAME:-push}" while true; do qodana_runs_json="${OUT_DIR}/qodana-runs.json" - if ! gh api "repos/${REPO}/actions/runs?head_sha=${GITHUB_SHA}&event=push&per_page=100" > "${qodana_runs_json}" 2>> "${RAW_LOG}"; then + if ! gh api "repos/${REPO}/actions/runs?head_sha=${GITHUB_SHA}&event=${run_event_filter}&per_page=100" > "${qodana_runs_json}" 2>> "${RAW_LOG}"; then if (( wait_attempt >= wait_max_attempts )); then fail "Qodana-Runstatus fuer aktuellen SHA konnte nicht geladen werden" fi @@ -153,6 +165,7 @@ if [[ "${EVENT_NAME}" != "pull_request" && "${QUERY_REF}" == "refs/heads/main" & log "INFO: qodana-Run fuer SHA=${GITHUB_SHA} erfolgreich abgeschlossen (${qodana_url:-n/a})" break done + fi fi attempt=1 From 1fd8efbd7f70550360b7bb6097393b859309dc7e Mon Sep 17 00:00:00 2001 From: GitHub Copilot Agent Date: Thu, 19 Feb 2026 15:49:56 +0100 Subject: [PATCH 3/7] fix(ci): qodana-sync timeout erhoehen und label-mapping erweitern --- tools/ci/check-code-scanning-tools-zero.sh | 3 ++- tools/versioning/compute-pr-labels.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/ci/check-code-scanning-tools-zero.sh b/tools/ci/check-code-scanning-tools-zero.sh index f8518af..59dcb7e 100755 --- a/tools/ci/check-code-scanning-tools-zero.sh +++ b/tools/ci/check-code-scanning-tools-zero.sh @@ -119,7 +119,8 @@ if [[ -n "${GITHUB_SHA:-}" ]]; then if [[ "${should_wait_for_qodana}" == "true" ]]; then wait_attempt=1 - wait_max_attempts=48 + # Qodana can be queued behind runner load; allow a generous fail-closed window. + wait_max_attempts=120 wait_delay=10 run_event_filter="${EVENT_NAME:-push}" while true; do diff --git a/tools/versioning/compute-pr-labels.js b/tools/versioning/compute-pr-labels.js index ac81ea6..b315e0b 100644 --- a/tools/versioning/compute-pr-labels.js +++ b/tools/versioning/compute-pr-labels.js @@ -21,6 +21,7 @@ const AREA_RULES = [ { prefix: '.qodana/', label: 'area:qodana' }, { exact: 'qodana.yaml', label: 'area:qodana' }, { exact: '.github/workflows/qodana.yml', label: 'area:qodana' }, + { exact: 'tools/ci/check-code-scanning-tools-zero.sh', label: 'area:qodana' }, { prefix: 'src/FileTypeDetection/Infrastructure/Archive', label: 'area:archive' }, { prefix: 'src/FileTypeDetection/ArchiveProcessing', label: 'area:archive' }, { exact: 'src/FileTypeDetection/EvidenceHashing.vb', label: 'area:hashing' }, From 50853f006c4f63821bee25d7db5a250d94367755 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Agent Date: Thu, 19 Feb 2026 15:51:50 +0100 Subject: [PATCH 4/7] fix(ci): qodana-change-detection um preflight-script erweitern --- tools/ci/check-code-scanning-tools-zero.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/check-code-scanning-tools-zero.sh b/tools/ci/check-code-scanning-tools-zero.sh index 59dcb7e..110ac81 100755 --- a/tools/ci/check-code-scanning-tools-zero.sh +++ b/tools/ci/check-code-scanning-tools-zero.sh @@ -79,7 +79,7 @@ if [[ "${EVENT_NAME}" == "pull_request" && -n "${GITHUB_EVENT_PATH:-}" && -f "${ if [[ -n "${pr_number}" ]]; then files_json="${OUT_DIR}/pr-files.json" if gh api "repos/${REPO}/pulls/${pr_number}/files?per_page=100" --paginate > "${files_json}" 2>> "${RAW_LOG}"; then - if jq -r '.[].filename' "${files_json}" | grep -Eiq '^(\.qodana/|qodana\.ya?ml$|\.github/workflows/qodana\.yml$)'; then + if jq -r '.[].filename' "${files_json}" | grep -Eiq '^(\.qodana/|qodana\.ya?ml$|\.github/workflows/qodana\.yml$|tools/ci/check-code-scanning-tools-zero\.sh$|tools/versioning/compute-pr-labels\.js$)'; then has_qodana_changes="true" fi else From 08dba9dec11f662af3bd37c3a29f2bf786a82b10 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Agent Date: Thu, 19 Feb 2026 15:58:03 +0100 Subject: [PATCH 5/7] fix(ci): qodana-wait in preflight auf pr-head-sha matchen --- tools/ci/check-code-scanning-tools-zero.sh | 52 +++++++++++++++++++--- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/tools/ci/check-code-scanning-tools-zero.sh b/tools/ci/check-code-scanning-tools-zero.sh index 110ac81..4787be9 100755 --- a/tools/ci/check-code-scanning-tools-zero.sh +++ b/tools/ci/check-code-scanning-tools-zero.sh @@ -123,9 +123,19 @@ if [[ -n "${GITHUB_SHA:-}" ]]; then wait_max_attempts=120 wait_delay=10 run_event_filter="${EVENT_NAME:-push}" + pr_head_sha="" + pr_head_ref="" + if [[ "${EVENT_NAME}" == "pull_request" && -n "${GITHUB_EVENT_PATH:-}" && -f "${GITHUB_EVENT_PATH:-}" ]]; then + pr_head_sha="$(jq -r '.pull_request.head.sha // empty' "${GITHUB_EVENT_PATH}")" + pr_head_ref="$(jq -r '.pull_request.head.ref // empty' "${GITHUB_EVENT_PATH}")" + fi while true; do qodana_runs_json="${OUT_DIR}/qodana-runs.json" - if ! gh api "repos/${REPO}/actions/runs?head_sha=${GITHUB_SHA}&event=${run_event_filter}&per_page=100" > "${qodana_runs_json}" 2>> "${RAW_LOG}"; then + api_path="repos/${REPO}/actions/runs?event=${run_event_filter}&per_page=100" + if [[ "${EVENT_NAME}" != "pull_request" ]]; then + api_path="${api_path}&head_sha=${GITHUB_SHA}" + fi + if ! gh api "${api_path}" > "${qodana_runs_json}" 2>> "${RAW_LOG}"; then if (( wait_attempt >= wait_max_attempts )); then fail "Qodana-Runstatus fuer aktuellen SHA konnte nicht geladen werden" fi @@ -135,15 +145,45 @@ if [[ -n "${GITHUB_SHA:-}" ]]; then continue fi - qodana_status="$(jq -r '.workflow_runs[] | select(.name=="qodana") | .status' "${qodana_runs_json}" | head -n1)" - qodana_conclusion="$(jq -r '.workflow_runs[] | select(.name=="qodana") | .conclusion' "${qodana_runs_json}" | head -n1)" - qodana_url="$(jq -r '.workflow_runs[] | select(.name=="qodana") | .html_url' "${qodana_runs_json}" | head -n1)" + if [[ "${EVENT_NAME}" == "pull_request" ]]; then + qodana_status="$(jq -r \ + --arg pr_head_sha "${pr_head_sha}" \ + --arg pr_head_ref "${pr_head_ref}" \ + '.workflow_runs + | map(select(.name=="qodana")) + | map(select((($pr_head_sha != "") and (.head_sha == $pr_head_sha)) or (($pr_head_ref != "") and (.head_branch == $pr_head_ref)))) + | sort_by(.created_at) + | reverse + | .[0].status // empty' "${qodana_runs_json}")" + qodana_conclusion="$(jq -r \ + --arg pr_head_sha "${pr_head_sha}" \ + --arg pr_head_ref "${pr_head_ref}" \ + '.workflow_runs + | map(select(.name=="qodana")) + | map(select((($pr_head_sha != "") and (.head_sha == $pr_head_sha)) or (($pr_head_ref != "") and (.head_branch == $pr_head_ref)))) + | sort_by(.created_at) + | reverse + | .[0].conclusion // empty' "${qodana_runs_json}")" + qodana_url="$(jq -r \ + --arg pr_head_sha "${pr_head_sha}" \ + --arg pr_head_ref "${pr_head_ref}" \ + '.workflow_runs + | map(select(.name=="qodana")) + | map(select((($pr_head_sha != "") and (.head_sha == $pr_head_sha)) or (($pr_head_ref != "") and (.head_branch == $pr_head_ref)))) + | sort_by(.created_at) + | reverse + | .[0].html_url // empty' "${qodana_runs_json}")" + else + qodana_status="$(jq -r '.workflow_runs | map(select(.name=="qodana")) | sort_by(.created_at) | reverse | .[0].status // empty' "${qodana_runs_json}")" + qodana_conclusion="$(jq -r '.workflow_runs | map(select(.name=="qodana")) | sort_by(.created_at) | reverse | .[0].conclusion // empty' "${qodana_runs_json}")" + qodana_url="$(jq -r '.workflow_runs | map(select(.name=="qodana")) | sort_by(.created_at) | reverse | .[0].html_url // empty' "${qodana_runs_json}")" + fi if [[ -z "${qodana_status}" ]]; then if (( wait_attempt >= wait_max_attempts )); then - fail "Kein qodana-Run fuer SHA=${GITHUB_SHA} gefunden" + fail "Kein qodana-Run fuer aktuellen Kontext gefunden (sha=${GITHUB_SHA}, pr_head_sha=${pr_head_sha:-n/a}, pr_head_ref=${pr_head_ref:-n/a})" fi - log "INFO: qodana-Run fuer SHA=${GITHUB_SHA} noch nicht sichtbar (retry ${wait_attempt}/${wait_max_attempts})" + log "INFO: qodana-Run noch nicht sichtbar (retry ${wait_attempt}/${wait_max_attempts})" sleep "${wait_delay}" wait_attempt=$((wait_attempt + 1)) continue From 5b903eaed34c6b191b31ddba96cafec17d6455ca Mon Sep 17 00:00:00 2001 From: GitHub Copilot Agent Date: Thu, 19 Feb 2026 15:59:47 +0100 Subject: [PATCH 6/7] fix(review): qodana-wait nur fuer push-main und jq vereinfachen --- tools/ci/check-code-scanning-tools-zero.sh | 32 ++++++++-------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/tools/ci/check-code-scanning-tools-zero.sh b/tools/ci/check-code-scanning-tools-zero.sh index 4787be9..49c8c4e 100755 --- a/tools/ci/check-code-scanning-tools-zero.sh +++ b/tools/ci/check-code-scanning-tools-zero.sh @@ -110,7 +110,7 @@ fi # - PR Qodana-cleanup validation (ref=refs/pull//merge). if [[ -n "${GITHUB_SHA:-}" ]]; then should_wait_for_qodana="false" - if [[ "${EVENT_NAME}" != "pull_request" && "${QUERY_REF}" == "refs/heads/main" ]]; then + if [[ "${EVENT_NAME}" == "push" && "${QUERY_REF}" == "refs/heads/main" ]]; then should_wait_for_qodana="true" fi if [[ "${QUERY_REF}" != "refs/heads/main" ]]; then @@ -146,7 +146,7 @@ if [[ -n "${GITHUB_SHA:-}" ]]; then fi if [[ "${EVENT_NAME}" == "pull_request" ]]; then - qodana_status="$(jq -r \ + qodana_fields="$(jq -r \ --arg pr_head_sha "${pr_head_sha}" \ --arg pr_head_ref "${pr_head_ref}" \ '.workflow_runs @@ -154,30 +154,20 @@ if [[ -n "${GITHUB_SHA:-}" ]]; then | map(select((($pr_head_sha != "") and (.head_sha == $pr_head_sha)) or (($pr_head_ref != "") and (.head_branch == $pr_head_ref)))) | sort_by(.created_at) | reverse - | .[0].status // empty' "${qodana_runs_json}")" - qodana_conclusion="$(jq -r \ - --arg pr_head_sha "${pr_head_sha}" \ - --arg pr_head_ref "${pr_head_ref}" \ - '.workflow_runs - | map(select(.name=="qodana")) - | map(select((($pr_head_sha != "") and (.head_sha == $pr_head_sha)) or (($pr_head_ref != "") and (.head_branch == $pr_head_ref)))) - | sort_by(.created_at) - | reverse - | .[0].conclusion // empty' "${qodana_runs_json}")" - qodana_url="$(jq -r \ - --arg pr_head_sha "${pr_head_sha}" \ - --arg pr_head_ref "${pr_head_ref}" \ + | .[0] + | [(.status // ""), (.conclusion // ""), (.html_url // "")] + | @tsv' "${qodana_runs_json}")" + else + qodana_fields="$(jq -r \ '.workflow_runs | map(select(.name=="qodana")) - | map(select((($pr_head_sha != "") and (.head_sha == $pr_head_sha)) or (($pr_head_ref != "") and (.head_branch == $pr_head_ref)))) | sort_by(.created_at) | reverse - | .[0].html_url // empty' "${qodana_runs_json}")" - else - qodana_status="$(jq -r '.workflow_runs | map(select(.name=="qodana")) | sort_by(.created_at) | reverse | .[0].status // empty' "${qodana_runs_json}")" - qodana_conclusion="$(jq -r '.workflow_runs | map(select(.name=="qodana")) | sort_by(.created_at) | reverse | .[0].conclusion // empty' "${qodana_runs_json}")" - qodana_url="$(jq -r '.workflow_runs | map(select(.name=="qodana")) | sort_by(.created_at) | reverse | .[0].html_url // empty' "${qodana_runs_json}")" + | .[0] + | [(.status // ""), (.conclusion // ""), (.html_url // "")] + | @tsv' "${qodana_runs_json}")" fi + IFS=$'\t' read -r qodana_status qodana_conclusion qodana_url <<< "${qodana_fields:-}" if [[ -z "${qodana_status}" ]]; then if (( wait_attempt >= wait_max_attempts )); then From ce534fb92362a608bdd47242305d398bbe0edf75 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Agent Date: Thu, 19 Feb 2026 16:08:15 +0100 Subject: [PATCH 7/7] fix(review): offene qodana-preflight review-befunde abschliessen --- tools/ci/check-code-scanning-tools-zero.sh | 33 ++++++++++++++++------ tools/versioning/compute-pr-labels.js | 1 + 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/tools/ci/check-code-scanning-tools-zero.sh b/tools/ci/check-code-scanning-tools-zero.sh index 49c8c4e..a6f64a7 100755 --- a/tools/ci/check-code-scanning-tools-zero.sh +++ b/tools/ci/check-code-scanning-tools-zero.sh @@ -79,7 +79,8 @@ if [[ "${EVENT_NAME}" == "pull_request" && -n "${GITHUB_EVENT_PATH:-}" && -f "${ if [[ -n "${pr_number}" ]]; then files_json="${OUT_DIR}/pr-files.json" if gh api "repos/${REPO}/pulls/${pr_number}/files?per_page=100" --paginate > "${files_json}" 2>> "${RAW_LOG}"; then - if jq -r '.[].filename' "${files_json}" | grep -Eiq '^(\.qodana/|qodana\.ya?ml$|\.github/workflows/qodana\.yml$|tools/ci/check-code-scanning-tools-zero\.sh$|tools/versioning/compute-pr-labels\.js$)'; then + if jq -r '.[].filename' "${files_json}" | grep -Eiq '^(\.qodana/|qodana\.ya?ml$|\.github/workflows/qodana\.yml$)' || \ + jq -r '.[].filename' "${files_json}" | grep -Eq '^(tools/ci/check-code-scanning-tools-zero\.sh$|tools/versioning/compute-pr-labels\.js$)'; then has_qodana_changes="true" fi else @@ -119,20 +120,28 @@ if [[ -n "${GITHUB_SHA:-}" ]]; then if [[ "${should_wait_for_qodana}" == "true" ]]; then wait_attempt=1 - # Qodana can be queued behind runner load; allow a generous fail-closed window. - wait_max_attempts=120 - wait_delay=10 + # Qodana can be queued behind runner load; allow an overridable fail-closed window. + wait_max_attempts="${QODANA_WAIT_MAX_ATTEMPTS:-120}" + wait_delay="${QODANA_WAIT_DELAY_SECONDS:-10}" + total_wait_timeout=$((wait_max_attempts * wait_delay)) run_event_filter="${EVENT_NAME:-push}" pr_head_sha="" pr_head_ref="" if [[ "${EVENT_NAME}" == "pull_request" && -n "${GITHUB_EVENT_PATH:-}" && -f "${GITHUB_EVENT_PATH:-}" ]]; then pr_head_sha="$(jq -r '.pull_request.head.sha // empty' "${GITHUB_EVENT_PATH}")" pr_head_ref="$(jq -r '.pull_request.head.ref // empty' "${GITHUB_EVENT_PATH}")" + if [[ -n "${pr_head_sha}" ]]; then + run_event_filter="pull_request" + fi fi + wait_started_epoch="$(date +%s)" + log "INFO: Warte auf qodana-Run (max_wait=${total_wait_timeout}s, attempts=${wait_max_attempts}, delay=${wait_delay}s, event_filter=${run_event_filter})" while true; do qodana_runs_json="${OUT_DIR}/qodana-runs.json" api_path="repos/${REPO}/actions/runs?event=${run_event_filter}&per_page=100" - if [[ "${EVENT_NAME}" != "pull_request" ]]; then + if [[ "${EVENT_NAME}" == "pull_request" && -n "${pr_head_sha}" ]]; then + api_path="${api_path}&head_sha=${pr_head_sha}" + elif [[ "${EVENT_NAME}" != "pull_request" ]]; then api_path="${api_path}&head_sha=${GITHUB_SHA}" fi if ! gh api "${api_path}" > "${qodana_runs_json}" 2>> "${RAW_LOG}"; then @@ -151,7 +160,13 @@ if [[ -n "${GITHUB_SHA:-}" ]]; then --arg pr_head_ref "${pr_head_ref}" \ '.workflow_runs | map(select(.name=="qodana")) - | map(select((($pr_head_sha != "") and (.head_sha == $pr_head_sha)) or (($pr_head_ref != "") and (.head_branch == $pr_head_ref)))) + | (if $pr_head_sha != "" then + map(select(.head_sha == $pr_head_sha)) + elif $pr_head_ref != "" then + map(select(.head_branch == $pr_head_ref)) + else + . + end) | sort_by(.created_at) | reverse | .[0] @@ -171,7 +186,8 @@ if [[ -n "${GITHUB_SHA:-}" ]]; then if [[ -z "${qodana_status}" ]]; then if (( wait_attempt >= wait_max_attempts )); then - fail "Kein qodana-Run fuer aktuellen Kontext gefunden (sha=${GITHUB_SHA}, pr_head_sha=${pr_head_sha:-n/a}, pr_head_ref=${pr_head_ref:-n/a})" + waited_seconds=$(( $(date +%s) - wait_started_epoch )) + fail "Kein qodana-Run fuer aktuellen Kontext gefunden (sha=${GITHUB_SHA}, pr_head_sha=${pr_head_sha:-n/a}, pr_head_ref=${pr_head_ref:-n/a}, waited=${waited_seconds}s)" fi log "INFO: qodana-Run noch nicht sichtbar (retry ${wait_attempt}/${wait_max_attempts})" sleep "${wait_delay}" @@ -181,7 +197,8 @@ if [[ -n "${GITHUB_SHA:-}" ]]; then if [[ "${qodana_status}" != "completed" ]]; then if (( wait_attempt >= wait_max_attempts )); then - fail "qodana-Run fuer SHA=${GITHUB_SHA} ist nicht abgeschlossen (status=${qodana_status})" + waited_seconds=$(( $(date +%s) - wait_started_epoch )) + fail "qodana-Run fuer SHA=${GITHUB_SHA} ist nicht abgeschlossen (status=${qodana_status}, waited=${waited_seconds}s)" fi log "INFO: warte auf qodana-Runabschluss (status=${qodana_status}, retry ${wait_attempt}/${wait_max_attempts})" sleep "${wait_delay}" diff --git a/tools/versioning/compute-pr-labels.js b/tools/versioning/compute-pr-labels.js index b315e0b..b088a5e 100644 --- a/tools/versioning/compute-pr-labels.js +++ b/tools/versioning/compute-pr-labels.js @@ -22,6 +22,7 @@ const AREA_RULES = [ { exact: 'qodana.yaml', label: 'area:qodana' }, { exact: '.github/workflows/qodana.yml', label: 'area:qodana' }, { exact: 'tools/ci/check-code-scanning-tools-zero.sh', label: 'area:qodana' }, + { exact: 'tools/versioning/compute-pr-labels.js', label: 'area:qodana' }, { prefix: 'src/FileTypeDetection/Infrastructure/Archive', label: 'area:archive' }, { prefix: 'src/FileTypeDetection/ArchiveProcessing', label: 'area:archive' }, { exact: 'src/FileTypeDetection/EvidenceHashing.vb', label: 'area:hashing' },