Feature request: Support raise_on_entire_batch_failure in SqsFifoPartialProcessor

Ouverte
#7,596 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@rohan-patnaik y travaille déjà.

Depuis le 22/5/2026.

  • #8243 par @rohan-patnaik — ouverte

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
aws, python
Domaine
api, backend

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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
Langage dominant
Python
Étoiles
3.3k
Forks
511
Merge moyen
3 j 8 h
PR mergées (30 j)
92

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de aws-powertools/powertools-lambda-python

Toutes les issues de aws-powertools/powertools-lambda-python

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.