Skip to content

Commit b49b1ac

Browse files
authored
Merge branch 'main' into feat/withRetry
2 parents 5ab9652 + e385006 commit b49b1ac

56 files changed

Lines changed: 4591 additions & 440 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
title: "[Major Release]: "
2+
labels: ["major-release", "breaking-change"]
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
Use this template to propose a major version release. Major releases include breaking changes
8+
that require careful planning, communication, and migration support.
9+
10+
- type: input
11+
id: proposed-version
12+
attributes:
13+
label: Proposed Version Number
14+
description: The target major version number for this release
15+
placeholder: "e.g., 2.0.0"
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: breaking-changes
21+
attributes:
22+
label: Description of the Breaking Changes
23+
description: List all breaking changes included in this release with clear before/after examples
24+
placeholder: |
25+
1. **Change**: Description of the breaking change
26+
- Before: `old_api()`
27+
- After: `new_api()`
28+
29+
2. **Change**: Description of the breaking change
30+
- Before: ...
31+
- After: ...
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: justification
37+
attributes:
38+
label: Justification for the Changes
39+
description: Explain why these breaking changes are necessary and what problems they solve
40+
placeholder: |
41+
- Why can't this be done in a backward-compatible way?
42+
- What user pain points or technical debt does this address?
43+
- What benefits do users gain from upgrading?
44+
validations:
45+
required: true
46+
47+
- type: textarea
48+
id: consuming-code-changes
49+
attributes:
50+
label: Changes Needed in Consuming Code
51+
description: Describe what consumers of this SDK need to change in their code to adopt the new version
52+
placeholder: |
53+
- Step-by-step migration instructions
54+
- Code examples showing required changes
55+
- Any tooling or codemods available to assist migration
56+
validations:
57+
required: true
58+
59+
- type: textarea
60+
id: inflight-impact
61+
attributes:
62+
label: Impact to In-flight Executions
63+
description: Describe how this release affects durable executions that are currently in progress
64+
placeholder: |
65+
- Can in-flight executions continue running after upgrade?
66+
- Is there a required draining period?
67+
- Are checkpointed states compatible across versions?
68+
- What happens to executions that are suspended (waiting)?
69+
validations:
70+
required: true
71+
72+
- type: textarea
73+
id: alternatives
74+
attributes:
75+
label: Alternatives Explored
76+
description: Describe alternative approaches that were considered and why they were not chosen
77+
placeholder: |
78+
1. **Alternative**: Description
79+
- Pros: ...
80+
- Cons: ...
81+
- Why rejected: ...
82+
validations:
83+
required: true
84+
85+
- type: textarea
86+
id: deprecation-changes
87+
attributes:
88+
label: Deprecation Changes Required for Previous Versions
89+
description: Describe deprecation notices, warnings, or shims that should be added to the current major version before this release
90+
placeholder: |
91+
- What deprecation warnings should be added to the current release?
92+
- What is the proposed deprecation timeline?
93+
- Are there compatibility shims or adapters to ease migration?
94+
validations:
95+
required: true
96+
97+
- type: textarea
98+
id: additional-context
99+
attributes:
100+
label: Additional Context
101+
description: Any other context, timeline considerations, or references
102+
placeholder: Additional information...
103+
validations:
104+
required: false

.github/hooks/pre-commit

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
if hatch fmt --check; then
4+
echo "Hatch fmt check passed!"
5+
else
6+
hatch fmt
7+
echo "Error: hatch fmt modified your files. Please re-stage and commit again."
8+
exit 1
9+
fi

