Closed
Bug 1289354
Opened 8 years ago
Closed 8 years ago
AttributeError: type object 'datetime.datetime' has no attribute 'datetime' in FailureLineViewSet.update
Categories
(Tree Management :: Treeherder: API, defect, P1)
Tree Management
Treeherder: API
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: jgraham)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
https://rpm.newrelic.com/accounts/677903/applications/4180461/traced_errors/53eba4c1-5310-11e6-9e2c-c81f66b8ceca_5210_10380
For PUT to:
/api/failure-line/5302627/
Traceback (most recent call last):
...
File "/data/www/treeherder.mozilla.org/treeherder-service/treeherder/webapp/api/failureline.py", line 99, in update
File "/data/www/treeherder.mozilla.org/venv/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
File "/data/www/treeherder.mozilla.org/treeherder-service/treeherder/webapp/api/failureline.py", line 81, in _update
File "/data/www/treeherder.mozilla.org/treeherder-service/treeherder/model/derived/jobs.py", line 451, in update_after_verification
File "/data/www/treeherder.mozilla.org/treeherder-service/treeherder/model/derived/jobs.py", line 528, in insert_autoclassify_job_note
exceptions:AttributeError: type object 'datetime.datetime' has no attribute 'datetime'
https://github.com/mozilla/treeherder/blame/5be1ce99a9c32246c412852738c93dad70ee2e02/treeherder/model/derived/jobs.py#L528
Flags: needinfo?(wlachance)
Reporter | ||
Comment 1•8 years ago
|
||
Also occurs during:
FailureLineViewSet.update_many
https://rpm.newrelic.com/accounts/677903/applications/4180461/traced_errors/82451733-5330-11e6-9e2c-c81f66b8ceca_0_5173
TextLogSummaryLineViewSet.update_many
https://rpm.newrelic.com/accounts/677903/applications/4180461/traced_errors/7e0a8222-532e-11e6-9e2c-c81f66b8ceca_0_5094
Yey for the datetime module having a daft naming scheme, making it easy to do `from datetime import datetime` and then from a later `datetime.datetime` without realising :-/
The fix here will be easy, but we should also add some more tests :-)
Comment 2•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8774742 -
Flags: review?(wlachance)
Comment 3•8 years ago
|
||
Comment on attachment 8774742 [details] [review]
[treeherder] mozilla:autoclassify_bug_job_map > mozilla:master
Excellent. On inspection it should, but just double checking: did you make sure the unit test now fails if you take your patch out?
Flags: needinfo?(wlachance)
Attachment #8774742 -
Flags: review?(wlachance) → review+
Comment 4•8 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/82918ec4235f8e0b55c839f141822a93cb09bda5
Bug 1289354 - Fix regression creating job bug associations after verifying classifications. (#1728)
This regressed with the move away from datasource.
Reporter | ||
Updated•8 years ago
|
Assignee: nobody → james
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•