simonprydden commented on PR #48436: URL: https://github.com/apache/airflow/pull/48436#issuecomment-2757799756
@eladkal I think the new library is missing return on the function, see below https://github.com/PagerDuty/pdpyras/blob/bb0790beb2831129c6ae018470a5e66a7e487611/pdpyras.py#L1475 ``` def send_change_event(self, **properties): """ Send a change event to the v2 Change Events API. See: https://developer.pagerduty.com/docs/events-api-v2/send-change-events/ :param **properties: Properties to set, i.e. ``payload`` and ``links`` :returns: The response ID """ event = deepcopy(properties) response = self.post('/v2/change/enqueue', json=event) response_body = try_decoding(successful_response( response, context="submitting change event", )) return response_body.get("id", None) ``` https://github.com/PagerDuty/python-pagerduty/blob/2864c72042fcff746c7377de91fcf76d3d63815e/pagerduty.py#L1407C1-L1437C11 ``` def send_change_event(self, payload={}, links=[], routing_key=None): """ Send a change event to the v2 Change Events API. See: https://developer.pagerduty.com/docs/events-api-v2/send-change-events/ :param payload: A dictionary object with keys ``summary``, ``source``, ``timestamp`` and ``custom_details`` as described in the above documentation. :param links: A list of dictionary objects each with keys ``href`` and ``text`` representing the target and display text of each link :param routing_key: (Deprecated) the routing key. The parameter is set automatically to the :attr:`ApiClient.api_key` property in the final payload and this argument is ignored. :returns: The response ID """ if routing_key is not None: deprecated_kwarg( 'routing_key', method='EventsApiV2Client.send_change_event' ) event = {'payload': deepcopy(payload)} if links: event['links'] = deepcopy(links) response = self.post('/v2/change/enqueue', json=event) response_body = try_decoding(successful_response( response, context="submitting change event", )) ``` going to open a ticket as the docstring of the function say there should be response id -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
