fix(tradein/scraper-kit): проброс endpoint= в yandex/cian newbuilding BrowserFetcher (#2322) #2356
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#2356
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/tradein-scraper-kit-newbuilding-endpoint"
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?
Summary
Group F1 (эпик #2277, scraper_kit migration). Фикс известного бага #2322:
scraper_kit/providers/{yandex,cian}/newbuilding.pyконструировалиBrowserFetcher(source=...)без обязательного (без дефолта) kwargendpoint=—TypeErrorна любом реальном вызове, при этом сигнатуры даже не выставлялиconfigнаружу.cian/newbuilding.py::fetch_newbuilding()— добавленconfig: ScraperConfig | None = None(keyword-only), проброшен какendpoint=config.browser_http_endpoint if config is not None else None(паттерн 1:1 с уже существующимresolve_cian_zhk_url_via_searchв том же файле).yandex/newbuilding.py::YandexNewbuildingScraper.__init__+resolve_yandex_jk_slug()— тот же паттерн.test_scraper_kit_newbuilding_endpoint.py(6 тестов) — spy на реальный конструкторBrowserFetcher, проверяет фактические kwargs (source=,endpoint=), включая backward-compat кейс безconfig=.scraper_kit/orchestration/pipeline.py:2459—run_cian_city_sweep's houses-фаза звалаfetch_newbuilding(zhk_url)безconfig=, хотяconfig— mandatory параметр enclosing-функции, тривиально в scope. Сейчас dormant (USE_KIT_SCHEDULER=False+cian_city_sweep.enabled=falseв SQL seed), но при включении — падал быAssertionErrorна каждый дом silently. Однострочный фикс, довёл проводку до конца в этом же PR.admin.py,cian_history_backfill.py,newbuilding_enrich_backfill.py,yandex_newbuilding_sweep.py) намеренно НЕ трогали — все ещё импортируют legacy-модули (issue #2322's DoD, домиграция — отдельный будущий шаг).Review
code-reviewer— ✅ APPROVE (1 non-blocking finding проpipeline.py:2459, зафиксирован и исправлен в этом же PR).Test plan
test_search_cache_hit)ruff check/ruff format— cleanCloses #2322