feat: route dataset validation to the GTFS validation worker
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
- 22/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- gcp, google-cloud, python
- Lĩnh vực
- backend, cloud, data-engineering
Hướng nghiên cứu
This is a multi-part design change spanning enqueueing, the monitor and rollout, and it names behaviors (create_http_gtfs_validator_task, try_acquire, heartbeat, mark_triggered, sync_task_run_status) without naming files. Start by reading the existing create_http_parquet_builder_task helper and parquet_api_impl for the enqueue/commit pattern, then the gtfs_daily_pipeline monitor and the gtfs_validation schema. Done means the validator is reached only via Cloud Tasks on the correct tier, the validation stage reports completed/failed/pending with a working lease sweep, and dev output matches the current pipeline. Given the scope, it needs a maintainer's guidance before anyone starts.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the problem
New datasets trigger the gtfs_validator_execution workflow via Eventarc, and rebuild_missing_validation_reports starts the same workflow with an optional validator_endpoint. Validation is not part of the daily pipeline run (#1918).
Proposed solution
Enqueue
- Shared helper
create_http_gtfs_validator_task(alongsidecreate_http_parquet_builder_task): Cloud Task on the tier's queue, HTTP POST togtfs-validator-<tier>-<env>with an OIDC token, payload{feed_id, dataset_id, validator_variant, bypass_db_update, reports_bucket_name}.- Task name derived from dataset id + validator variant + attempt, so a duplicate enqueue is rejected.
dispatch_deadlineat the Cloud Tasks maximum (30 min). A redelivery while a validation is still running is absorbed by the worker's lease (try_acquire+heartbeat).
- Before creating the task, the caller runs
start_runandmark_triggered(dataset_id)and commits (asparquet_api_impldoes); on enqueue failure it callsmark_failed. batch_process_datasetcalls the helper after upload. Tier at queue time: feed override first, otherwise the uncompressed size read from the zip's central directory,lwhen unknown.rebuild_missing_validation_reportscalls the helper instead of starting the workflow. Replacevalidator_endpointwithvalidator_variant(stable|snapshot);snapshotroutes to the snapshot service.
Monitoring
- Add a validation stage to the
gtfs_daily_pipelinemonitor: joinsgtfs_validationrows bydataset_id, reports completed / failed / pending. - Lease sweep in the validation stage:
triggeredand unclaimed after a threshold -> re-enqueue on the same tier;in_progresswith an expired lease ->record_attempt(failed),escalate, re-enqueue. sync_task_run_statusforgtfs_validationruns (rebuild_missing_validation_reports): resolve rows byexecution_reftype (Workflows execution name -> current path; Cloud Run revision -> lease check).
Rollout
- Switch per environment. In dev, compare
report.jsonfor ~100 datasets of mixed sizes against the current pipeline (ignoring timestamps and duration) before qa and prod. - No change to report paths, file names or DB rows.
Alternatives you've considered
- Keep the Eventarc trigger and point it at the worker: the trigger has no dataset size, so every dataset would start at
l. - Cloud Tasks retries only: retries stay on the same tier and a killed run is never recorded.
- Ngôn ngữ chính
- Python
- Star
- 34
- Fork
- 7
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 21
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ự
-
backend enhancement priority:P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
geolens-io/geolens#4161 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pkg:clai2
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
pydantic/pydantic-ai#14845 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add a languageĐang mởgood first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
LearningCircuit/local-deep-research#9272 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
patrickballard/wheelgap#783 ·