[SERVER-31942] Large changes in unreliable tests can prevent test lifecycle update Created: 13/Nov/17 Updated: 30/Oct/23 Resolved: 23/Jan/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.3, 3.7.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Yves Duhem | Assignee: | Yves Duhem |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | pull-request | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v3.6
|
||||||||
| Participants: | |||||||||
| Linked BF Score: | 0 | ||||||||
| Description |
|
When the update_test_lifecycle task sees changes in unreliable tests, it creates a JIRA issue before committing the changes. Instead we should truncate the description when its size exceeds the allowed limit. |
| Comments |
| Comment by Githook User [ 25/Jan/18 ] | |||||||||
|
Author: {'name': 'Chibuikem Amaechi', 'email': 'cramaechi@me.com', 'username': 'cramaechi'}Message: Signed-off-by: Yves Duhem <yves.duhem@mongodb.com> | |||||||||
| Comment by Githook User [ 23/Jan/18 ] | |||||||||
|
Author: {'name': 'Chibuikem Amaechi', 'email': 'cramaechi@me.com', 'username': 'cramaechi'}Message: Signed-off-by: Yves Duhem <yves.duhem@mongodb.com> | |||||||||
| Comment by Kelsey Schubert [ 20/Jan/18 ] | |||||||||
|
yves.duhem, I've gone ahead and linked the pull request to this ticket. Would you please take a look? Thanks, | |||||||||
| Comment by Chibuikem Amaechi [ 19/Jan/18 ] | |||||||||
|
Hi Yves, Thank you for the helpful notes. I will apply the changes and open a pull request. Best Regards, | |||||||||
| Comment by Yves Duhem [ 19/Jan/18 ] | |||||||||
|
Hi Chibuikem, Here is some feedback on the changes but feel free to submit a pull request referencing this ticket as it'll be easier to discuss code changes on github. _truncate_description() _get_jira_description() Unit testsI would suggest adding a new method test_truncate_description() and do two checks:
Thanks! | |||||||||
| Comment by Chibuikem Amaechi [ 19/Jan/18 ] | |||||||||
|
Hi Yves, The following changes were made to the JiraIssueCreator class: The following changes were made to the TestJiraIssueCreator class: Modified file(s): mongo/buildscripts/update_test_lifecycle.py, mongo/buildscripts/tests/test_update_test_lifecycle.py Please share your thoughts. | |||||||||
| Comment by Chibuikem Amaechi [ 18/Jan/18 ] | |||||||||
|
Hi Yves, Sounds good. I will make the improvements and follow up. Thank you. | |||||||||
| Comment by Yves Duhem [ 18/Jan/18 ] | |||||||||
|
Hi Chibuikem, After taking a look at the surrounding code, I realized that the method you proposed changing only handles part of the description (for the updated tags). And in order to make it easier to update the code, let's move the max size to a constant. Something like the following:
| |||||||||
| Comment by Chibuikem Amaechi [ 18/Jan/18 ] | |||||||||
|
Hi Yves, Will the following suffice?
| |||||||||
| Comment by Chibuikem Amaechi [ 18/Jan/18 ] | |||||||||
|
Hi Yves! You're definitely right. Somehow it slipped it my mind that slice indexes are zero-based I will make the necessary changes and post again. Thank you! | |||||||||
| Comment by Yves Duhem [ 18/Jan/18 ] | |||||||||
|
Hi cramaechi, Thank you for your comment. | |||||||||
| Comment by Chibuikem Amaechi [ 17/Jan/18 ] | |||||||||
|
I believe the code change in the following screenshot should resolve this issue: Modified file(s): mongo/buildscripts/update_test_lifecycle.py Please share your thoughts. |