feat: route dataset validation to the GTFS validation worker
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 22/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- gcp, google-cloud, python
- 领域
- backend, cloud, data-engineering
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 34
- 派生
- 7
- 平均合并
- 2 天 22 小时
- 30 天内合并 PR
- 21
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MobilityData/mobility-feed-api 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
MobilityData/mobility-feed-api#1927 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
MobilityData/mobility-feed-api#1846 ·
维护者通常 2 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
MobilityData/mobility-feed-api#1755 · 1 个 reaction ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
MobilityData/mobility-feed-api#1647 ·
维护者通常 2 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
MobilityData/mobility-feed-api#836 ·
维护者通常 2 天内回复
查看 MobilityData/mobility-feed-api 的全部 Issue
相似的 Issue
-
backend enhancement priority:P3
难度 2/5 1-3 小时 新手友好度 68/100
geolens-io/geolens#4161 ·
维护者通常 1 天内回复
-
pkg:clai2
难度 1/5 1 小时以内 新手友好度 75/100
pydantic/pydantic-ai#14845 ·
维护者通常 1 天内回复
-
Add a language未关闭good first issue
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 65/100
LearningCircuit/local-deep-research#9272 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 86/100
patrickballard/wheelgap#783 ·