- queue: max on every data-write workflow (GitHub, 2026-05-07): up to 100 runs wait, first in, first out. The default kept one, and a run queueing behind a running job cancelled it. - ref: main on every checkout. A run's commit is fixed when it is created, so a run that waited behind another data job wrote shards from before that job's commit; Auto Update JSON failed four days in ten on the rebase conflict in data/index.json. - timeout-minutes everywhere, and JOB_BUDGET_MINUTES at least 20 below it for the long loops (never for the ingest, which empties its queue). - pipeline.test.ts fails on a data-write workflow missing any of these. - The admin's Pipeline and Automation pages, docs/ADMIN.md and the auto-approve comment no longer say a push evicts a waiting job; the idle gate stays, so a batch's ingest starts at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
name: Mark Dead Games
|
|
|
|
on:
|
|
schedule:
|
|
# Mon + Thu 04:30 UTC. Runs after Sun/Wed top-online refreshes player
|
|
# counts, so current_players is at most ~24h old when we read it.
|
|
- cron: '30 4 * * 1,4'
|
|
workflow_dispatch:
|
|
inputs:
|
|
dry_run:
|
|
description: 'Dry run (no write)'
|
|
type: boolean
|
|
default: false
|
|
days:
|
|
description: 'Threshold in days (default 14)'
|
|
default: '14'
|
|
|
|
permissions:
|
|
contents: write
|
|
actions: write
|
|
|
|
# queue: max - a run that finds another data job running waits its turn
|
|
# (first in, first out) instead of evicting the run already waiting.
|
|
concurrency:
|
|
group: data-write
|
|
cancel-in-progress: false
|
|
queue: max
|
|
|
|
jobs:
|
|
mark:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
# The tip of main when the job starts, not when it was queued: a run
|
|
# that waited behind a long data job would otherwise rewrite stale shards.
|
|
with:
|
|
ref: main
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.15'
|
|
cache: 'pip'
|
|
cache-dependency-path: requirements.txt
|
|
|
|
- run: |
|
|
pip install --require-hashes --only-binary :all: -r requirements.txt
|
|
|
|
- name: Mark dead games
|
|
env:
|
|
DEAD_GAME_DAYS: ${{ inputs.days || '14' }}
|
|
run: |
|
|
if [ "${{ inputs.dry_run }}" = "true" ]; then
|
|
python scripts/mark_dead_games.py --dry-run
|
|
else
|
|
python scripts/mark_dead_games.py
|
|
fi
|
|
|
|
- name: Commit changes
|
|
if: ${{ inputs.dry_run != true }}
|
|
# Through commit_push.sh like every other data job: it rebases and
|
|
# retries when main moved during the run (a bare `git push` threw the
|
|
# run away), and it commits the whole tree, so scripts/removed_games.jsonl
|
|
# goes with the shards when save_main() applied a removal
|
|
# (scripts/core/blocklist.py).
|
|
run: |
|
|
bash ./bash/commit_push.sh "chore(data): mark dead games"
|