From 6dbeec8eac3196a38a0bca8b445f897959a21422 Mon Sep 17 00:00:00 2001 From: Alexander Rashed Date: Tue, 16 May 2023 08:43:46 +0200 Subject: [PATCH 1/2] remove pin on botocore after kafka spec fixes --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 498a344afc8d5..c59387692d713 100644 --- a/setup.cfg +++ b/setup.cfg @@ -69,7 +69,7 @@ runtime = awscrt>=0.13.14 boto>=2.49.0 boto3>=1.26.121 - botocore>=1.29.121,<=1.29.121 + botocore>=1.29.121 cbor2>=5.2.0 crontab>=0.22.6 dnslib>=0.9.10 From d13a19e0e337e8d381f7ca961088fa18765a0e8f Mon Sep 17 00:00:00 2001 From: Alexander Rashed Date: Tue, 16 May 2023 16:57:48 +0200 Subject: [PATCH 2/2] fix param pre-processing for forwarder after botocore upgrade --- localstack/aws/forwarder.py | 2 ++ setup.cfg | 2 +- tests/unit/aws/test_service_router.py | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/localstack/aws/forwarder.py b/localstack/aws/forwarder.py index 17b0f4760d1ea..18737f89edbd9 100644 --- a/localstack/aws/forwarder.py +++ b/localstack/aws/forwarder.py @@ -175,6 +175,8 @@ def create_aws_request_context( # The endpoint URL is mandatory here, set a dummy if not given (doesn't _need_ to be localstack specific) if not endpoint_url: endpoint_url = "http://localhost.localstack.cloud" + # pre-process the request args (some params are modified using botocore event handlers) + parameters = client._emit_api_params(parameters, operation, request_context) request_dict = client._convert_to_request_dict( parameters, operation, endpoint_url, context=request_context ) diff --git a/setup.cfg b/setup.cfg index c59387692d713..9c0e69cd466a8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -69,7 +69,7 @@ runtime = awscrt>=0.13.14 boto>=2.49.0 boto3>=1.26.121 - botocore>=1.29.121 + botocore>=1.29.133 cbor2>=5.2.0 crontab>=0.22.6 dnslib>=0.9.10 diff --git a/tests/unit/aws/test_service_router.py b/tests/unit/aws/test_service_router.py index 45060555a1560..fe1378c9fbb91 100644 --- a/tests/unit/aws/test_service_router.py +++ b/tests/unit/aws/test_service_router.py @@ -172,6 +172,8 @@ def test_service_router_works_for_every_service( } request_args = _create_dummy_request_args(operation) + # pre-process the request args (some params are modified using botocore event handlers) + request_args = client._emit_api_params(request_args, operation, request_context) # The endpoint URL is mandatory here, just set a dummy (doesn't _need_ to be localstack specific) request_dict = client._convert_to_request_dict( request_args, operation, "http://localhost.localstack.cloud", request_context