-
-
Notifications
You must be signed in to change notification settings - Fork 873
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
Backup Status Endpoint Deprecated #646
Comments
@hdost I might need someone else to code it out as I feel like I'll mangle it, however I think I can get someone to the point of understanding exactly how. So the new progress endpoint is '/rest/backup/1/export/getProgress?taskId=' where you pass in the taskId. To get the task Id the endpoint is '/rest/backup/1/export/lastTaskId' (if another task was done at the same time could this grab the wrong one?) So if you took in the taskId from /lastTaskId you'd get something like '17747' as the response, literally just the number. Then if you did '/rest/backup/1/export/getProgress?taskId=17747' you would get the following response, Now I'm not sure if the previous endpoint returned the same format response meaning the rest of the code can stay the same or not. Thoughts? |
@hdost to add to my above, the following (crappy) code will successfully start a backup, check the status, and download the file to a specific directory when it's complete. I think I'll leave it to the experts to implement it in the library source.
|
I have confidence that you can get this working, the place you need to fix is Lines 2715 to 2802 in 6ffa0f0
I would just go ahead and submit a PR. |
I agree with @hdost... @guitarhero23: Have a go at fixing it in the library -- we will review your change before it gets merged, and can help with suggestions or corrections. If you get stuck on the process of how to clone the repo and create a pull request, we can help you with that too. :-) |
Hey guys, a while ago I referenced this solution to add to our company's workflow for reporting off of our Jira data. As of recently it looks like Jira changed the way you can authenticate to use their services. You have to set up a token and then you can create a HTTPBasicAuth object which comes from requests.auth. So building off of @guitarhero23 's solution, everywhere you see auth=(username, password) you would have to replace it with that HTTPBasicAuth object. I just do auth = HTTPBasicAuth(username, token). Thanks for this solution, it really enabled our team to get the data we needed. |
Good to hear @montaz708 and yes, with the changes they made you're free to just pass the token in place of the password and everything should work as expected. Speaking of which I believe this bug can be closed now since my pull request was accepted, I think. It was a year ago so I forget, I'll try and look it up. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I had previously submitted a pull request which was accepted for the new backup endpoint for initiating a backup however nothing was included to correct the similar issue in returning the current status of the backup which is referenced in both the back_complete and backup_complete methods. I was going to just not show a status when creating/downloading the backup in my script however the backup_complete method which returns a boolean if complete references the same endpoint so if fails as well.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Return information about the current status of the Jira and when it is true download the backup
Stack Trace
Version Information
Python Interpreter: 3.6
jira-python: current
OS: Windows 10
I'll try and research and do a pull request if I find the new endpoint
The text was updated successfully, but these errors were encountered: