Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*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.

<!-- PYTHON_LANGUAGE_SDK_BRANCH: branch-name -->

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:

on:
push:

branches: [ main ]
Copy link
Member Author

Choose a reason for hiding this comment

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

This fixes the duplicate workflows we'd see in PRs for both pull_request and push.

Copy link
Member

Choose a reason for hiding this comment

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

it does... but you lose CI build on branches. e.g if you're working on FeatureA and you push intermediate work (without PRing it), you don't get a CI build anymore.

Not necessarily the end of the world, though.

Copy link
Member Author

Choose a reason for hiding this comment

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

We could add a wildcard branch for this like ci-feat-* if you need to run CI before creating a PR.

pull_request:
branches: [ main ]

Expand All @@ -32,6 +32,16 @@ jobs:
- uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.SDK_KEY }}
- name: Check for Python Language SDK branch override in PR
if: github.event_name == 'pull_request'
run: |
OVERRIDE=$(echo "${{ github.event.pull_request.body }}" | grep -o 'PYTHON_LANGUAGE_SDK_BRANCH: [^[:space:]]*' | cut -d' ' -f2 || true)
if [ ! -z "$OVERRIDE" ]; then
echo "AWS_DURABLE_SDK_URL=git+ssh://git@github.com/aws/aws-durable-execution-sdk-python.git@$OVERRIDE" >> $GITHUB_ENV
echo "Using Python Language SDK branch override: $OVERRIDE"
else
echo "Using default Python Language SDK (main branch)"
fi
- name: static analysis
run: hatch fmt --check
- name: type checking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def _create_wait_details(
else:
scheduled_timestamp = datetime.datetime.now(
tz=datetime.UTC
) + timedelta(seconds=update.wait_options.seconds)
) + timedelta(seconds=update.wait_options.wait_seconds)
return WaitDetails(scheduled_timestamp=scheduled_timestamp)
return None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def process(
"""Process WAIT operation update with scheduler integration for timers."""
match update.action:
case OperationAction.START:
wait_seconds = update.wait_options.seconds if update.wait_options else 0
wait_seconds = (
update.wait_options.wait_seconds if update.wait_options else 0
)
scheduled_timestamp = datetime.now(UTC) + timedelta(
seconds=wait_seconds
)
Expand Down
4 changes: 2 additions & 2 deletions tests/checkpoint/processors/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def test_create_wait_details_with_current_operation():
current_op = Mock()
current_op.wait_details = WaitDetails(scheduled_timestamp=scheduled_time)

wait_options = WaitOptions(seconds=30)
wait_options = WaitOptions(wait_seconds=30)
update = OperationUpdate(
operation_id="test-id",
operation_type=OperationType.WAIT,
Expand All @@ -339,7 +339,7 @@ def test_create_wait_details_with_current_operation():

def test_create_wait_details_without_current_operation():
processor = MockProcessor()
wait_options = WaitOptions(seconds=30)
wait_options = WaitOptions(wait_seconds=30)
update = OperationUpdate(
operation_id="test-id",
operation_type=OperationType.WAIT,
Expand Down
12 changes: 6 additions & 6 deletions tests/checkpoint/processors/wait_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_process_start_action():
notifier = MockNotifier()
execution_arn = "arn:aws:states:us-east-1:123456789012:execution:test"

wait_options = WaitOptions(seconds=30)
wait_options = WaitOptions(wait_seconds=30)
update = OperationUpdate(
operation_id="wait-123",
operation_type=OperationType.WAIT,
Expand Down Expand Up @@ -99,7 +99,7 @@ def test_process_start_action_with_zero_seconds():
notifier = MockNotifier()
execution_arn = "arn:aws:states:us-east-1:123456789012:execution:test"

wait_options = WaitOptions(seconds=0)
wait_options = WaitOptions(wait_seconds=0)
update = OperationUpdate(
operation_id="wait-123",
operation_type=OperationType.WAIT,
Expand All @@ -122,7 +122,7 @@ def test_process_start_action_with_parent_id():
notifier = MockNotifier()
execution_arn = "arn:aws:states:us-east-1:123456789012:execution:test"

wait_options = WaitOptions(seconds=15)
wait_options = WaitOptions(wait_seconds=15)
update = OperationUpdate(
operation_id="wait-123",
operation_type=OperationType.WAIT,
Expand All @@ -142,7 +142,7 @@ def test_process_start_action_with_sub_type():
notifier = MockNotifier()
execution_arn = "arn:aws:states:us-east-1:123456789012:execution:test"

wait_options = WaitOptions(seconds=15)
wait_options = WaitOptions(wait_seconds=15)
update = OperationUpdate(
operation_id="wait-123",
operation_type=OperationType.WAIT,
Expand Down Expand Up @@ -257,7 +257,7 @@ def test_wait_details_created_correctly():
notifier = MockNotifier()
execution_arn = "arn:aws:states:us-east-1:123456789012:execution:test"

wait_options = WaitOptions(seconds=60)
wait_options = WaitOptions(wait_seconds=60)
update = OperationUpdate(
operation_id="wait-123",
operation_type=OperationType.WAIT,
Expand All @@ -277,7 +277,7 @@ def test_no_completed_or_failed_calls():
notifier = MockNotifier()
execution_arn = "arn:aws:states:us-east-1:123456789012:execution:test"

wait_options = WaitOptions(seconds=30)
wait_options = WaitOptions(wait_seconds=30)
update = OperationUpdate(
operation_id="wait-123",
operation_type=OperationType.WAIT,
Expand Down