Skip to content

Commit 22fe182

Browse files
committed
Remove unnecessary requirements.txt
Dependencies are handled by the build script copying from hatch environment
1 parent 08446aa commit 22fe182

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

examples/src/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/aws_durable_execution_sdk_python_testing/executor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,11 @@ async def invoke() -> None:
648648
self._invoker.create_invocation_input(execution=execution)
649649
)
650650

651+
logger.info("[%s] Invoking Lambda function: %s", execution_arn, execution.start_input.function_name)
651652
response: DurableExecutionInvocationOutput = self._invoker.invoke(
652653
execution.start_input.function_name, invocation_input
653654
)
655+
logger.info("[%s] Lambda invocation completed with status: %s", execution_arn, response.status)
654656

655657
# Reload execution after invocation in case it was completed via checkpoint
656658
execution = self._store.load(execution_arn)

src/aws_durable_execution_sdk_python_testing/invoker.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ def create(endpoint_url: str, region_name: str) -> LambdaInvoker:
112112
"""Create with the boto lambda client."""
113113
return LambdaInvoker(
114114
boto3.client(
115-
"lambdainternal", endpoint_url=endpoint_url, region_name=region_name
115+
"lambdainternal",
116+
endpoint_url=endpoint_url,
117+
region_name=region_name,
118+
aws_access_key_id="test",
119+
aws_secret_access_key="test"
116120
)
117121
)
118122

src/aws_durable_execution_sdk_python_testing/scheduler.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,23 @@ async def delayed_func() -> Any:
197197

198198
def create_event(self) -> Event:
199199
"""Create an event controlled by the Scheduler to signal between threads and coroutines."""
200+
logger.info("Creating event - submitting to scheduler event loop")
200201
# create event inside the Scheduler event-loop
201202
future: Future[asyncio.Event] = asyncio.run_coroutine_threadsafe(
202203
self._create_event(), self._loop
203204
)
205+
logger.info("Event creation future submitted, waiting for result...")
204206

205207
# Add timeout to prevent surprising "hangs" if for whatever reason event fails to create.
206208
# result with block. Do NOT call anything in _create_event that calls back into scheduler
207209
# methods because it could create a circular depdendency which will deadlock.
208-
event = future.result(timeout=5.0)
209-
return Event(self, event)
210+
try:
211+
event = future.result(timeout=5.0)
212+
logger.info("Event created successfully")
213+
return Event(self, event)
214+
except TimeoutError:
215+
logger.error("Timeout waiting for event creation - scheduler event loop may be blocked")
216+
raise
210217

211218
def wait_for_event(
212219
self, event: asyncio.Event, timeout: float | None = None

src/aws_durable_execution_sdk_python_testing/web/handlers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,18 @@ def handle(self, parsed_route: Route, request: HTTPRequest) -> HTTPResponse: #
249249
"""
250250
try:
251251
body_data: dict[str, Any] = self._parse_json_body(request)
252+
logger.info(f"Parsed request body: {body_data}")
252253

253254
start_input: StartDurableExecutionInput = (
254255
StartDurableExecutionInput.from_dict(body_data)
255256
)
257+
logger.info(f"Created start_input: {start_input}")
256258

259+
logger.info("Calling executor.start_execution...")
257260
start_output: StartDurableExecutionOutput = self.executor.start_execution(
258261
start_input
259262
)
263+
logger.info(f"Successfully started execution: {start_output}")
260264

261265
response_data: dict[str, Any] = start_output.to_dict()
262266

0 commit comments

Comments
 (0)