aws / aws/aws-durable-execution-sdk-python

Reevaluate CompletionConfig Presets

Đang mở
#38 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
53
Fork
25
Merge trung bình
1 ngày 19 giờ
Pull request đã merge (30 ngày)
40

Mô tả

## Context
**GitHub Reference**: [config.py#L47](https://github.com/aws/aws-durable-execution-sdk-python/blob/0307cf96e22a0bdbfdb7539f2780cde19f44a55d/src/aws_durable_execution_sdk_python/config.py#L47)

Review and update `CompletionConfig` presets for `first_successful`, `all_completed`, and `all_successful` to ensure they match expected behavior and service capabilities.

This is currently not implemented in TypeScript.

## Technical Requirements
- Review current preset implementations
- Validate against service behavior
- Update presets if needed
- Ensure consistency with TypeScript SDK

## Implementation Details
- **File**: `src/aws_durable_execution_sdk_python/config.py`
- **Line**: Around line 47
- **Presets to Review**:
- `first_successful`: Complete when first operation succeeds
- `all_completed`: Complete when all operations finish (success or failure)
- `all_successful`: Complete when all operations succeed

```python
@dataclass(frozen=True)
class CompletionConfig:
@classmethod
def first_successful(cls) -> CompletionConfig:
"""Complete when first operation succeeds."""
return cls(
completion_type="FIRST_SUCCESSFUL",
min_successful=1,
fail_on_first_error=False
)

@classmethod
def all_completed(cls) -> CompletionConfig:
"""Complete when all operations finish."""
return cls(
completion_type="ALL_COMPLETED",
min_successful=None,
fail_on_first_error=False
)
```

## Acceptance Criteria
- [ ] All presets match expected behavior
- [ ] Presets are consistent with service capabilities
- [ ] Documentation clearly explains each preset
- [ ] Tests validate preset behavior
- [ ] Alignment with TypeScript SDK confirmed

**Priority**: LOW
**Estimated Effort**: 0.5 days

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu trong src/aws_durable_execution_sdk_python/config.py, khoảng dòng 47, và xem xét các preset first_successful, all_completed và all_successful. So sánh hành vi được ghi lại của chúng với các khả năng của service và TypeScript SDK, sau đó thêm hoặc cập nhật tài liệu và các bài kiểm thử để xác thực hành vi của từng preset và đáp ứng các tiêu chí nghiệm thu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python, typescript
Lĩnh vực
backend-api-design
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.