-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Support jira 9 #7112
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
Support jira 9 #7112
Conversation
bab2c7f
to
ed07cbb
Compare
some unit tests are failing - i'm working on it |
OK I finally think I know why the tests are failing ... In if jira._version < (9, 0, 0):
try:
meta = jira.createmeta(
...
else:
try:
issuetypes = jira.createmeta_issuetypes(project_key)
except JIRAError as e:
... This code works properly without the patch I added to pycontribs/jira#1527, as long as the JIRA instance version is below 9, as the old
If I'm not mistaken, the mock JIRA responses are configured in ...
response:
body:
string: !!binary |
H4sIAAAAAAAAA1SPS2vDMBCE/8teazsr+SFXt9Ic2lLSgp1TCUW2JOIiS8aSCyHkv1emoY/bMPvN
zu4ZOuHVfjbA4RjC5PlmI5VWfZDuw2UiGOH9IGxmVYAEPtXsB2cjTBBJhhmmze7utXl4aX+nu2Xs
ogL+tkIJJnhIQKrJuNOobGhPk4oL7o1bZAx1y2DkdwR4DFAsr+ZWhBWkSGmKdUpYizVHxmmZIeJN
JDHmvZpjbzuM/9jbFpHTnJN4ZFH+sP34aLWLYFUQpnOtdc5qSivMa4ycoBXpBcqqZ6xQmFd/C4JZ
G56GWcD6jhaLCc+uF6t9BnNVoOz7voHL5QsAAP//AwDEYVdgWgEAAA==
... Decoding the base64 indeed results in a binary blob. If this is true the easiest solution would be reducing that version to below JIRA 9 so that the new API is not triggered. @Maffooch any hint on how to view / edit the mock responses ? Update: I don't think it's possible to freeze the could Jira instance to an older version and re-record the responses. Also this is a valid error case (Jira client does not support / match Jira API) and should not be quietly suppressed in code. And it affects most (if not all) Jira tests so it doesn't make sense to disable certain tests. |
@pmilosev The best idea I have is to standup jira in a docker container and test against that. |
For the manual testing that's what I did. I tested both the |
The last commit fixed 20+ failing tests, only two more to go :) |
22b4e5e
to
bac10c5
Compare
@Maffooch (or some other maintainer) I need some help to understand what is going on. I have the same unit test failing as in #7141 and #7130. Unfortunately the same unit test failure still persists which leads me to conflicting conclusions:
Anyway, I have spent several hours today on it and what I know is that:
I have very little experience with this technology stack and can not figure out who and how this data is loaded and why it ends up in an empty list. I initially thought that by modifying the VCR recordings I might have broken some hash codes etc. but this doesn't seem to be the case. Now I suspect that the issue is outside of my PR. I'm running out of time to work on this pull request. I would appreciate any help to get it to a state where it can be merged. TL;DR
|
Hi guys (mainly @pmilosev), my PR #6193 was quite a huge change. It dropped redundancy in I really would like to know this part better but I do not have time for deep dive to this part for now. Maybe empty list is right value in this place. |
I am looking into this. There are a few users that are experiencing this issue. Appears to be something wrong with the 2.16.2 release, but am not sure what exactly. All tests had passed on |
#7142 has been merged. Please pull the latest dev branch to get that unit test to pass. For the VCR unit tests, I do not think it changing all the unit tests to only test against versions < 9.x since that totally removes test coverage for the cloud offerings. I think it would be better to record a new test that specifically tests against version < 9 rather than changing all tests. |
Thanks a lot, I'll look into this tomorrow. Regarding the VCR, I only changed the recorded Jira version which doesn't seem to be used in the unit tests for decision making, so all tests will work as they did before the PR. However this discussion is probably irrelevant as motivated by your comment and the odd cloud version Not only cloud Jira is a rolling release that rolls out in steps (two cloud accounts may have different features available), but also the cloud Jira API is independent and sometimes different from on-prem versions of Jira. This means all integrating apps that support both must account for these differences. |
…33.1 (helm/defectdojo/values.yaml)
No change in behaviour (except perhaps in logging).
Fixes: DefectDojo#6963 Depends on: pycontribs/jira#1527 If you don't have the update in the mentioned dependency than behaves as it used to - works until Jira 9 and breaks afterwards. If you update the dependency than it will continue working after Jira 9. With the updated dependency it will throw deprecation warnings on Jira versions [8.4 - 9).
db27eeb
to
78296ac
Compare
It's a bit messy history, but I finally cleaned up everything:
I can only see that due to the updating and merging commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @pmilosev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
Fixes: #6963
Depends on: pycontribs/jira#1527
If you don't have the update in the mentioned dependency than behaves as it used to - works until Jira 9 and breaks afterwards.
If you update the dependency than it will continue working after Jira 9.
With the updated dependency it will throw deprecation warnings on Jira versions [8.4 - 9).
Tested manually against JIRA 7.13.8, 8.22.6 and 9.3.1.