• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

localstack / localstack / 22709357475

05 Mar 2026 08:35AM UTC coverage: 59.732% (-27.2%) from 86.974%
22709357475

Pull #13880

github

web-flow
Merge 28fcab93c into 710618057
Pull Request #13880: Firehose: Replace TaggingService

12 of 12 new or added lines in 2 files covered. (100.0%)

20464 existing lines in 510 files now uncovered.

45290 of 75822 relevant lines covered (59.73%)

0.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

73.08
/localstack-core/localstack/services/lambda_/event_source_mapping/senders/sender.py
1
from abc import abstractmethod
1✔
2

3
from botocore.client import BaseClient
1✔
4

5
from localstack.services.lambda_.event_source_mapping.pipe_utils import get_internal_client
1✔
6

7

8
class SenderError(Exception):
1✔
9
    def __init__(self, message=None, error=None) -> None:
1✔
UNCOV
10
        self.message = message or "Error during sending events"
×
UNCOV
11
        self.error = error
×
12

13

14
class PartialFailureSenderError(SenderError):
1✔
15
    def __init__(self, message=None, error=None, partial_failure_payload=None) -> None:
1✔
UNCOV
16
        self.message = message or "Target invocation failed partially."
×
UNCOV
17
        self.error = error
×
18
        # Following the partial failure payload structure:
19
        # https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-batching-concurrency.html
UNCOV
20
        self.partial_failure_payload = partial_failure_payload
×
21

22

23
class Sender:
1✔
24
    target_arn: str
1✔
25
    target_parameters: dict
1✔
26
    target_client: BaseClient
1✔
27

28
    def __init__(
1✔
29
        self,
30
        target_arn: str,
31
        target_parameters: dict | None = None,
32
        target_client: BaseClient | None = None,
33
    ) -> None:
34
        self.target_arn = target_arn
1✔
35
        self.target_parameters = target_parameters or {}
1✔
36
        self.target_client = target_client or get_internal_client(target_arn)
1✔
37

38
    # TODO: Can an event also be of type `bytes`?
39
    @abstractmethod
1✔
40
    def send_events(self, events: list[dict | str]) -> dict | None:
1✔
41
        """Send the given `events` to the target.
42
        Returns an optional payload with a list of "batchItemFailures" if only part of the batch succeeds.
43
        """
44
        pass
×
45

46
    @abstractmethod
1✔
47
    def event_target(self) -> str:
1✔
48
        """Return the event target metadata (e.g., aws:sqs)
49
        Format analogous to event_source of pollers"""
50
        pass
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc