fix(ci): prevent host pressure gate self blocking [skip ci]
This commit is contained in:
@@ -145,6 +145,25 @@ def test_counts_buildkit_runner_process_load() -> None:
|
||||
assert load.oldest_age_seconds == 240
|
||||
|
||||
|
||||
def test_ignores_the_host_pressure_gate_process_group() -> None:
|
||||
exporter = load_exporter()
|
||||
rows = exporter.parse_ps_rows(
|
||||
"""
|
||||
100 10 100 100 240 0.0 S bash bash --noprofile --norc -e -o pipefail /home/wooo/.cache/act/14cc/act/workflow/2.sh
|
||||
101 100 100 100 239 0.0 S bash bash scripts/ci/wait-host-web-build-pressure.sh
|
||||
102 101 100 100 238 0.0 S sleep sleep 10
|
||||
200 150 200 200 210 12.5 S turbo turbo build --filter=@awoooi/web --concurrency=1
|
||||
"""
|
||||
)
|
||||
|
||||
load = exporter.active_gitea_action_process_load(rows)
|
||||
|
||||
assert load.group_count == 1
|
||||
assert load.process_count == 1
|
||||
assert load.cpu_percent == 12.5
|
||||
assert load.oldest_age_seconds == 210
|
||||
|
||||
|
||||
def test_remediation_defaults_to_dry_run(tmp_path: Path) -> None:
|
||||
ps_file = tmp_path / "ps.txt"
|
||||
ps_file.write_text(
|
||||
|
||||
Reference in New Issue
Block a user