feat: GTFS validation worker wrapping the validator CLI
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 18/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, cloud, data-engineering
Hướng nghiên cứu
Read the existing parquet_builder worker first to see how a containerized worker, TaskExecutionTracker (with try_acquire/heartbeat/mark_completed/record_attempt) and MemorySampler are wired today, then limit_gcp_memory and shared/helpers/sizing.py for the memory/tier math. The new pieces are the Python chunked extraction from GCS, the CLI subprocess invocation with a tier-derived heap, the report upload to <feed>/<dataset>/, and a new validator_policy.py for escalation/demotion. Done looks like a worker that produces report_<ver>.json/.html and system_errors_<ver>.json, clears the volume, and queues process-validation-report with the same payload as the current gtfs-validator-web flow.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the problem
Dataset validation goes through gtfs-validator-web in another region: every run uses 4 vCPU / 16 GiB, datasets and reports cross regions, and the workflow polls GCS for up to 60 min. See product-tasks#234.
Proposed solution
A worker in mobility-feed-api, built as a container (Python + JRE + pinned gtfs-validator-cli.jar), following the parquet_builder pattern:
- Tracking:
TaskExecutionTracker(task_name="gtfs_validation", run_id=<validator version>)(existing task name).try_acquirewithK_REVISION,heartbeatwhile the JVM runs,mark_completed/mark_failed, andrecord_attemptwith tier, peak memory and input size. A delivery that failstry_acquirereturnsskipped. - Input handling (the validator reads files only during the load phase, but keeps a zip input open until the run ends):
- Never pass a URL or a non-local NIO path to the CLI: both load the whole zip into the heap.
- Candidates, chosen by measuring peak volume + peak JVM memory per tier in dev:
- Streamed, chunked extraction in Python straight from GCS; Python deletes each extracted file once the JVM has closed it, so the volume is empty for validation and reports.
- Baseline: zip downloaded to the volume.
- Runs the CLI as a subprocess, heap set from the tier memory minus the volume (as
limit_gcp_memorydoes), and samples the JVM withMemorySampler. - Uploads
report.json,report.html,system_errors.jsonasreport_<ver>.json,report_<ver>.html,system_errors_<ver>.json(publicRead) to<feed>/<dataset>/, clears the volume, then queuesprocess-validation-reportwith the same payload as today. - Keeps the skip-if-reports-exist check,
bypass_db_updateand the reports bucket override. - Sizing with
shared/helpers/sizing.pyand a newvalidator_policy.py: escalates one tier on JVM OOM or a full volume (max 3 attempts); demotes afterDOWNSIZE_STREAKruns underDOWNSIZE_HEADROOM; a locked override blocks both. <ver>must match the version string used today, since file names and DB rows depend on it.
Alternatives you've considered
gtfs-validator-apicalled by a worker or directly by Cloud Tasks: needs a ZIP response or a GCS output option, gives no in-process memory measurement, and leaves no clean way to escalate.- GCS FUSE mount of the datasets bucket: rejected as a risk.
- Ngôn ngữ chính
- Python
- Star
- 34
- Fork
- 7
- Merge trung bình
- 3 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MobilityData/mobility-feed-api
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
MobilityData/mobility-feed-api#1927 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
MobilityData/mobility-feed-api#1846 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
MobilityData/mobility-feed-api#1755 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
MobilityData/mobility-feed-api#1647 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
MobilityData/mobility-feed-api#836 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của MobilityData/mobility-feed-api
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
OStrama/weishaupt_modbus#216 ·
-
bug follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Retire stale Python-parity labels in Rust ingress and auth testsCó thể đã có người làm @github-actions đã nhận hôm nay. Đang mởfactory factory:building factory:unowned ralph-status:in-progress via:opencode-free/hy4-flash-free
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
JoshCLWren/comic-pile#5874 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
area: community lane: free-agent priority: P1 roadmap type: task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
velella-sh/offing#1046 ·
Maintainer thường phản hồi trong vòng 1 ngày