-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (58 loc) · 2.44 KB
/
Copy pathdisk-usage-watch.yml
File metadata and controls
63 lines (58 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Disk usage watch
# Scheduled sentinel for #2743: `/var` on the homeserver (backs
# /var/lib/docker -- every CI container, image build, and Arcane stack)
# reached 96% full with no warning anywhere, and broke two
# Elasticsearch-backed CI legs (unavailable_shards_exception on primary
# allocation) in a way that looked like flake until someone happened to
# check `df`. `docker builder prune -af` reclaimed 179GB of buildkit cache
# with zero active entries, taking /var to 89%, after which the same test
# passed on the same host at the same commit.
#
# Runs ON the homeserver-backed fleet (not GitHub-hosted) because it has to
# measure that host's own filesystem directly -- no separate SSH credential
# or network path to the thing being measured, same reasoning
# ci-queue-watch.py's own header gives for keeping detection logic
# runnable and inspectable outside Actions.
#
# Deliberately a separate workflow/script from ci-queue-watch.py rather
# than folding into it: that script already gained an unrelated
# runner-capacity report in this same batch of fixes (#2744); piling a
# second, unrelated concern onto the same function from a second,
# independent change risked a needless merge collision between the two.
on:
schedule:
- cron: "*/30 * * * *"
workflow_dispatch:
inputs:
warn_percent:
description: Override the alarm threshold (percent)
required: false
default: "90"
# #3313: job-scoped, workflow level defaults to none -- see the same note in
# backup-staleness-watch.yml.
permissions: {}
concurrency:
group: disk-usage-watch
cancel-in-progress: false
jobs:
sweep:
# honeypot-homeserver (#3379): this job measures the homeserver itself,
# so it must never land on a --build-only honeypot-ci executor elsewhere.
runs-on: [self-hosted, linux, x64, honeypot-ci, honeypot-homeserver]
timeout-minutes: 5
permissions:
issues: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Sweep /var usage on this host
env:
GH_TOKEN: ${{ github.token }}
# #3314: through env, not ${{ }} inside the script -- a dispatch
# input interpolated into `run:` is shell code.
WARN_PERCENT: ${{ inputs.warn_percent || '90' }}
run: |
python3 scripts/disk-usage-watch.py \
--path /var \
--warn-percent "$WARN_PERCENT"