Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/test_oonipipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ jobs:
run_tests:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

# Contrary to oonidata, which is a tool for end users, oonipipeline
# targets a single python version to minimize the likelyhood of breakage
# in production.
- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: 3.11

Expand All @@ -26,13 +26,13 @@ jobs:
key: oonipipeline-tests-data-datadir

- name: Set up measurements cache
uses: actions/cache@v3
uses: actions/cache@v5
with:
path: oonipipeline/tests/data/measurements/
key: oonipipeline-tests-data-measurements

- name: Set up raw_measurements cache
uses: actions/cache@v3
uses: actions/cache@v5
with:
path: oonipipeline/tests/data/raw_measurements/
key: oonipipeline-tests-data-raw_measurements-${{ hashFiles('tests/conftest.py') }}
Expand All @@ -51,7 +51,7 @@ jobs:
working-directory: ./oonipipeline/

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v6
with:
flags: oonipipeline
working-directory: ./oonipipeline/
Expand Down
30 changes: 14 additions & 16 deletions oonipipeline/src/oonipipeline/db/create_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,35 +237,33 @@ def make_create_queries():
),
(
"""

CREATE TABLE IF NOT EXISTS event_detector_cusums
(
`probe_asn` UInt32,
`probe_cc` String,
`domain` String,
`ts` DateTime64(3, 'UTC'),
`dns_isp_blocked_current_state` String DEFAULT 'unk',
`dns_isp_blocked_last_state` String DEFAULT 'unk',
`dns_isp_blocked_last_ts` String DEFAULT 'unk',
`dns_isp_blocked_current_state` String DEFAULT 'ok',
`dns_isp_blocked_s_pos` Nullable(Float64),
`dns_isp_blocked_s_neg` Nullable(Float64),

`dns_other_blocked_current_state` String DEFAULT 'unk',
`dns_other_blocked_last_state` String DEFAULT 'unk',
`dns_other_blocked_last_ts` String DEFAULT 'unk',
`dns_other_blocked_current_state` String DEFAULT 'ok',
`dns_other_blocked_s_pos` Nullable(Float64),
`dns_other_blocked_s_neg` Nullable(Float64),

`tcp_blocked_current_state` String DEFAULT 'unk',
`tcp_blocked_last_state` String DEFAULT 'unk',
`tcp_blocked_last_ts` String DEFAULT 'unk',
`tcp_blocked_current_state` String DEFAULT 'ok',
`tcp_blocked_s_pos` Nullable(Float64),
`tcp_blocked_s_neg` Nullable(Float64),

`tls_blocked_current_state` String DEFAULT 'unk',
`tls_blocked_last_state` String DEFAULT 'unk',
`tls_blocked_last_ts` String DEFAULT 'unk',
`tls_blocked_current_state` String DEFAULT 'ok',
`tls_blocked_s_pos` Nullable(Float64),
`tls_blocked_s_neg` Nullable(Float64)
`tls_blocked_s_neg` Nullable(Float64),
`dns_isp_blocked_last_change` Int8 DEFAULT 0,
`dns_isp_blocked_last_ts` Nullable(DateTime64(3, 'UTC')),
`dns_other_blocked_last_change` Int8 DEFAULT 0,
`dns_other_blocked_last_ts` Nullable(DateTime64(3, 'UTC')),
`tcp_blocked_last_change` Int8 DEFAULT 0,
`tcp_blocked_last_ts` Nullable(DateTime64(3, 'UTC')),
`tls_blocked_last_change` Int8 DEFAULT 0,
`tls_blocked_last_ts` Nullable(DateTime64(3, 'UTC'))
Comment thread
LDiazN marked this conversation as resolved.
)
ENGINE = ReplacingMergeTree(ts)
ORDER BY (probe_asn, probe_cc, domain);
Expand Down
Loading