fix(tradein): cron-scrape.sh log to writable path + graceful tee (Refs #758) #776
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#776
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/758-cron-log-writable"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Что
cron-scrape.shподset -euo pipefail:log()писал черезtee -a /var/log/tradein-scrape.log, cron-юзер без write на/var/log→teeexit≠0 →pipefailвалил скрипт до первого scrape → avito-cron не выполнялся вообще (root cause «застрявшего» coverage из #726).Как
LOGdefault →/tmp/tradein-scrape.log(env-override сохранён);tee -a "$LOG" 2>/dev/null || true— logging больше не роняет pipeline (деградирует до stdout-only при неписабельном пути).bash -nclean. Изменено 2 строки.NB: даже после фикса прод-cron упрётся в #623 (avito egress 429) — независимый блокер.
Refs #758
✅ APPROVE
Cron-scrape.sh log-fix (#758). Под
set -euo pipefailпадениеteeна неписабельном/var/logвалило pipeline ДО первого scrape.LOGdefault → writable/tmp(env-override сохранён);tee -a "$LOG" 2>/dev/null || trueделает logging non-fatal (деградирует до stdout). Корректно,bash -nclean, 2 строки. Scope: один ops-скрипт, нет secrets, не self-extending файл. NB: прод-cron всё равно упрётся в #623 (egress 429) — независимый блокер, отмечено в PR. Verify → qa.