Skip to content

Conversation

@wangyb-A
Copy link
Contributor

  • Add comprehensive event assertion framework with three categories (STRICT_EQUAL, KEY_EQUAL, IGNORE)
  • Create CLI event generator tool for capturing execution events as JSON
  • Update CONTRIBUTING.md
  • Add events for hello_world example

Issue #, if available:

Description of changes:

Dependencies

If this PR requires testing against a specific branch of the Python Language SDK (e.g., for unreleased changes), uncomment and specify the branch below. Otherwise, leave commented to use the main branch.

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

@bchampp
Copy link
Member

bchampp commented Dec 11, 2025

🤖 Emulator PR Created

A draft PR has been created with locked dependencies:

➡️ https://github.com/aws/aws-durable-execution-emulator/pull/93

The emulator will build binaries using the exact testing SDK commit locked in uv.lock.

@bchampp
Copy link
Member

bchampp commented Dec 11, 2025

🔄 Emulator PR Updated

The emulator PR has been updated with locked dependencies:

➡️ https://github.com/aws/aws-durable-execution-emulator/pull/93

@bchampp
Copy link
Member

bchampp commented Dec 11, 2025

🔄 Emulator PR Updated

The emulator PR has been updated with locked dependencies:

➡️ https://github.com/aws/aws-durable-execution-emulator/pull/93

@bchampp
Copy link
Member

bchampp commented Dec 11, 2025

🔄 Emulator PR Updated

The emulator PR has been updated with locked dependencies:

➡️ https://github.com/aws/aws-durable-execution-emulator/pull/93

@bchampp
Copy link
Member

bchampp commented Dec 12, 2025

🔄 Emulator PR Updated

The emulator PR has been updated with locked dependencies:

➡️ https://github.com/aws/aws-durable-execution-emulator/pull/93

@bchampp
Copy link
Member

bchampp commented Dec 12, 2025

🔄 Emulator PR Updated

The emulator PR has been updated with locked dependencies:

➡️ https://github.com/aws/aws-durable-execution-emulator/pull/93

…ting

- Add comprehensive event assertion framework with three categories (STRICT_EQUAL, KEY_EQUAL, IGNORE)
- Create CLI event generator tool for capturing execution events as JSON
- Update CONTRIBUTING.md
- Add events for hello_world example
@bchampp
Copy link
Member

bchampp commented Dec 12, 2025

🔄 Emulator PR Updated

The emulator PR has been updated with locked dependencies:

➡️ https://github.com/aws/aws-durable-execution-emulator/pull/93

@wangyb-A wangyb-A marked this pull request as ready for review December 12, 2025 01:06
--output examples/events/hello_world_events.json
"""

import argparse
Copy link
Member

Choose a reason for hiding this comment

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

you could build this into [project.scripts] dex-local-runner = "aws_durable_execution_sdk_python_testing.cli:main"?

i.e so you can do something like

localrunner invoke --function-name whatever
localrunner get-durable-execution-history --durable-execution-arn whatever-arn

Copy link
Member

Choose a reason for hiding this comment

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

possibly

localrunner get-durable-execution-history --durable-execution-arn whatever-arn --output myfile.json

return FieldCategory.IGNORE


def assert_field_by_category(
Copy link
Member

Choose a reason for hiding this comment

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

rather than have this "helper", wouldn't these belong more naturally on the DurableFunctionTestResult?

so you can do something like:

  with durable_runner:
        result = durable_runner.run(input="test", timeout=30)
   
  assert result.status is InvocationStatus.SUCCEEDED
  result.assert_events(expected_events)

@@ -0,0 +1,236 @@
#!/usr/bin/env python3
"""CLI tool for generating event assertion files from durable function executions.
Copy link
Member

Choose a reason for hiding this comment

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

might be nice loading events either via code or via file like so:

Events.load("<<string>>")
Events.load_from_file(path="")

events = new Events()
event = Event.create_execution_started()
events.add(event_one)

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