From 0e2e5a42f80b936f22fd4b3159e734865be6f1b0 Mon Sep 17 00:00:00 2001 From: Simon K <6615834+simon-20@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:45:35 +0000 Subject: [PATCH 1/3] docs: fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 35d365a..5614966 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ The example file is preconfigured to work with the local docker compose setup. #### 4. Install some version of `dotenv` (optional) -The `.env` file is used when running things locally to store environment variables that configure the apps mentioned above. Docker Compose will read this automatically, but when running the bulk data service app or `yoyo` directly, you need to get these variables into the shell environment: you can either source this file to get the environment variables into your current terminal context, or you can one of the various `dotenv` command line tools to import the environment on each run (using `dotenv` lets you quickly switch different `.env` files in and out, which can be useful for testing, debugging, etc). +The `.env` file is used when running things locally to store environment variables that configure the apps mentioned above. Docker Compose will read this automatically, but when running the bulk data service app or `yoyo` directly, you need to get these variables into the shell environment: you can either source this file to get the environment variables into your current terminal context, or you can use one of the various `dotenv` command line tools to import the environment on each run (using `dotenv` lets you quickly switch different `.env` files in and out, which can be useful for testing, debugging, etc). ### Running after first-time setup From 005f40bceb057222f9b9065106e38bdf52d2f6df Mon Sep 17 00:00:00 2001 From: Simon K <6615834+simon-20@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:46:55 +0000 Subject: [PATCH 2/3] ops: added zipper duration as prom metric --- src/bulk_data_service/zipper.py | 1 + src/utilities/prometheus.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/bulk_data_service/zipper.py b/src/bulk_data_service/zipper.py index ed45d0e..db55677 100644 --- a/src/bulk_data_service/zipper.py +++ b/src/bulk_data_service/zipper.py @@ -63,6 +63,7 @@ def zipper_run(context: dict, datasets_in_working_dir: dict[uuid.UUID, dict], da run_end = datetime.datetime.now(datetime.UTC) context["logger"].info("Zipper run finished in {}.".format(run_end - run_start)) + context["prom_metrics"]["zipper_run_duration"].set((run_end - run_start).seconds) def setup_working_dir_with_downloaded_datasets( diff --git a/src/utilities/prometheus.py b/src/utilities/prometheus.py index 6577e39..977f49a 100644 --- a/src/utilities/prometheus.py +++ b/src/utilities/prometheus.py @@ -22,6 +22,10 @@ def get_metrics_definitions(context: dict) -> list: "checker_run_duration", "The time taken by the last run of the checker (seconds)", ), + ( + "zipper_run_duration", + "The time taken by the last run of the zipper (seconds)", + ), ( "number_crashes", "The number of crashes since app restart", From ec2f4fbc8180442415718ea6dd8d9048f8149548 Mon Sep 17 00:00:00 2001 From: Simon K <6615834+simon-20@users.noreply.github.com> Date: Wed, 11 Dec 2024 08:50:59 +0000 Subject: [PATCH 3/3] build: bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1971064..6192cfd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "bulk-data-service" -version = "0.1.6" +version = "0.1.7" requires-python = ">= 3.12" readme = "README.md" dependencies = [