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

Deprecated function is removed from external package #56

Open
norbinto opened this issue Jul 8, 2021 · 3 comments
Open

Deprecated function is removed from external package #56

norbinto opened this issue Jul 8, 2021 · 3 comments

Comments

@norbinto
Copy link

norbinto commented Jul 8, 2021

Dear Opsgenie,

We are facing with an issue with the SDK.
We use the version 2.0.3
You use an external package called "tenacity"
In the requirements you declare it as "tenacity>= 5.0.4"
api_client.py, line 197, "response_data = self.retrying.call(...)"
With the latest version of tenacity retry.call function is not only deprecated anymore but even removed. It was realised at 8th of July.
https://github.com/jd/tenacity/blob/master/releasenotes/notes/drop_deprecated-7ea90b212509b082.yaml
And it is breaking right now.

@nikitashrestha
Copy link

Yes! We are also facing similar issue with opsgenie and we cannot afford upgrading version of opsgenie, as it uses another dependency package called urllib, whose upgraded version is not suitable for our system. It would be great if we could get stable and workable version of 2.0.3.

Also, just a advice, it would be great if you defined correct version for each release in requirements. So, each version you release is workable. Otherwise, it's quite difficult to use the sdk

@mikhailadvani
Copy link

mikhailadvani commented Jul 12, 2021

We are using the opsgenie sdk to trigger alerts. Running a heartbeat_api.ping we end up with the following (partial) stacktrace

line 628, in ping (data) = self.ping_with_http_info(name, **kwargs) # noqa: E501 File "/home/site/wwwroot/.python_packages/lib/site-packages/opsgenie_sdk/api/heartbeat/__init__.py", 
line 689, in ping_with_http_info return self.api_client.call_api( File "/home/site/wwwroot/.python_packages/lib/site-packages/opsgenie_sdk/api_client.py", 
line 424, in call_api return self.__call_api(resource_path, method, File "/home/site/wwwroot/.python_packages/lib/site-packages/opsgenie_sdk/api_client.py", 
line 219, in __call_api raise exception File "/home/site/wwwroot/.python_packages/lib/site-packages/opsgenie_sdk/api_client.py", 
line 197, in __call_api response_data = self.retrying.call(fn=self.request, method=method, url=url,

As @norbinto mentioned above we too suspect this to be related to the 8.0.0 release of tenacity and the lack of restricting the auto-upgrade. Changing the version of tenacity to tenacity >= 5.0.4, < 8.0.0 in our requirements.txt worked for us as an intermediate fix but would be better to have the fix upstream.

Temporary fix PR created (#58) until all the method calls are updated to be compliant with 8.0.0 release of tenacity or switch to another library

@mikhailadvani
Copy link

My bad. Not needed. The correct fix was already in place and we had not updated the opsgenie-sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants