Feature request: Support raise_on_entire_batch_failure in SqsFifoPartialProcessor
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 35/100
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
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
- This feature request meets Powertools for AWS Lambda (Python) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET
- Langage dominant
- Python
- Étoiles
- 3.3k
- Forks
- 511
- Merge moyen
- 3 j 8 h
- PR mergées (30 j)
- 92
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de aws-powertools/powertools-lambda-python
-
Bug: POWERTOOLS_IDEMPOTENCY_DISABLED set to an empty or non-boolean value crashes every invocationPeut-être pris @lechakrawarthy l’a pris il y a 1 jour. Ouvertebug good first issue help wanted idempotency
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
aws-powertools/powertools-lambda-python#8728 · 4 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Bug: Redis layer fails the invocation instead of retrying when a record expires between SET NX and GETPeut-être pris @coughlmao l’a pris il y a 1 jour. Ouvertebug good first issue help wanted idempotency
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
aws-powertools/powertools-lambda-python#8727 · 4 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Bug: Redis orphan lock timeout ignores expires_after_seconds and is always 10 secondsPeut-être pris @CJstate l’a pris il y a 1 jour. Ouvertebug good first issue help wanted idempotency
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
aws-powertools/powertools-lambda-python#8726 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Bug: idempotency payloads with set, frozenset or bytes fields cannot be hashedPeut-être pris @Neeraj111010 l’a pris il y a 1 jour. Ouvertebug good first issue help wanted idempotency
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
aws-powertools/powertools-lambda-python#8725 · 4 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Bug: with a DynamoDB composite key, DataRecord.idempotency_key is the static partition key valuePeut-être pris @sumedh-aerram l’a pris il y a 1 jour. Ouvertebug good first issue help wanted idempotency
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
aws-powertools/powertools-lambda-python#8724 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de aws-powertools/powertools-lambda-python
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Nixtla/mlforecast#823 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
microsoft/ML-For-Beginners#1061 ·
-
bot-found documentation priority: P3
Difficulté 2/5 Moins d'une heure Accessibilité débutants 82/100
madenvel/KalinkaPlayer#503 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 63/100
EleutherAI/lm-evaluation-harness#4508 ·
Les mainteneurs répondent en général sous 1 jour