You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/home/ubuntu/dev/python/merq/util/opsgenie.py", line 37, in create_alert
create_response = get_alert_api().create_alert(create_alert_payload=body)
File "/home/ubuntu/dev/python/venv_3.7/lib/python3.7/site-packages/opsgenie_sdk/api/alert/__init__.py", line 1136, in create_alert
(data) = self.create_alert_with_http_info(create_alert_payload, **kwargs) # noqa: E501
File "/home/ubuntu/dev/python/venv_3.7/lib/python3.7/site-packages/opsgenie_sdk/api/alert/__init__.py", line 1211, in create_alert_with_http_info
collection_formats=collection_formats)
File "/home/ubuntu/dev/python/venv_3.7/lib/python3.7/site-packages/opsgenie_sdk/api_client.py", line 429, in call_api
_preload_content, _request_timeout, _host)
File "/home/ubuntu/dev/python/venv_3.7/lib/python3.7/site-packages/opsgenie_sdk/api_client.py", line 219, in __call_api
raise exception
File "/home/ubuntu/dev/python/venv_3.7/lib/python3.7/site-packages/opsgenie_sdk/api_client.py", line 203, in __call_api
_request_timeout=_request_timeout)
File "/home/ubuntu/dev/python/venv_3.7/lib/python3.7/site-packages/tenacity/__init__.py", line 330, in call
start_time=start_time)
File "/home/ubuntu/dev/python/venv_3.7/lib/python3.7/site-packages/tenacity/__init__.py", line 292, in iter
delay_since_first_attempt):
TypeError: should_retry_stop() takes 2 positional arguments but 3 were given
Command exited with non-zero status 1
1.62user 0.51system 5:52.42elapsed 0%CPU (0avgtext+0avgdata 106140maxresident)k
0inputs+8424outputs (0major+29116minor)pagefaults 0swaps
we hit this stacktrace today:
I tried to dig into the code the best I can. I traced it to probably: https://github.com/opsgenie/opsgenie-python-sdk/pull/29/files
The old function there was
This stop function is provided by
tenacity
and is an instance of their abstract base class: https://github.com/jd/tenacity/blob/master/tenacity/stop.py#L24This Opsgenie PR above replaces it with
however
self
here refers to the OpsGenie API object; it is probably not an instance of the tenacity base class: https://github.com/jd/tenacity/blob/master/tenacity/stop.py#L78it seems like their base class requires
__call__
and thats it?I tried digging into what parameters are exactly passed to the
stop
function; I think its around here: https://github.com/jd/tenacity/blob/master/tenacity/__init__.py#L373however I got lost in the rabbithole
my only guess is if
self_retry_stop
was not a class method but just a method, it might work?The text was updated successfully, but these errors were encountered: