Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
bshea5 opened this issue Jan 13, 2025 · 2 comments · Fixed by #45630
Closed
2 tasks done
Labels
area:providers kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet provider:pagerduty

Comments

@bshea5
Copy link
Contributor

bshea5 commented Jan 13, 2025

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

@bshea5 bshea5 added area:providers kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Jan 13, 2025
Copy link

boring-cyborg bot commented Jan 13, 2025

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@bshea5
Copy link
Contributor Author

bshea5 commented Jan 14, 2025

Submitted a PR, #45630

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet provider:pagerduty
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant