From a119e6833554f71593ac6be4b7fa062ceed29c81 Mon Sep 17 00:00:00 2001 From: Renan Souza Date: Tue, 3 Dec 2024 16:37:13 -0500 Subject: [PATCH] Adding more clean up in the GH workflow --- .github/workflows/run-tests-kafka.yml | 9 --------- .github/workflows/run-tests.yml | 5 ++++- src/flowcept/commons/utils.py | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/run-tests-kafka.yml b/.github/workflows/run-tests-kafka.yml index a7aedc49..ef340586 100644 --- a/.github/workflows/run-tests-kafka.yml +++ b/.github/workflows/run-tests-kafka.yml @@ -47,12 +47,3 @@ jobs: - name: Test notebooks run: pytest --ignore=notebooks/zambeze.ipynb --nbmake "notebooks/" --nbmake-timeout=600 --ignore=notebooks/dask_from_CLI.ipynb - -# - name: Test notebooks -# run: | -# pip install -e .[all] # Installing stuff again may not be needed -# export MQ_TYPE=kafka -# export MQ_PORT=9092 -# python -c 'from flowcept.configs import MQ_TYPE, MQ_PORT; print(f"MQ_TYPE={MQ_TYPE}"); print(f"MQ_PORT={MQ_PORT}")' -# python -c 'from flowcept import Flowcept; assert Flowcept.services_alive()' -# pytest --ignore=notebooks/zambeze.ipynb --nbmake "notebooks/" --nbmake-timeout=600 --ignore=notebooks/dask_from_CLI.ipynb diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5a73f0b9..f62aad7e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -106,4 +106,7 @@ jobs: make tests - name: Stop docker compose with kafka - run: docker compose -f deployment/compose-kafka.yml down \ No newline at end of file + run: docker compose -f deployment/compose-kafka.yml down + + - name: Clean up log files again + run: find /home/runner/runners/ -type f -name "*.log" -exec sh -c 'echo {}; >"{}"' \; diff --git a/src/flowcept/commons/utils.py b/src/flowcept/commons/utils.py index a7e8e427..43744e68 100644 --- a/src/flowcept/commons/utils.py +++ b/src/flowcept/commons/utils.py @@ -43,8 +43,8 @@ def get_utc_minutes_ago(minutes_ago=1): def perf_log(func_name, t0: float, logger=None): """Configure the performance log.""" if PERF_LOG: - _logger = logger or FlowceptLogger() t1 = time() + _logger = logger or FlowceptLogger() _logger.debug(f"[PERFEVAL][{func_name}]={t1 - t0}") return t1 return None