Skip to content

Commit

Permalink
minor import fix to accommodate upstream changes (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
whummer authored Dec 10, 2023
1 parent 44db605 commit f707ed7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions aws-replicator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ localstack extensions install "git+https://github.com/localstack/localstack-exte

## Change Log

* `0.1.5`: Minor fix to accommodate recent upstream changes
* `0.1.4`: Fix imports of `bootstrap.auth` modules for v3.0 compatibility
* `0.1.3`: Adjust code imports for recent LocalStack v3.0 module changes
* `0.1.2`: Remove deprecated ProxyListener for starting local aws-replicator proxy server
Expand Down
11 changes: 10 additions & 1 deletion aws-replicator/aws_replicator/client/auth_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,18 @@ def _parse_aws_request(
}
parsed_request = {} if parsed_request is None else parsed_request
parsed_request = {k: v for k, v in parsed_request.items() if v is not None}
endpoint_url, additional_headers = client._resolve_endpoint_ruleset(

# get endpoint info
endpoint_info = client._resolve_endpoint_ruleset(
operation_model, parsed_request, request_context
)
# switch for https://github.com/boto/botocore/commit/826b78c54dd87b9da368e9ab6017d8c4823b28c1
if len(endpoint_info) == 3:
endpoint_url, additional_headers, properties = endpoint_info
if properties:
request_context["endpoint_properties"] = properties
else:
endpoint_url, additional_headers = endpoint_info

# create request dict
request_dict = client._convert_to_request_dict(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
from localstack.http import Response
from localstack.utils.aws import arns
from localstack.utils.aws.arns import sqs_queue_arn
from localstack.utils.aws.aws_stack import get_valid_regions, mock_aws_request_headers
from localstack.utils.aws.aws_stack import get_valid_regions
from localstack.utils.aws.request_context import mock_aws_request_headers
from localstack.utils.collections import ensure_list
from localstack.utils.net import get_addressable_container_host
from localstack.utils.strings import to_str, truncate
Expand Down
2 changes: 1 addition & 1 deletion aws-replicator/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = localstack-extension-aws-replicator
version = 0.1.4
version = 0.1.5
summary = LocalStack Extension: AWS replicator
description = Replicate AWS resources into your LocalStack instance
long_description = file: README.md
Expand Down

0 comments on commit f707ed7

Please sign in to comment.