diff --git a/CHANGELOG.md b/CHANGELOG.md index cdd4fbd..ed639e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Thread to push logs at regular interval +## [1.8.3] - 2023-12-01 + +## Fixed + +- Remove redundant slash in URL path + ## [1.8.2] - 2023-11-28 ## Changed diff --git a/poetry.lock b/poetry.lock index 3dfc356..60f3834 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,25 +1,25 @@ -# This file is automatically @generated by Poetry 1.6.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. [[package]] name = "aiobotocore" -version = "2.7.0" +version = "2.8.0" description = "Async client for aws services using botocore and aiohttp" optional = true python-versions = ">=3.8" files = [ - {file = "aiobotocore-2.7.0-py3-none-any.whl", hash = "sha256:aec605df77ce4635a0479b50fd849aa6b640900f7b295021ecca192e1140e551"}, - {file = "aiobotocore-2.7.0.tar.gz", hash = "sha256:506591374cc0aee1bdf0ebe290560424a24af176dfe2ea7057fe1df97c4f0467"}, + {file = "aiobotocore-2.8.0-py3-none-any.whl", hash = "sha256:32e632fea387acd45416c2bbc03828ee2c2a66a7dc4bd3a9bcb808dea249c469"}, + {file = "aiobotocore-2.8.0.tar.gz", hash = "sha256:f160497cef21cfffc1a8d4219eeb27bb7b243389c2d021a812b9c0e3fb8e2bd1"}, ] [package.dependencies] aiohttp = ">=3.7.4.post0,<4.0.0" aioitertools = ">=0.5.1,<1.0.0" -botocore = ">=1.31.16,<1.31.65" +botocore = ">=1.32.4,<1.33.2" wrapt = ">=1.10.10,<2.0.0" [package.extras] -awscli = ["awscli (>=1.29.16,<1.29.65)"] -boto3 = ["boto3 (>=1.28.16,<1.28.65)"] +awscli = ["awscli (>=1.30.4,<1.31.2)"] +boto3 = ["boto3 (>=1.29.4,<1.33.2)"] [[package]] name = "aiocsv" @@ -186,7 +186,7 @@ files = [ [[package]] name = "aioresponses" -version = "0.7.6.dev3" +version = "0.7.6" description = "Mock out requests made by ClientSession from aiohttp package" optional = false python-versions = "*" @@ -336,32 +336,32 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "boto3" -version = "1.28.64" +version = "1.33.1" description = "The AWS SDK for Python" optional = false python-versions = ">= 3.7" files = [ - {file = "boto3-1.28.64-py3-none-any.whl", hash = "sha256:a99150a30c038c73e89662836820a8cce914afab5ea377942a37c484b85f4438"}, - {file = "boto3-1.28.64.tar.gz", hash = "sha256:a5cf93b202568e9d378afdc84be55a6dedf11d30156289fe829e23e6d7dccabb"}, + {file = "boto3-1.33.1-py3-none-any.whl", hash = "sha256:fa5aa92d16763cb906fb4a83d6eba887342202a980bea07862af5ba40827aa5a"}, + {file = "boto3-1.33.1.tar.gz", hash = "sha256:1fe5fa75ff0f0c29a6f55e818d149d33571731e692a7b785ded7a28ac832cae8"}, ] [package.dependencies] -botocore = ">=1.31.64,<1.32.0" +botocore = ">=1.33.1,<1.34.0" jmespath = ">=0.7.1,<2.0.0" -s3transfer = ">=0.7.0,<0.8.0" +s3transfer = ">=0.8.0,<0.9.0" [package.extras] crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.31.64" +version = "1.33.1" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">= 3.7" files = [ - {file = "botocore-1.31.64-py3-none-any.whl", hash = "sha256:7b709310343a5b430ec9025b2e17c0bac6b16c05f1ac1d9521dece3f10c71bac"}, - {file = "botocore-1.31.64.tar.gz", hash = "sha256:d8eb4b724ac437343359b318d73de0cfae0fecb24095827e56135b0ad6b44caf"}, + {file = "botocore-1.33.1-py3-none-any.whl", hash = "sha256:c744b90980786c610dd9ad9c50cf2cdde3f1c4634b954a33613f6f8a1865a1de"}, + {file = "botocore-1.33.1.tar.gz", hash = "sha256:d22d29916905e5f0670b91f07688e92b2c4a2075f9a474d6edbe7d22040d8fbf"}, ] [package.dependencies] @@ -370,7 +370,7 @@ python-dateutil = ">=2.1,<3.0.0" urllib3 = {version = ">=1.25.4,<2.1", markers = "python_version >= \"3.10\""} [package.extras] -crt = ["awscrt (==0.16.26)"] +crt = ["awscrt (==0.19.17)"] [[package]] name = "build" @@ -2432,20 +2432,20 @@ smart-open = "*" [[package]] name = "s3transfer" -version = "0.7.0" +version = "0.8.0" description = "An Amazon S3 Transfer Manager" optional = false python-versions = ">= 3.7" files = [ - {file = "s3transfer-0.7.0-py3-none-any.whl", hash = "sha256:10d6923c6359175f264811ef4bf6161a3156ce8e350e705396a7557d6293c33a"}, - {file = "s3transfer-0.7.0.tar.gz", hash = "sha256:fd3889a66f5fe17299fe75b82eae6cf722554edca744ca5d5fe308b104883d2e"}, + {file = "s3transfer-0.8.0-py3-none-any.whl", hash = "sha256:baa479dc2e63e5c2ed51611b4d46cdf0295e2070d8d0b86b22f335ee5b954986"}, + {file = "s3transfer-0.8.0.tar.gz", hash = "sha256:e8d6bd52ffd99841e3a57b34370a54841f12d3aab072af862cdcc50955288002"}, ] [package.dependencies] -botocore = ">=1.12.36,<2.0a.0" +botocore = ">=1.32.7,<2.0a.0" [package.extras] -crt = ["botocore[crt] (>=1.20.29,<2.0a.0)"] +crt = ["botocore[crt] (>=1.32.7,<2.0a.0)"] [[package]] name = "secretstorage" @@ -2464,13 +2464,13 @@ jeepney = ">=0.6" [[package]] name = "sentry-sdk" -version = "1.37.1" +version = "1.38.0" description = "Python client for Sentry (https://sentry.io)" optional = false python-versions = "*" files = [ - {file = "sentry-sdk-1.37.1.tar.gz", hash = "sha256:7cd324dd2877fdc861f75cba4242bce23a58272a6fea581fcb218bb718bd9cc5"}, - {file = "sentry_sdk-1.37.1-py2.py3-none-any.whl", hash = "sha256:a249c7364827ee89daaa078bb8b56ece0b3d52d9130961bef2302b79bdf7fe70"}, + {file = "sentry-sdk-1.38.0.tar.gz", hash = "sha256:8feab81de6bbf64f53279b085bd3820e3e737403b0a0d9317f73a2c3374ae359"}, + {file = "sentry_sdk-1.38.0-py2.py3-none-any.whl", hash = "sha256:0017fa73b8ae2d4e57fd2522ee3df30453715b29d2692142793ec5d5f90b94a6"}, ] [package.dependencies] @@ -2615,13 +2615,13 @@ files = [ [[package]] name = "trove-classifiers" -version = "2023.11.22" +version = "2023.11.29" description = "Canonical source for classifiers on PyPI (pypi.org)." optional = false python-versions = "*" files = [ - {file = "trove-classifiers-2023.11.22.tar.gz", hash = "sha256:c31a7e92f965f060a244b57d8ed5ee6f53fcb413ee17ce790e00577cb369ad99"}, - {file = "trove_classifiers-2023.11.22-py3-none-any.whl", hash = "sha256:533df77e284fd645d90deeafd3ef710d290884efafe4f5009aa1663f95aec992"}, + {file = "trove-classifiers-2023.11.29.tar.gz", hash = "sha256:ff8f7fd82c7932113b46e7ef6742c70091cc63640c8c65db00d91f2e940b9514"}, + {file = "trove_classifiers-2023.11.29-py3-none-any.whl", hash = "sha256:02307750cbbac2b3d13078662f8a5bf077732bf506e9c33c97204b7f68f3699e"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 4c28bc0..7c8dfb9 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.8.2" +version = "1.8.3" description = "SDK to create Sekoia.io playbook modules" license = "MIT" readme = "README.md" diff --git a/sekoia_automation/aio/connector.py b/sekoia_automation/aio/connector.py index e264a50..20f3a3d 100644 --- a/sekoia_automation/aio/connector.py +++ b/sekoia_automation/aio/connector.py @@ -107,7 +107,7 @@ async def push_data_to_intakes( list[str]: """ self._last_events_time = datetime.utcnow() - batch_api = urljoin(self.configuration.intake_server, "/batch") + batch_api = urljoin(self.configuration.intake_server, "batch") self.log(f"Push {len(events)} events to intakes") diff --git a/tests/aio/test_connector.py b/tests/aio/test_connector.py index b9001cf..1fdcd61 100644 --- a/tests/aio/test_connector.py +++ b/tests/aio/test_connector.py @@ -115,7 +115,7 @@ async def test_async_connector_push_single_event( single_event_id = faker.uuid4() - request_url = urljoin(async_connector.configuration.intake_server, "/batch") + request_url = urljoin(async_connector.configuration.intake_server, "batch") with aioresponses() as mocked_responses: mocked_responses.post( @@ -154,7 +154,7 @@ async def test_async_connector_push_multiple_events( single_event_id = faker.uuid4() - request_url = urljoin(async_connector.configuration.intake_server, "/batch") + request_url = urljoin(async_connector.configuration.intake_server, "batch") with aioresponses() as mocked_responses, patch( "sekoia_automation.connector.CHUNK_BYTES_MAX_SIZE", 128 @@ -198,7 +198,7 @@ async def test_async_connector_raise_error( stop=stop_after_attempt(1), ) - request_url = urljoin(async_connector.configuration.intake_server, "/batch") + request_url = urljoin(async_connector.configuration.intake_server, "batch") with aioresponses() as mocked_responses, patch( "sekoia_automation.connector.CHUNK_BYTES_MAX_SIZE", 128