Skip to content
Merged
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: 2 additions & 0 deletions .github/workflows/ci-3p-aiomysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 120
Comment thread
coderabbitai[bot] marked this conversation as resolved.
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -120,6 +121,7 @@ jobs:
sed -i 's/timeout -v -s1 800 //' run-tests.bash

- name: Run tests
timeout-minutes: 90
run: |
set +e

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-3p-django-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -137,6 +138,7 @@ jobs:
fi

- name: Run tests
timeout-minutes: 90
run: |
set +e

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-3p-laravel-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -131,6 +132,7 @@ jobs:
#sed -i '/EXPDATA=/i ls -l' test_${{ env.TESTNAME }}/run-tests.bash

- name: Run tests
timeout-minutes: 90
run: |
set +e

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-3p-mariadb-connector-c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -125,6 +126,7 @@ jobs:
sed -i '/^fn_start_prep$/a fn_test_proxysql_dev ${{ matrix.infradb }}' run-tests.bash

- name: Run tests
timeout-minutes: 90
run: |
set +e

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-3p-mysql-connector-j.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -119,6 +120,7 @@ jobs:
sed -i 's/timeout -v -s1 800 //' run-tests.bash

- name: Run tests
timeout-minutes: 90
run: |
set +e

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-3p-pgjdbc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
jobs:
test:
runs-on: ubuntu-24.04
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -127,6 +128,7 @@ jobs:
rm pgjdbc/src/test/java/org/postgresql/test/jdbc2/CopyTest.java

- name: Run tests
timeout-minutes: 90
run: |
set +e

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-3p-php-pdo-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -119,6 +120,7 @@ jobs:
sed -i 's/timeout -v -s1 800 //' run-tests.bash

- name: Run tests
timeout-minutes: 90
run: |
set +e

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-3p-php-pdo-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -116,6 +117,7 @@ jobs:
sed -i 's/timeout -v -s1 800 //' run-tests.bash

- name: Run tests
timeout-minutes: 90
run: |
set +e

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-3p-postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -123,6 +124,7 @@ jobs:
#sed -i '/^fn_start_prep$/a fn_test_proxysql_dev ${{ matrix.infradb }}' run-tests.bash

- name: Run tests
timeout-minutes: 90
run: |
set +e

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-3p-sqlalchemy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env:
jobs:
test:
runs-on: ubuntu-24.04
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -118,6 +119,7 @@ jobs:
git -C ./proxysql describe --long --abbrev=7

- name: Run tests
timeout-minutes: 90
run: |
set +e

Expand Down Expand Up @@ -205,6 +207,7 @@ jobs:

