Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

missing database table measurement_experiment_result after running oonipipeline --create-tables

未关闭
#158 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
clickhouse, python
领域
api, backend, database

调研方向

首先跟踪 oonipipeline run --create-tables 命令,并将其创建的表与 /api/v1/measurements 使用的 measurement_experiment_result 查询进行比较。重新执行该命令,启动 oonipipeline.api.main:app 并调用端点;表创建成功且请求不再返回缺少表的错误,即表示完成。

由索引模型根据 Issue 内容生成。

描述

steps to reproduce:

oonipipeline run --create-tables --probe-cc IT --test-name signal --workflow-name observations --start-at 2026-01-01 --end-at 2026-01-02"
uvicorn --log-level debug --port 8000 --host 0.0.0.0 oonipipeline.api.main:app
curl http://localhost:8000/api/v1/measurements?since=2026-01-01T00%3A00%3A00&until=2026-01-02T00%3A00%3A00&order_by=measurement_start_time&order=DESC&offset=0&limit=100

error:

[api]        | INFO:oonipipeline.api.routers.list_analysis:running query SELECT measurement_uid,observation_id_list,timeofday,created_at,location_network_type,location_network_asn,location_network_cc,location_network_as_org_name,location_network_as_cc,location_resolver_asn,location_resolver_as_org_name,location_resolver_as_cc,location_resolver_cc,location_blocking_scope,target_nettest_group,target_category,target_name,target_domain_name,target_detail,loni_ok_value,loni_down_keys,loni_down_values,loni_blocked_keys,loni_blocked_values,loni_ok_keys,loni_ok_values,loni_list,analysis_transcript_list,measurement_count,observation_count,vp_count,anomaly,confirmed FROM measurement_experiment_result WHERE timeofday >= %(since)s AND timeofday <= %(until)s ORDER BY timeofday DESC LIMIT 100 OFFSET 0 with {'since': datetime.datetime(2026, 1, 1, 0, 0), 'until': datetime.datetime(2026, 1, 2, 0, 0)}
[api]        | INFO:     10.89.0.6:35460 - "GET /api/v1/measurements?since=2026-01-01T00%3A00%3A00&until=2026-01-02T00%3A00%3A00&order_by=measurement_start_time&order=DESC&offset=0&limit=100 HTTP/1.1" 500 Internal Server Error
[api]        | ERROR:    Exception in ASGI application
... snip ...
[api]        | clickhouse_driver.errors.ServerException: Code: 60.
[api]        | DB::Exception: Unknown table expression identifier 'measurement_experiment_result' in scope SELECT measurement_uid, observation_id_list, timeofday, created_at, location_network_type, location_network_asn, location_network_cc, location_network_as_org_name, location_network_as_cc, location_resolver_asn, location_resolver_as_org_name, location_resolver_as_cc, location_resolver_cc, location_blocking_scope, target_nettest_group, target_category, target_name, target_domain_name, target_detail, loni_ok_value, loni_down_keys, loni_down_values, loni_blocked_keys, loni_blocked_values, loni_ok_keys, loni_ok_values, loni_list, analysis_transcript_list, measurement_count, observation_count, vp_count, anomaly, confirmed FROM measurement_experiment_result WHERE (timeofday >= '2026-01-01 00:00:00') AND (timeofday <= '2026-01-02 00:00:00') ORDER BY timeofday DESC LIMIT 0, 100. Stack trace:
主要语言
Python
星标
11
派生
6
平均合并
2 天 15 小时
30 天内合并 PR
9

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ooni/data 的其他 Issue

查看 ooni/data 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。