From eb6db8fa008a0d00333b001823f3f3fe3d252271 Mon Sep 17 00:00:00 2001 From: scallec Date: Fri, 22 Mar 2024 11:34:22 +0100 Subject: [PATCH 1/3] fix(aio) Use env variable to build batch URL --- sekoia_automation/aio/connector.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sekoia_automation/aio/connector.py b/sekoia_automation/aio/connector.py index 9f40e84..502a539 100644 --- a/sekoia_automation/aio/connector.py +++ b/sekoia_automation/aio/connector.py @@ -5,6 +5,7 @@ from collections.abc import AsyncGenerator from contextlib import asynccontextmanager from datetime import datetime +import os from pathlib import Path from urllib.parse import urljoin @@ -153,7 +154,8 @@ async def push_data_to_intakes( list[str]: """ self._last_events_time = datetime.utcnow() - batch_api = urljoin(self.configuration.intake_server, "batch") + intake_host = os.getenv("INTAKE_URL", self.configuration.intake_server) + batch_api = urljoin(intake_host, "batch") result_ids = [] From fbdf715e0bc8b503c2e26953cc7048747e06221d Mon Sep 17 00:00:00 2001 From: scallec Date: Fri, 22 Mar 2024 11:40:05 +0100 Subject: [PATCH 2/3] Versionning --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b48cdcc..1cb7448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.12.1] - 2024-03-22 + +### Fixed + +- Fixes batch url computation + ## [1.12.0] - 2024-02-27 ### Added diff --git a/pyproject.toml b/pyproject.toml index d04e57c..332381e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "sekoia-automation-sdk" -version = "1.12.0" +version = "1.12.1" description = "SDK to create Sekoia.io playbook modules" license = "MIT" readme = "README.md" From d7fafa7350cec62b14642681841a98c8ba196a31 Mon Sep 17 00:00:00 2001 From: scallec Date: Fri, 22 Mar 2024 11:43:19 +0100 Subject: [PATCH 3/3] Fix Ruff --- sekoia_automation/aio/connector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sekoia_automation/aio/connector.py b/sekoia_automation/aio/connector.py index 502a539..c7dba8d 100644 --- a/sekoia_automation/aio/connector.py +++ b/sekoia_automation/aio/connector.py @@ -1,11 +1,11 @@ """Contains connector with async version.""" +import os from abc import ABC from asyncio import AbstractEventLoop, get_event_loop from collections.abc import AsyncGenerator from contextlib import asynccontextmanager from datetime import datetime -import os from pathlib import Path from urllib.parse import urljoin