Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49b5a01

Browse files
committed
fix recent config change
1 parent43452a3 commit49b5a01

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

‎aws-replicator/aws_replicator/client/auth_proxy.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def register_in_instance(self):
145145
ifnotport:
146146
raiseException("Proxy currently not running")
147147
url=f"{external_service_url()}{HANDLER_PATH_PROXIES}"
148-
data=AddProxyRequest(port=port,config=self.config)
148+
data=AddProxyRequest(port=port,config=self.config,env_vars={})
149149
LOG.debug("Registering new proxy in main container via: %s",url)
150150
try:
151151
response=requests.post(url,json=data)

‎aws-replicator/aws_replicator/server/aws_request_forwarder.py‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
importrequests
77
fromlocalstack.aws.apiimportRequestContext
88
fromlocalstack.aws.chainimportHandler,HandlerChain
9-
fromlocalstack.constantsimport (
10-
APPLICATION_JSON,
11-
LOCALHOST,
12-
LOCALHOST_HOSTNAME,
13-
TEST_AWS_ACCESS_KEY_ID,
14-
)
9+
fromlocalstack.constantsimportAPPLICATION_JSON,LOCALHOST,LOCALHOST_HOSTNAME
1510
fromlocalstack.httpimportResponse
11+
12+
try:
13+
fromlocalstack.constantsimportTEST_AWS_ACCOUNT_ID
14+
exceptImportError:
15+
# compatibility with localstack 3.5
16+
fromlocalstack.testing.configimportTEST_AWS_ACCOUNT_ID
1617
fromlocalstack.utils.awsimportarns
1718
fromlocalstack.utils.aws.arnsimportsqs_queue_arn
1819
fromlocalstack.utils.aws.aws_stackimportget_valid_regions
@@ -192,6 +193,7 @@ def _extract_region_from_domain(self, context: RequestContext):
192193
context.request.headers["Authorization"]=mock_aws_request_headers(
193194
context.service.service_name,
194195
region_name=part,
196+
# FIXME: TEST_AWS_ACCESS_KEY_ID should only be used in testing
195197
aws_access_key_id=TEST_AWS_ACCESS_KEY_ID,
196198
)
197199
return

‎aws-replicator/tests/test_proxy_requests.py‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
importpytest
77
frombotocore.exceptionsimportClientError
88
fromlocalstack.aws.connectimportconnect_to
9-
fromlocalstack.constantsimportTEST_AWS_ACCOUNT_ID
9+
10+
try:
11+
fromlocalstack.constantsimportTEST_AWS_ACCOUNT_ID
12+
exceptImportError:
13+
# compatibility with localstack 3.5
14+
fromlocalstack.testing.configimportTEST_AWS_ACCOUNT_ID
15+
1016
fromlocalstack.utils.aws.arnsimportsqs_queue_arn,sqs_queue_url_for_arn
1117
fromlocalstack.utils.syncimportretry
1218

@@ -23,7 +29,8 @@ def start_aws_proxy():
2329

2430
def_start(config:dict=None):
2531
proxy=start_aws_auth_proxy(config)
26-
proxy.wait_is_up()
32+
ifnotproxy.wait_is_up(timeout=10):
33+
raiseTimeoutError(f"Gave up waiting for proxy to start on{proxy.url}")
2734
proxies.append(proxy)
2835
returnproxy
2936

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp