Skip to content

Conversation

@yaythomas
Copy link
Member

Initial Version of Test Framework

Initial test framework to run AWS Durable Functions locally in a unit test environment. Includes validation for:

  • step
  • wait
  • run_in_child_context
  • create_callback
  • wait_for_callback
  • wait_for_condition
  • parallel
  • map

Repo rename from aws_durable_functions_sdk_python

Renamed the external module references from aws_durable_functions_sdk_python
to aws_durable_execution_sdk_python and updated the testing module name from
aws_durable_functions_sdk_python_testing to aws_durable_execution_sdk_python_testing
throughout the entire codebase.

  1. Updated all import statements across 52 files including:
    • All Python source files in src/aws_durable_execution_sdk_python_testing/
    • All test files in tests/
    • Documentation files (README.md, CONTRIBUTING.md)

Lambda Service Update

Update Lambda Service API to include new durable_execution_arn arg.

  1. Fixed API compatibility issues that arose from the service api change:
    • Updated InMemoryServiceClient.checkpoint() method to include the new
      durable_execution_arn parameter
    • Updated InMemoryServiceClient.get_execution_state() method to include
      the new durable_execution_arn parameter
    • Updated corresponding test cases to use the new method signatures
    • Added appropriate # noqa: ARG002 comments for unused parameters in
      the in-memory implementation

Testing

  1. Maintained code quality standards:
    • All 406 tests pass ✅
    • Type checking passes ✅
    • Code formatting passes ✅
    • Test coverage remains above 99% (99.15%) ✅

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Initial test framework to run AWS Durable Functions locally in a
unit test environment. Includes validation for:
- step
- wait
- run_in_child_context
- create_callback
- wait_for_callback
- wait_for_condition
- parallel
- map
Renamed the external module references from aws_durable_functions_sdk_python
to aws_durable_execution_sdk_python and updated the testing module name from
aws_durable_functions_sdk_python_testing to aws_durable_execution_sdk_python_testing
throughout the entire codebase.

Also update Lambda Service API to include new durable_execution_arn arg.

1. Updated all import statements across 52 files including:
   - All Python source files in src/aws_durable_execution_sdk_python_testing/
   - All test files in tests/
   - Documentation files (README.md, CONTRIBUTING.md)

2. Fixed API compatibility issues that arose from the module rename:
   - Updated InMemoryServiceClient.checkpoint() method to include the new
     durable_execution_arn parameter
   - Updated InMemoryServiceClient.get_execution_state() method to include
     the new durable_execution_arn parameter
   - Updated corresponding test cases to use the new method signatures
   - Added appropriate # noqa: ARG002 comments for unused parameters in
     the in-memory implementation

3. Maintained code quality standards:
   - All 406 tests pass ✅
   - Type checking passes ✅
   - Code formatting passes ✅
   - Test coverage remains above 99% (99.15%) ✅
]
dependencies = [
"boto3>=1.40.30",
"aws_durable_execution_sdk_python @ git+ssh://git@github.com/aws/aws-durable-execution-sdk-python.git"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're working on a PR that requires changes across both here and the python SDK -- will we just pin a specific branch here for the installation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that should work in theory, we should probably leave a comment on the format of how to pin the branch

Copy link
Member Author

@yaythomas yaythomas Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The broad idea is: create an optional install in pyproject.toml like so:

[tool.hatch.envs.staging]
dependencies = [
  "aws_durable_execution_python_sdk @ git+https://github.com/aws/aws-durable_execution-python-sdk.git@staging",
]

Note it's installing from staging branch, and installs like:

- name: Run prerelease tests
  run: hatch run staging:test

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it - thanks! Can we please document this in both repos so that the process is clear?

@yaythomas yaythomas merged commit 22f23e6 into main Sep 24, 2025
4 checks passed
@yaythomas yaythomas deleted the initial-version branch September 24, 2025 15:06
@@ -1,17 +1,179 @@
## My Project
# aws-durable-functions-sdk-python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: rename

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repeats

]
dependencies = [
"boto3>=1.40.30",
"aws_durable_execution_sdk_python @ git+ssh://git@github.com/aws/aws-durable-execution-sdk-python.git"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that should work in theory, we should probably leave a comment on the format of how to pin the branch

@@ -0,0 +1,6 @@
"""Tests for DurableExecutionsPythonTestingLibrary module."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: rename

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants