Feature request: Support raise_on_entire_batch_failure in SqsFifoPartialProcessor

Đang mở
#7,596 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@rohan-patnaik đang làm issue này rồi.

Từ ngày 22/5/2026.

  • #8243 của @rohan-patnaik — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
aws, python
Lĩnh vực
api, backend

Hướng nghiên cứu

Read SqsFifoPartialProcessor and compare its constructor with BatchProcessor and BasePartialBatchProcessor to trace how raise_on_entire_batch_failure is passed. The existing processor tests are the starting point for verifying Standard and FIFO behavior. Done means FIFO processing honors the option consistently, while the existing default behavior remains covered.

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

Mô tả

batch feature-request
Use case

BatchProcessor supports a raise_on_entire_batch_failure option (through its parent class, BasePartialBatchProcessor). SqsFifoPartialProcessor extends from BatchProcessor, but doesn't allow the raise_on_entire_batch_failure option to be set, so the default value of True is always used.

For the same reason that raise_on_entire_batch_failure is a useful option on BatchProcessor (as explained in the docs), that option would be equally useful on SqsFifoPartialProcessor. We want to configure both Standard and FIFO queues to behave the same (not raise BatchProcessingError when all records in the batch fail to process), but right now aws-lambda-powertools only supports that option for Standard queues.

Solution/User Experience

A simple solution would be to add raise_on_entire_batch_failure to the constructor of SqsFifoPartialProcessor and pass it when the superclass constructor is invoked:

class SqsFifoPartialProcessor(BatchProcessor):

    def __init__(self, model: BatchSqsTypeModel | None = None, skip_group_on_error: bool = False, raise_on_entire_batch_failure: bool = True):
        """
        Initialize the SqsFifoProcessor.

        Parameters
        ----------
        model: BatchSqsTypeModel | None
            An optional model for batch processing.
        skip_group_on_error: bool
            Determines whether to exclusively skip messages from the MessageGroupID that encountered processing failures
            Default is False.
        raise_on_entire_batch_failure: bool
            Raise an exception when the entire batch has failed processing.
            When set to False, partial failures are reported in the response

        """
        self._skip_group_on_error: bool = skip_group_on_error
        self._current_group_id = None
        self._failed_group_ids: set[str] = set()
        super().__init__(EventType.SQS, model, raise_on_entire_batch_failure)
Alternative solutions

Acknowledgment
Ngôn ngữ chính
Python
Star
3.3k
Fork
511
Merge trung bình
3 ngày 12 giờ
Pull request đã merge (30 ngày)
93

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws-powertools/powertools-lambda-python

Tất cả issue của aws-powertools/powertools-lambda-python

Issue tương tự

Thêm issue về Python

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.