Feature request: Support raise_on_entire_batch_failure in SqsFifoPartialProcessor

オープン
#7,596 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@rohan-patnaik がすでに取り組んでいます。

2026年5月22日 から。

  • #8243 @rohan-patnaik による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
aws, python
領域
api, backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Python
スター
3.3k
フォーク
511
平均マージ
3日 4時間
マージ済み PR(30日)
98

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws-powertools/powertools-lambda-python のほかの issue

aws-powertools/powertools-lambda-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。