Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5.0.0 alpha-4 #83

Merged
merged 26 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5d922c5
Get rid of all the dataviz that isn't the analysis visualizer
hellais Aug 23, 2024
2c93783
Add an observations viewer
hellais Aug 23, 2024
a497872
Tidy up the layout of the analysis viewer
hellais Aug 23, 2024
0d1c655
Add simple redirector
hellais Aug 23, 2024
a06a793
Fastapi based API (#45)
hellais Sep 2, 2024
599e063
Change type of telemetry endpoint
hellais Sep 2, 2024
5392a10
Implement workaround for https://github.com/jaegertracing/jaeger/issu…
hellais Sep 2, 2024
f0ce985
Add support for exposing prometheus metrics
hellais Sep 3, 2024
ae1fb78
Add to CLI
hellais Sep 3, 2024
f17863b
Tweak the file entry batch parameters
hellais Sep 3, 2024
99bfa0d
Refactoring of observation related activities (#86)
hellais Sep 6, 2024
d628112
Update oonipipeline Readme with changes to the CLI
hellais Sep 6, 2024
928874f
Perform lightweight delete instead of ALTER DELETE
hellais Sep 6, 2024
c4d2685
Fix delete query
hellais Sep 6, 2024
9c6ba01
Switch batch to heavy delete
hellais Sep 6, 2024
87f6d62
Rename command to clear_schedules
hellais Sep 6, 2024
8b907cd
Fix tests for scheduling
hellais Sep 6, 2024
268f750
Schedule deletion and listing has too much lag to be reliable for tes…
hellais Sep 6, 2024
331e776
Bump version
hellais Sep 6, 2024
e526fe5
Wait for mutations to complete before doing optimize
hellais Sep 6, 2024
9bd822d
Sleep for 2 seconds
hellais Sep 6, 2024
4dbf122
Fix bug in mutation call
hellais Sep 6, 2024
2b801d9
Handle corrupt file entries
hellais Sep 9, 2024
83fbfdd
Unbump version number
hellais Sep 9, 2024
713a0c1
Wait for schedules to be cleared before rescheduling
hellais Sep 9, 2024
e3da154
Wait for schedules to be cleared
hellais Sep 9, 2024
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
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"python.defaultInterpreterPath": "${workspaceFolder}/oonipipeline/.venv",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
}
},
"editor.formatOnSaveMode": "modifications"
}
8 changes: 4 additions & 4 deletions oonidata/src/oonidata/dataclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ def create_s3_client():
return boto3.client("s3", config=botoConfig(signature_version=botoSigUNSIGNED))


s3 = create_s3_client()


def date_interval(start_day: date, end_day: date):
"""
A generator for a date_interval.
Expand Down Expand Up @@ -243,6 +240,7 @@ def stream_oldcan(body: io.BytesIO, s3path: str) -> Generator[dict, None, None]:


def stream_measurements(bucket_name, s3path, ext):
s3 = create_s3_client()
body = s3.get_object(Bucket=bucket_name, Key=s3path)["Body"]
log.debug(f"streaming file s3://{bucket_name}/{s3path}")
if ext == "jsonl.gz":
Expand Down Expand Up @@ -334,6 +332,7 @@ def from_obj_dict(bucket_name: str, obj_dict: dict) -> "FileEntry":


def list_all_testnames() -> Set[str]:
s3 = create_s3_client()
testnames = set()
paginator = s3.get_paginator("list_objects_v2")
for r in paginator.paginate(Bucket=MC_BUCKET_NAME, Prefix="jsonl/", Delimiter="/"):
Expand All @@ -354,6 +353,7 @@ def get_v2_search_prefixes(testnames: Set[str], ccs: Set[str]) -> List[Prefix]:
If the ccs list is empty we will return prefixes for all countries for
which that particular testname as measurements.
"""
s3 = create_s3_client()
prefixes = []
paginator = s3.get_paginator("list_objects_v2")
for tn in testnames:
Expand Down Expand Up @@ -577,7 +577,7 @@ def list_file_entries_batches(
probe_cc: CSVList = None,
test_name: CSVList = None,
from_cans: bool = True,
) -> Tuple[List[Tuple], int]:
) -> Tuple[List[List[Tuple]], int]:
if isinstance(start_day, str):
start_day = datetime.strptime(start_day, "%Y-%m-%d").date()
if isinstance(end_day, str):
Expand Down
328 changes: 0 additions & 328 deletions oonidata/src/oonidata/s3client.py

This file was deleted.

Loading
Loading