summarize:
runs-on: ubuntu-22.04
timeout-minutes: 120
needs: [ test ]
continue-on-error: true
if: ${{ !cancelled() }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-basictests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
# ---------------------------------------------------------------------------
pick-runner:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
actions: read # read in-progress runs/jobs (no repo admin needed)
outputs:
Expand Down Expand Up @@ -80,6 +81,7 @@ jobs:
tests:
needs: pick-runner
runs-on: ${{ fromJson(needs.pick-runner.outputs.runson) }}
timeout-minutes: 120

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## workflows found"
git ls-files .github/workflows | sort

echo
echo "## relevant timeout/!cancelled/always/artifact lines"
for f in $(git ls-files .github/workflows/{ci-basictests,ci-builds,ci-legacy-clickhouse-g1,ci-legacy-g1,ci-legacy-g2-genai,ci-pgsql-socket-g1,ci-selftests,ci-set_parser_algorithm_3-g1,ci-taptests-pgsql-cluster}.yml); do
  echo "===== $f"
  wc -l "$f"
  sed -n '1,140p' "$f" | nl -ba | grep -En 'timeout-minutes:|!cancelled\(|always\(|upload-artifact|tar|zip|chmod|archive|logs|bin' || true
done

echo
echo "## diff stat (if available)"
git diff --stat || true

Repository: sysown/proxysql

Length of output: 4021


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path

files = [
    ".github/workflows/ci-basictests.yml",
    ".github/workflows/ci-builds.yml",
    ".github/workflows/ci-legacy-clickhouse-g1.yml",
    ".github/workflows/ci-legacy-g1.yml",
    ".github/workflows/ci-legacy-g2-genai.yml",
    ".github/workflows/ci-pgsql-socket-g1.yml",
    ".github/workflows/ci-selftests.yml",
    ".github/workflows/ci-set_parser_algorithm_3-g1.yml",
    ".github/workflows/ci-taptests-pgsql-cluster.yml",
]

for f in files:
    p=Path(f)
    if not p.exists():
        print("MISSING", f)
        continue
    text=p.read_text()
    lines=text.splitlines()
    print(f"===== {f}")
    for i,line in enumerate(lines,1):
        if "timeout-minutes:" in line or "cancelled()" in line or "always()" in line:
            print(f"{i}: {line}")
    print()
PY

Repository: sysown/proxysql

Length of output: 4889


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re

files = [
    ".github/workflows/ci-basictests.yml",
    ".github/workflows/ci-builds.yml",
    ".github/workflows/ci-legacy-clickhouse-g1.yml",
    ".github/workflows/ci-legacy-g1.yml",
    ".github/workflows/ci-legacy-g2-genai.yml",
    ".github/workflows/ci-pgsql-socket-g1.yml",
    ".github/workflows/ci-selftests.yml",
    ".github/workflows/ci-set_parser_algorithm_3-g1.yml",
    ".github/workflows/ci-taptests-pgsql-cluster.yml",
]

for f in files:
    lines = Path(f).read_text().splitlines()
    jobs = {}
    job_start, cur = None, None
    for n, line in enumerate(lines, 1):
        if re.match(r"^  [A-Za-z0-9_-]+:$", line):
            if cur and cur is not None and cur.start is not None:
                jobs[cur.name] = cur
            job_start = n
            cur = type("Job", (), {"name": line.strip().rstrip(":").lstrip(" "), "start": n, "lines": []})
        if cur and n >= job_start:
            cur.lines.append((n, line))
    if cur:
        jobs[cur.name] = cur

    print(f"===== {f}")
    for jname, job in jobs.items():
        job_lines = "\n".join(line for _, line in job.lines)
        if "timeout-minutes:" in job_lines or "cancelled()" in job_lines or "always()" in job_lines or "upload-artifact" in job_lines or "tar " in job_lines:
            print("--- job", jname)
            for n, line in job.lines:
                if any(tok in line for tok in ["timeout-minutes:", "if:", "upload-artifact", "tar ", "chmod", "artifact", "logs", "coverage", "bin"]):
                    print(f"{n}: {line")
PY

Repository: sysown/proxysql

Length of output: 266


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re

files = [
    ".github/workflows/ci-basictests.yml",
    ".github/workflows/ci-builds.yml",
    ".github/workflows/ci-legacy-clickhouse-g1.yml",
    ".github/workflows/ci-legacy-g1.yml",
    ".github/workflows/ci-legacy-g2-genai.yml",
    ".github/workflows/ci-pgsql-socket-g1.yml",
    ".github/workflows/ci-selftests.yml",
    ".github/workflows/ci-set_parser_algorithm_3-g1.yml",
    ".github/workflows/ci-taptests-pgsql-cluster.yml",
]

for f in files:
    lines = Path(f).read_text().splitlines()
    jobs = {}
    job_start, cur = None, None
    for n, line in enumerate(lines, 1):
        if re.match(r"^  [A-Za-z0-9_-]+:$", line):
            if cur:
                jobs[cur.name] = cur
            cur = type("Job", (), {"name": line.strip().rstrip(":").lstrip(" "), "start": n, "lines": []})
        if cur and n >= job_start:
            cur.lines.append((n, line))
    if cur:
        jobs[cur.name] = cur

    print(f"===== {f}")
    for jname, job in jobs.items():
        job_lines = "\n".join(line for _, line in job.lines)
        if "timeout-minutes:" in job_lines or "cancelled()" in job_lines or "always()" in job_lines or "upload-artifact" in job_lines or "tar " in job_lines:
            print("--- job", jname)
            for n, line in job.lines:
                if any(tok in line for tok in ["timeout-minutes:", "if:", "upload-artifact", "tar ", "chmod", "artifact", "logs", "coverage", "bin"]):
                    print(f"{n}: {line}")
PY

Repository: sysown/proxysql

Length of output: 299


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in .github/workflows/ci-basictests.yml .github/workflows/ci-builds.yml .github/workflows/ci-legacy-clickhouse-g1.yml .github/workflows/ci-legacy-g1.yml .github/workflows/ci-legacy-g2-genai.yml .github/workflows/ci-pgsql-socket-g1.yml .github/workflows/ci-selftests.yml .github/workflows/ci-set_parser_algorithm_3-g1.yml .github/workflows/ci-taptests-pgsql-cluster.yml; do
  echo "===== $f"
  grep -nE 'timeout-minutes:|upload-artifact:|tar |chmod|if:.*(always|!cancelled|failure)|coverage-report|logs' "$f" || true
done

Repository: sysown/proxysql

Length of output: 11188


Run artifact preservation after timeout cancellation.

timeout-minutes: 120 cancels jobs. Several preserved steps now use failure() && !cancelled(), which skips permission fixing, chmod/copy, and uploads when a job is cancelled. Run these steps on failure() || cancelled() under always() handling, then verify one deliberately timed-out job per workflow family.

  • .github/workflows/ci-basictests.yml#L84: update the permission-fix and log archive conditions.
  • .github/workflows/ci-builds.yml#L54: update the build archive upload condition.
  • .github/workflows/ci-legacy-clickhouse-g1.yml#L16: update the permission-fix and log archive conditions.
  • .github/workflows/ci-legacy-g1.yml#L84: update the permission-fix and log archive conditions.
  • .github/workflows/ci-legacy-g2-genai.yml#L16: update the permission-fix and log archive conditions.
  • .github/workflows/ci-pgsql-socket-g1.yml#L16: update the permission-fix and log archive conditions.
  • .github/workflows/ci-selftests.yml#L16: update the permission-fix and artifact archive conditions.
  • .github/workflows/ci-set_parser_algorithm_3-g1.yml#L16: update the permission-fix and log archive conditions.
  • .github/workflows/ci-taptests-pgsql-cluster.yml#L63: update the permission-fix and log archive conditions.
📍 Affects 9 files
  • .github/workflows/ci-basictests.yml#L84-L84 (this comment)
  • .github/workflows/ci-builds.yml#L54-L54
  • .github/workflows/ci-legacy-clickhouse-g1.yml#L16-L16
  • .github/workflows/ci-legacy-g1.yml#L84-L84
  • .github/workflows/ci-legacy-g2-genai.yml#L16-L16
  • .github/workflows/ci-pgsql-socket-g1.yml#L16-L16
  • .github/workflows/ci-selftests.yml#L16-L16
  • .github/workflows/ci-set_parser_algorithm_3-g1.yml#L16-L16
  • .github/workflows/ci-taptests-pgsql-cluster.yml#L63-L63
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci-basictests.yml at line 84, Update the
artifact-preservation conditions to run under always() when a job fails or is
cancelled, replacing failure() && !cancelled() so permission fixes, chmod/copy,
and uploads still execute after timeouts. Apply the permission-fix and
log/archive condition changes in .github/workflows/ci-basictests.yml (84-84),
.github/workflows/ci-legacy-clickhouse-g1.yml (16-16),
.github/workflows/ci-legacy-g1.yml (84-84),
.github/workflows/ci-legacy-g2-genai.yml (16-16),
.github/workflows/ci-pgsql-socket-g1.yml (16-16),
.github/workflows/ci-set_parser_algorithm_3-g1.yml (16-16), and
.github/workflows/ci-taptests-pgsql-cluster.yml (63-63); update the build
archive upload condition in .github/workflows/ci-builds.yml (54-54) and the
permission-fix and artifact archive conditions in
.github/workflows/ci-selftests.yml (16-16). Verify one deliberately timed-out
job per workflow family.

permissions: write-all
strategy:
fail-fast: false
Expand Down Expand Up @@ -234,6 +236,7 @@ jobs:
test/infra/control/ensure-infras.bash

- name: Run basic tests
timeout-minutes: 90
run: |
cd proxysql
export INFRA_ID="ci-basictests"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
# (trusted) AND this workflow is listed in the SELFHOSTED_WORKFLOWS repo variable.
# Otherwise fall back to GitHub-hosted ubuntu-24.04. Empty/absent variable = no routing.
runs-on: ${{ inputs.trusted && ((github.actor == 'renecannao' || (inputs.trigger && fromJson(inputs.trigger).event.workflow_run.actor.login == 'renecannao')) && vars.SELFHOSTED_WORKFLOWS && contains(fromJson(vars.SELFHOSTED_WORKFLOWS), github.workflow) && fromJson('["self-hosted","proxysql-ci"]')) || 'ubuntu-24.04' }}
timeout-minutes: 120
# needs: [ lock ]
# outputs:
# matrix: ${{ steps.set-matrix.outputs.matrix }}
Expand Down Expand Up @@ -159,6 +160,7 @@ jobs:
# ls -l proxysql/test/tap

- name: Build
timeout-minutes: 90
id: build
if: ${{ steps.cache-check.outputs.cache-hit != 'true' }}
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 120
# permissions:
# actions: read
# contents: read
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-legacy-clickhouse-g1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
jobs:
tests:
runs-on: ubuntu-22.04
timeout-minutes: 120
# `write-all` grants every default GITHUB_TOKEN scope plus the
# id-token:write scope codecov-action@v4 needs to mint a GitHub OIDC
# token for `use_oidc: true`. Caller workflow on v3.0 must also
Expand Down Expand Up @@ -173,6 +174,7 @@ jobs:
test/infra/control/ensure-infras.bash

- name: Run legacy-clickhouse-g1 tests
timeout-minutes: 90
run: |
cd proxysql
export INFRA_ID="ci-legacy-clickhouse-g1"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-legacy-g1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
# ---------------------------------------------------------------------------
pick-runner:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
actions: read # read in-progress runs/jobs (no repo admin needed)
outputs:
Expand Down Expand Up @@ -80,6 +81,7 @@ jobs:
tests:
needs: pick-runner
runs-on: ${{ fromJson(needs.pick-runner.outputs.runson) }}
timeout-minutes: 120
# `write-all` grants every default GITHUB_TOKEN scope plus the
# id-token:write scope codecov-action@v4 needs to mint a GitHub OIDC
# token for `use_oidc: true`. Caller workflow on v3.0 must also
Expand Down Expand Up @@ -240,6 +242,7 @@ jobs:
test/infra/control/ensure-infras.bash

- name: Run legacy-g1 tests
timeout-minutes: 90
run: |
cd proxysql
export INFRA_ID="ci-legacy-g1"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-legacy-g2-genai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
jobs:
tests:
runs-on: ubuntu-22.04
timeout-minutes: 120
# `write-all` grants every default GITHUB_TOKEN scope plus the
# id-token:write scope codecov-action@v4 needs to mint a GitHub OIDC
# token for `use_oidc: true`. We arrived at this after a tight
Expand Down Expand Up @@ -186,6 +187,7 @@ jobs:
test/infra/control/ensure-infras.bash

- name: Run legacy-g2 tests (GenAI + Coverage)
timeout-minutes: 90
run: |
cd proxysql
export INFRA_ID="ci-legacy-g2-genai"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-legacy-g2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
# ---------------------------------------------------------------------------
pick-runner:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
actions: read # read in-progress runs/jobs (no repo admin needed)
outputs:
Expand Down Expand Up @@ -80,6 +81,7 @@ jobs:
tests:
needs: pick-runner
runs-on: ${{ fromJson(needs.pick-runner.outputs.runson) }}
timeout-minutes: 120

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow files =="
git ls-files .github/workflows | grep -E '(^|/)(ci-legacy-g[2-6]|ci-mysql84-g[7-9]|ci-mysql84-gr-g[1-3])\.yml$' | sort

echo
echo "== timeout locations with file context =="
for f in $(git ls-files .github/workflows | grep -E '(^|/)(ci-legacy-g[2-6]|ci-mysql84-g[7-9]|ci-mysql84-gr-g[1-3])\.yml$' | sort); do
  echo "--- $f ---"
  nl -ba "$f" | sed -n '1,130p'
done

echo
echo "== relevant step conditions in these workflows =="
rg -n "timeout-minutes|fix|permission|archive|upload|logs|if:|cancelled|failure|always" .github/workflows/ci-legacy-g[2-6].yml .github/workflows/ci-mysql84-g[7-9].yml .github/workflows/ci-mysql84-gr-g[1-3].yml || true

Repository: sysown/proxysql

Length of output: 701


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in .github/workflows/ci-legacy-g2.yml .github/workflows/ci-legacy-g3.yml .github/workflows/ci-legacy-g4.yml .github/workflows/ci-legacy-g5.yml .github/workflows/ci-legacy-g6.yml \
  .github/workflows/ci-mysql84-g7.yml .github/workflows/ci-mysql84-g8.yml .github/workflows/ci-mysql84-g9.yml \
  .github/workflows/ci-mysql84-gr-g1.yml .github/workflows/ci-mysql84-gr-g2.yml .github/workflows/ci-mysql84-gr-g3.yml; do
  echo "--- $f ---"
  lines="$(wc -l < "$f")"
  limit=140
  if [ "$lines" -gt "$limit" ]; then lines=$limit; fi
  awk '{printf "%4d\t%s\n", NR, $0}' "$f" | sed -n "1,${lines}p"
done

echo "== relevant strings =="
for f in \
  .github/workflows/ci-legacy-g2.yml .github/workflows/ci-legacy-g3.yml .github/workflows/ci-legacy-g4.yml .github/workflows/ci-legacy-g5.yml .github/workflows/ci-legacy-g6.yml \
  .github/workflows/ci-mysql84-g7.yml .github/workflows/ci-mysql84-g8.yml .github/workflows/ci-mysql84-g9.yml \
  .github/workflows/ci-mysql84-gr-g1.yml .github/workflows/ci-mysql84-gr-g2.yml .github/workflows/ci-mysql84-gr-g3.yml
do
  echo "--- $f ---"
  grep -nE 'timeout-minutes:|^  tests:|fix|permission|archive|upload|logs|if:|cancelled|failure|always' "$f" || true
done

Repository: sysown/proxysql

Length of output: 50372


🌐 Web query:

GitHub Actions timeout-minutes documentation job cancelled automatically cancellation failure() if condition documentation

💡 Result:

In GitHub Actions, the timeout-minutes property can be applied at both the job level and the step level to prevent workflows from running indefinitely [1]. When a job or step exceeds its defined timeout-minutes, GitHub Actions automatically cancels it [2][1]. Key details regarding this behavior include: Timeout Logic: The timeout-minutes countdown for a job begins as soon as the job starts, which includes time spent in the queue or on setup overhead, not just the duration of individual steps [3]. Cancellation Status: When a job is automatically cancelled due to a timeout, its final status is marked as "cancelled" rather than "failure" [4]. Conditional Execution: Because the job status is "cancelled", the default success() condition (which is implicit if no if condition is provided) will evaluate to false [4][5]. Consequently, if you have a step with an if: failure() condition, it will not execute because the job was cancelled, not failed [5][6]. Handling Cancellation: If you need a step to run specifically when a job is cancelled (e.g., for cleanup or logging), you must use the cancelled() status check function [4][5]. For example, if: ${{ cancelled() }} will allow a step to run even if the job was terminated due to a timeout [5]. To run a step in either a failure or cancellation scenario, you can use if: ${{ failure() || cancelled() }} [6]. Note that for GitHub-hosted runners, there is a hard limit of 6 hours (360 minutes) for job execution time [7][8]. If a configured timeout-minutes exceeds this limit, the job will still be cancelled when the 6-hour limit is reached [2].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== all affected workflow contents in compact form =="
find .github/workflows \
  \( -name 'ci-legacy-g[2-6].yml' -o \
     -name 'ci-mysql84-g[7-9].yml' -o \
     -name 'ci-mysql84-gr-g[1-3].yml' \) \
  -print -print0 | sort -z | xargs -0 sh -c '
    for f; do
      echo "--- $f ---"
      python3 - <<"PY"
import pathlib, re
p=pathlib.Path("$0")
print("lines:", p.stat().st_size, "bytes")
for i,line in enumerate(p.read_text().splitlines(),1):
    if ("timeout-minutes" in line
        or "upload" in line
        or "archive" in line
        or "fix" in line
        or "log" in line
        or "permission" in line
        or "if:" in line
        or line.startswith("  tests:")
        or "name:" in line):
        print(f"{i:04d}\t{line}")
PY
    done
  ' shell

echo
echo "== targeted step-condition scan across affected workflows =="
rg -nH 'timeout-minutes:|upload-artifact|codecov|logs|permission|fix|if:\s*((failure|cancelled|always)\(\)|\${{\s*success|success\(\))' \
  .github/workflows/ci-legacy-g[2-6].yml \
  .github/workflows/ci-mysql84-g[7-9].yml \
  .github/workflows/ci-mysql84-gr-g[1-3].yml || true

Repository: sysown/proxysql

Length of output: 3650


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== targeted step-condition scan across affected workflows =="
rg -nH 'timeout-minutes:|upload-artifact|codecov|logs|permission|fix|if:\s*((failure|cancelled|always)\(\)|\${{\s*success|success\(\))' \
  .github/workflows/ci-legacy-g[2-6].yml \
  .github/workflows/ci-mysql84-g[7-9].yml \
  .github/workflows/ci-mysql84-gr-g[1-3].yml || true

echo
echo "== selected complete workflows: ci-legacy-g2, ci-mysql84-g7, ci-mysql84-gr-g1 =="
for f in \
  .github/workflows/ci-legacy-g2.yml \
  .github/workflows/ci-mysql84-g7.yml \
  .github/workflows/ci-mysql84-gr-g1.yml
do
  echo "--- $f ---"
  awk '{printf "%4d\t%s\n", NR, $0}' "$f"
done

Repository: sysown/proxysql

Length of output: 45798


Make post-test artifact handling cancellation-safe before adding job timeouts.

Each affected tests job now sets timeout-minutes: 120, but timeout expiry runs with job.status: cancelled. The current post-test conditions do not include cancelled() as a possible status, so permission fixing/uploads can be skipped on a timeout-caused cancellation and the logs may not be preserved. Use a single cancellation-safe policy for these steps across all affected workflows, such as failure() || cancelled().

📍 Affects 11 files
  • .github/workflows/ci-legacy-g2.yml#L84-L84 (this comment)
  • .github/workflows/ci-legacy-g3.yml#L84-L84
  • .github/workflows/ci-legacy-g4.yml#L84-L84
  • .github/workflows/ci-legacy-g5.yml#L84-L84
  • .github/workflows/ci-legacy-g6.yml#L84-L84
  • .github/workflows/ci-mysql84-g7.yml#L16-L16
  • .github/workflows/ci-mysql84-g8.yml#L16-L16
  • .github/workflows/ci-mysql84-g9.yml#L16-L16
  • .github/workflows/ci-mysql84-gr-g1.yml#L16-L16
  • .github/workflows/ci-mysql84-gr-g2.yml#L16-L16
  • .github/workflows/ci-mysql84-gr-g3.yml#L16-L16
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci-legacy-g2.yml at line 84, Update the post-test artifact
permission-fixing and upload conditions to use a cancellation-safe policy such
as failure() || cancelled(), ensuring logs are preserved when the 120-minute
timeout cancels a job. Apply this consistently in
.github/workflows/ci-legacy-g2.yml:84-84, ci-legacy-g3.yml:84-84,
ci-legacy-g4.yml:84-84, ci-legacy-g5.yml:84-84, ci-legacy-g6.yml:84-84,
ci-mysql84-g7.yml:16-16, ci-mysql84-g8.yml:16-16, ci-mysql84-g9.yml:16-16,
ci-mysql84-gr-g1.yml:16-16, ci-mysql84-gr-g2.yml:16-16, and
ci-mysql84-gr-g3.yml:16-16.

Source: MCP tools

permissions: write-all
strategy:
fail-fast: false
Expand Down Expand Up @@ -231,6 +233,7 @@ jobs:
test/infra/control/ensure-infras.bash

- name: Run legacy-g2 tests
timeout-minutes: 90
run: |
cd proxysql
export INFRA_ID="ci-legacy-g2"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-legacy-g3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
# ---------------------------------------------------------------------------
pick-runner:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
actions: read # read in-progress runs/jobs (no repo admin needed)
outputs:
Expand Down Expand Up @@ -80,6 +81,7 @@ jobs:
tests:
needs: pick-runner
runs-on: ${{ fromJson(needs.pick-runner.outputs.runson) }}
timeout-minutes: 120
# `write-all` grants every default GITHUB_TOKEN scope plus the
# id-token:write scope codecov-action@v4 needs to mint a GitHub OIDC
# token for `use_oidc: true`. Caller workflow on v3.0 must also
Expand Down Expand Up @@ -240,6 +242,7 @@ jobs:
test/infra/control/ensure-infras.bash

- name: Run legacy-g3 tests
timeout-minutes: 90
run: |
cd proxysql
export INFRA_ID="ci-legacy-g3"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-legacy-g4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
# ---------------------------------------------------------------------------
pick-runner:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
actions: read # read in-progress runs/jobs (no repo admin needed)
outputs:
Expand Down Expand Up @@ -80,6 +81,7 @@ jobs:
tests:
needs: pick-runner
runs-on: ${{ fromJson(needs.pick-runner.outputs.runson) }}
timeout-minutes: 120
# `write-all` grants every default GITHUB_TOKEN scope plus the
# id-token:write scope codecov-action@v4 needs to mint a GitHub OIDC
# token for `use_oidc: true`. Caller workflow on v3.0 must also
Expand Down Expand Up @@ -240,6 +242,7 @@ jobs:
test/infra/control/ensure-infras.bash

- name: Run legacy-g4 tests
timeout-minutes: 90
run: |
cd proxysql
export INFRA_ID="ci-legacy-g4"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-legacy-g5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
# ---------------------------------------------------------------------------
pick-runner:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
actions: read # read in-progress runs/jobs (no repo admin needed)
outputs:
Expand Down Expand Up @@ -80,6 +81,7 @@ jobs:
tests:
needs: pick-runner
runs-on: ${{ fromJson(needs.pick-runner.outputs.runson) }}
timeout-minutes: 120
# `write-all` grants every default GITHUB_TOKEN scope plus the
# id-token:write scope codecov-action@v4 needs to mint a GitHub OIDC
# token for `use_oidc: true`. Caller workflow on v3.0 must also
Expand Down Expand Up @@ -239,6 +241,7 @@ jobs:
test/infra/control/ensure-infras.bash

- name: Run legacy-g5 tests
timeout-minutes: 90
run: |
cd proxysql
export INFRA_ID="ci-legacy-g5"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-legacy-g6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
# ---------------------------------------------------------------------------
pick-runner:
runs-on: ubuntu-latest
timeout-minutes: 120
permissions:
actions: read # read in-progress runs/jobs (no repo admin needed)
outputs:
Expand Down Expand Up @@ -80,6 +81,7 @@ jobs:
tests:
needs: pick-runner
runs-on: ${{ fromJson(needs.pick-runner.outputs.runson) }}
timeout-minutes: 120
# `write-all` grants every default GITHUB_TOKEN scope plus the
# id-token:write scope codecov-action@v4 needs to mint a GitHub OIDC
# token for `use_oidc: true`. Caller workflow on v3.0 must also
Expand Down Expand Up @@ -240,6 +242,7 @@ jobs:
test/infra/control/ensure-infras.bash

- name: Run legacy-g6 tests
timeout-minutes: 90
run: |
cd proxysql
export INFRA_ID="ci-legacy-g6"
Expand Down
Loading