[SERVER-36111] Bug in job.py related to functionality for archiving data files in 3.4 Created: 13/Jul/18  Updated: 29/Oct/23  Resolved: 16/Jul/18

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.4.16
Fix Version/s: 3.4.17

Type: Bug Priority: Major - P3
Reporter: Tomislav Plavcic Assignee: Max Hirschhorn
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Related
is related to SERVER-26884 Support archiving data files in Everg... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: TIG 2018-07-30
Participants:

 Description   

For some reason one additional unnecessary line is present in 3.4 commit for data files archiving functionality - the bug is not present in 3.6 and master branches.

If you run some tests in 3.4.16 like so:

buildscripts/resmoke.py --continueOnFailure --jobs=4 --shuffle --storageEngine=wiredTiger --suites=decimal --reportFile=decimal_wiredTiger.json

you'll get:

[executor:js_test:job1] 2018-07-13T11:54:58.522+0200 Encountered an error during test execution.
Traceback (most recent call last):
  File "/home/plavi/test/mongodb-linux-x86_64-ubuntu1604-3.4.16/buildscripts/resmokelib/testing/job.py", line 46, in __call__
    self._run(queue, interrupt_flag)
  File "/home/plavi/test/mongodb-linux-x86_64-ubuntu1604-3.4.16/buildscripts/resmokelib/testing/job.py", line 86, in _run
    self._execute_test(test)
  File "/home/plavi/test/mongodb-linux-x86_64-ubuntu1604-3.4.16/buildscripts/resmokelib/testing/job.py", line 118, in _execute_test
    self.archival.archive(self.logger, test, success)
AttributeError: 'NoneType' object has no attribute 'archive'
...
[executor:js_test] 2018-07-13T11:54:58.762+0200 Summary: 4 test(s) ran in 0.35 seconds (4 succeeded, 10 were skipped, 0 failed, 0 errored)
[resmoke] 2018-07-13T11:54:58.762+0200 ================================================================================
[resmoke] 2018-07-13T11:54:58.762+0200 Summary of decimal suite: 4 test(s) ran in 0.99 seconds (4 succeeded, 10 were skipped, 0 failed, 0 errored)
    js_tests: 4 test(s) ran in 0.35 seconds (4 succeeded, 10 were skipped, 0 failed, 0 errored)

Line 118 in job.py (3.4.16) is excessive and probably should be removed:

116         finally:
117             success = self.report.find_test_info(test).status == "pass"
118             self.archival.archive(self.logger, test, success)
119             if self.archival:
120                 self.archival.archive(self.logger, test, success)

Without it:

[executor:js_test] 2018-07-13T11:33:59.997+0200 Summary: All 28 test(s) passed in 1.43 seconds.
[resmoke] 2018-07-13T11:33:59.998+0200 ================================================================================
[resmoke] 2018-07-13T11:33:59.998+0200 Summary of decimal suite: 28 test(s) ran in 1.96 seconds (28 succeeded, 0 were skipped, 0 failed, 0 errored)
    js_tests: All 28 test(s) passed in 1.43 seconds.

It makes problems with running the tests for 3.4 if you don't specify archive file parameter and it's not visible in 3.6 and master.



 Comments   
Comment by Max Hirschhorn [ 16/Jul/18 ]

Hi tplavcic, thanks for reporting this issue! I think because we're always running resmoke.py with --archiveFile in our CI system and local development has shifted to newer branches that this issue had gone unnoticed until now.

Comment by Githook User [ 16/Jul/18 ]

Author:

{'username': 'visemet', 'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com'}

Message: SERVER-36111 Remove unnecessary and unguarded usage of archival module.

This fixes the AttributeError that would otherwise occur when running
resmoke.py without specifying the --archiveFile command line option.
Branch: v3.4
https://github.com/mongodb/mongo/commit/dbb523fbbf98d6d3638b631939c06602ddee30e7

Generated at Thu Feb 08 04:42:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.