alshedivat / alshedivat/al-folio
update-citations workflow discards the script's diagnostics on timeout
- Vorherrschende Sprache
- HTML
- Sterne
- 16.1k
- Forks
- 13.1k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Spun out of #3619 so the finding isn't lost when that issue closes as `wontfix`.
`.github/workflows/update-citations.yml:52` runs:
```yaml
timeout 90 python bin/update_scholar_citations.py
```
Python buffers stdout when it isn't attached to a TTY, so when `timeout` kills the process at 90s the buffer is discarded and the log shows nothing — not even the `Fetching citations for Google Scholar ID ...` line the script prints on startup. The run looks like it did nothing, when in fact it was mid-request.
@dfuchss verified on #3619 that running with `python -u` restores that output.
**Fix:** add `-u`.
```diff
- timeout 90 python bin/update_scholar_citations.py
+ timeout 90 python -u bin/update_scholar_citations.py
```
This does **not** fix the underlying timeout — Google Scholar rate-blocks GitHub-hosted runner IPs, which is why #3619 is `wontfix` and why a longer timeout doesn't help. It only means the next person to look at a failed run can see how far it got before being blocked, instead of an empty log.
Beitragsleitfaden
Rechercherichtung
Open .github/workflows/update-citations.yml at line 52 and inspect the invocation of bin/update_scholar_citations.py. Check the workflow command's Python output behavior when timeout stops the process. Done means the command uses unbuffered output so a timed-out run retains the script's diagnostic lines in the GitHub Actions log.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- github-actions, python
- Bereich
- ci-cd
- Issue-Typ
- Bug
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Ruhig
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 90/100