.github/scripts/lintcommit.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ def lint_range(git_range: str, *, skip_dirty_check: bool = False) -> LintResult:
164164
status = subprocess.run(
165165
["git", "status", "--porcelain"],
166166
capture_output=True,
167-
text=True, check=False,
167+
text=True,
168+
check=False,
168169
)
169170
if status.stdout.strip():
170171
return LintResult(
@@ -178,7 +179,8 @@ def lint_range(git_range: str, *, skip_dirty_check: bool = False) -> LintResult:
178179
result = subprocess.run(
179180
["git", "log", "--no-merges", git_range, "-z", "--format=%H%n%B"],
180181
capture_output=True,
181-
text=True, check=False,
182+
text=True,
183+
check=False,
182184
)
183185
if result.returncode != 0:
184186
return LintResult(git_error=result.stderr.strip())

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ permissions:
77

88
on:
99
push:
10+
branches: [ main ]
1011

1112
pull_request:
1213
branches: [ main ]

.github/workflows/deploy-examples.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,12 @@ jobs:
5858
- name: Install Hatch
5959
run: pip install hatch
6060
- name: Build examples
61-
working-directory: ./packages/aws-durable-execution-sdk-python-examples
6261
run: |
63-
hatch run -- examples:pip install -e ../aws-durable-execution-sdk-python
62+
hatch run -- examples:pip install -e packages/aws-durable-execution-sdk-python packages/aws-durable-execution-sdk-python-otel
6463
hatch run examples:build
6564
6665
- name: Deploy Lambda function - ${{ matrix.example.name }}
6766
id: deploy
68-
working-directory: ./packages/aws-durable-execution-sdk-python-examples
6967
env:
7068
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
7169
LAMBDA_ENDPOINT: "https://lambda.us-west-2.amazonaws.com"

.github/workflows/integration-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ jobs:
9797
rm -rf /tmp/aws/
9898
9999
- name: Deploy and test examples
100-
working-directory: language-sdk/packages/aws-durable-execution-sdk-python-examples
100+
working-directory: language-sdk
101101
env:
102102
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
103103
LAMBDA_ENDPOINT: "https://lambda.us-west-2.amazonaws.com"
104104
INVOKE_ACCOUNT_ID: ${{ secrets.INVOKE_ACCOUNT_ID }}
105105
KMS_KEY_ARN: ${{ secrets.KMS_KEY_ARN }}
106106
run: |
107107
echo "Building examples..."
108-
hatch run -- examples:pip install -e ../testing-sdk
108+
hatch run -- examples:pip install -e packages/testing-sdk
109109
hatch run examples:build
110110
111111
# Get first integration example for testing

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ jobs:
7575
# Upload the results to GitHub's code scanning dashboard (optional).
7676
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7777
- name: "Upload to code-scanning"
78-
uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
78+
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
7979
with:
8080
sarif_file: results.sarif

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ hatch fmt
9292
# Build distribution
9393
hatch build
9494

95-
# Examples deployment (from examples package)
96-
cd ../aws-durable-execution-sdk-python-examples
95+
# Examples deployment (from repo root)
9796
hatch run examples:build
9897
hatch run examples:deploy "Hello World"
9998
```
@@ -309,7 +308,7 @@ tests/mypackage/mymodule_test.py
309308
## Examples and Deployment
310309

311310
The project includes a unified CLI tool for managing examples, deployment, and AWS account setup.
312-
Run these commands from the examples package directory (`packages/aws-durable-execution-sdk-python-examples`).
311+
Run these commands from the **repository root**.
313312

314313
To run examples tests from the repo root:
315314
```bash

packages/aws-durable-execution-sdk-python-examples/cli.py

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import logging
66
import os
77
import shutil
8+
import subprocess
89
import sys
910
import time
1011
import zipfile
@@ -35,6 +36,7 @@ def build_examples():
3536

3637
build_dir = Path(__file__).parent / "build"
3738
src_dir = Path(__file__).parent / "src"
39+
packages_dir = Path(__file__).parent.parent
3840

3941
logger.info("Building examples...")
4042

@@ -57,15 +59,29 @@ def build_examples():
5759
logger.exception("Failed to copy testing library")
5860
return False
5961

60-
# Copy SDK source from the main SDK package
61-
testing_src = (
62-
Path(__file__).parent.parent
63-
/ "aws-durable-execution-sdk-python"
64-
/ "src"
65-
/ "aws_durable_execution_sdk_python"
66-
)
67-
logger.info("Copying SDK from %s", testing_src)
68-
shutil.copytree(testing_src, build_dir / "aws_durable_execution_sdk_python")
62+
# Install local packages so their runtime dependencies are included in
63+
# the Lambda deployment package.
64+
runtime_packages = [
65+
packages_dir / "aws-durable-execution-sdk-python",
66+
packages_dir / "aws-durable-execution-sdk-python-otel",
67+
]
68+
try:
69+
subprocess.run(
70+
[
71+
sys.executable,
72+
"-m",
73+
"pip",
74+
"install",
75+
"--upgrade",
76+
"--target",
77+
str(build_dir),
78+
*[str(package) for package in runtime_packages],
79+
],
80+
check=True,
81+
)
82+
except subprocess.CalledProcessError:
83+
logger.exception("Failed to install runtime dependencies")
84+
return False
6985

7086
# Copy example functions
7187
logger.info("Copying examples from %s", src_dir)

packages/aws-durable-execution-sdk-python-examples/examples-catalog.json

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,15 +604,37 @@
604604
"path": "./src/parallel/parallel_with_named_branches.py"
605605
},
606606
{
607-
"name": "With Retry Callback",
608-
"description": "Demonstrates with_retry wrapping a wait_for_callback operation with exponential backoff",
609-
"handler": "with_retry_callback.handler",
607+
"name": "With Retry Callback",
608+
"description": "Demonstrates with_retry wrapping a wait_for_callback operation with exponential backoff",
609+
"handler": "with_retry_callback.handler",
610+
"integration": true,
611+
"durableConfig": {
612+
"RetentionPeriodInDays": 7,
613+
"ExecutionTimeout": 300
614+
},
615+
"path": "./src/with_retry/with_retry_callback.py"
616+
},
617+
{
618+
"name": "Plugin",
619+
"description": "Test plugin",
620+
"handler": "execution_with_plugin.handler",
621+
"integration": true,
622+
"durableConfig": {
623+
"RetentionPeriodInDays": 7,
624+
"ExecutionTimeout": 300
625+
},
626+
"path": "./src/plugin/execution_with_plugin.py"
627+
},
628+
{
629+
"name": "Otel Plugin",
630+
"description": "Test Otel plugin",
631+
"handler": "execution_with_otel.handler",
610632
"integration": true,
611633
"durableConfig": {
612634
"RetentionPeriodInDays": 7,
613635
"ExecutionTimeout": 300
614636
},
615-
"path": "./src/with_retry/with_retry_callback.py"
637+
"path": "./src/plugin/execution_with_otel.py"
616638
}
617639
]
618640
}

0 commit comments

Comments
 (0)