gendesign/backend/tests/workers
bot-backend 5170107405
Some checks failed
CI / backend-tests (push) Has been cancelled
CI / frontend-tests (push) Has been cancelled
CI / openapi-codegen-check (push) Has been cancelled
CI / changes (push) Has been cancelled
CI / changes (pull_request) Successful in 6s
CI / backend-tests (pull_request) Has been cancelled
CI / frontend-tests (pull_request) Has been cancelled
CI / openapi-codegen-check (pull_request) Has been cancelled
fix(sql): EMISS PK includes period_type so yearly+Q1 coexist (#1606 follow-up)
Adds period_type TEXT NOT NULL DEFAULT 'unknown' to macro_indicator and
widens the PRIMARY KEY to (indicator_type, region, obs_date, period_type).

Before: yearly aggregate ('год'→obs_date YYYY-01-01) and Q1 ('I квартал'→
same date) shared the same PK slot → ON CONFLICT DO UPDATE made them
overwrite each other despite the in-memory dedup fix in #1687.

After: each EmissRow carries period_type from _emiss_period_granularity
('year'/'quarter'/'month'); DB ON CONFLICT targets include it, so
yearly+Q1 rows genuinely coexist.

Non-EMISS sources (CBR, rosstat open-data, domrf) use period_type='unknown'
(literal in SQL) — they are disambiguated by obs_date already, so the
wider PK is backward-compatible. All ON CONFLICT clauses in
cbr_macro_sync.py and rosstat_macro_sync.py updated accordingly.

Migration: 163_emiss_pk_period_type.sql (idempotent BEGIN/COMMIT).
Tests: 49 passed (emiss + rosstat suite), ruff clean, py_compile OK.
2026-06-17 21:27:34 +03:00
..
tasks fix(okn): expand registry coverage + load detail-card name/address (#1159) 2026-06-13 15:02:50 +05:00
test_cbr_macro_sync.py fix(sql): EMISS PK includes period_type so yearly+Q1 coexist (#1606 follow-up) 2026-06-17 21:27:34 +03:00
test_genplan_zones_sync.py fix(sf): ST_MakeValid genplan geom + backfill 881 invalid polygons (#1157) 2026-06-07 17:59:04 +00:00
test_ird_harvest.py fix(sf): per-quarter commit в ird/opportunity harvest — не терять прогресс при краше (#1107) 2026-06-06 21:47:35 +00:00
test_krt_geometry_sync.py perf(sf): КРТ-геометрия в БД, _krt_at из БД вместо живого WFS (#1139) 2026-06-07 12:14:35 +00:00
test_nspd_geo.py test: выровнять weather_cache/nspd_geo тесты под #1377/#1336 (CI red→green) 2026-06-16 08:35:14 +03:00
test_opportunity_harvest.py feat(sf): opportunity-ЗУ harvest → ird_overlays (future-supply, #1100) 2026-06-06 19:32:45 +00:00
test_planning_harvest.py feat(sf): ППТ/ПМТ WFS ingest → planning_projects (future-supply, #1104) 2026-06-06 20:25:23 +00:00
test_reservation_ingest.py feat(sf): enumerate изъятия/резервирования с pravo.gov66 → land_reservation (#1145) 2026-06-07 13:56:29 +00:00
test_rosstat_macro_sync.py fix(sql): EMISS PK includes period_type so yearly+Q1 coexist (#1606 follow-up) 2026-06-17 21:27:34 +03:00
test_scrape_cadastre.py fix(workers): cadastre permanent-fail targets_failed + beat cleanup (#1236) 2026-06-13 08:36:13 +00:00
test_scrape_kn_catalog_objects.py feat(22d): catalog scraper — skip-today filter + force flag (#348) 2026-05-17 23:15:22 +00:00
test_supply_layers_refresh.py fix(supply-layers): thread dev_group_name into L3 upsert key (#970 CRITICAL) 2026-06-04 10:06:30 +05:00
test_zone_regulation_refresh.py feat(sf): прогрев zone_regulation_cache по терзонам ЕКБ (#1106) 2026-06-06 21:04:52 +00:00