Skip to content

PagerDuty PagerdutyNotifier Class Uses a Removed Method and Fails to Send Notifications #45626

@bshea5

Description

@bshea5

Apache Airflow Provider(s)

pagerduty

Versions of Apache Airflow Providers

apache-airflow-providers-pagerduty 4.0

Apache Airflow version

2.10.4

Operating System

Ubuntu

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

What happened

PagerDuty alerts sent via PagerdutyNotifier are not sent. Looking at the source code, it looks like the notify method is using the create_event method which no longer exists.

    def notify(self, context):
        """Send a alert to a pagerduty event v2 API."""
        self.hook.**create_event**(
            summary=self.summary,
            severity=self.severity,
            source=self.source,
            action=self.action,
            dedup_key=self.dedup_key,
            custom_details=self.custom_details,
            group=self.group,
            component=self.component,
            class_type=self.class_type,
            images=self.images,
            links=self.links,
        )

What you think should happen instead

As noted in the most recent change log, https://airflow.apache.org/docs/apache-airflow-providers-pagerduty/stable/changelog.html, switch the create_event method to send_event.

How to reproduce

Trigger an alert with PagerdutyNotifier

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions