Closed Bug 1452306 Opened 7 years ago Closed 7 years ago

Fix or remove broken test_analyze_perf command

Categories

(Tree Management :: Perfherder, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file)

pylint reports: treeherder/perf/management/commands/test_analyze_perf.py:9,0: No name 'Datum' in module 'treeherder.perfalert.perfalert' (E0611: no-name-in-module) Which refers to: https://github.com/mozilla/treeherder/blob/addd73c8631ee2c005a0139bf0a88fabe3c6a24b/treeherder/perf/management/commands/test_analyze_perf.py#L9 It turns out the command has been broken since `Datum` was renamed to `RevisionDatum` in bug 1344358 a year ago: https://github.com/mozilla/treeherder/commit/7ef4f32631fc92ce73cfd0c2bef35edb2eca4e34#diff-6ccbcc97dc4032fea478e19c643122e8L58 ``` vagrant ~/treeherder $ ./manage.py test_analyze_perf Traceback (most recent call last): ... File "/home/vagrant/treeherder/treeherder/perf/management/commands/test_analyze_perf.py", line 9, in <module> from treeherder.perfalert.perfalert import (Datum, ImportError: cannot import name Datum ``` Will, is this command still useful (it hasn't been used for a year) or should it just be removed?
Flags: needinfo?(wlachance)
If I were going to hack on Perfherder's alerting code again, I would probably need/want something like this. So my suggestion would be to keep it, maybe doing the minimum to make it not warn anymore and add a similar warning to the one we added to import_perf_data: https://github.com/mozilla/treeherder/blob/17df068b46d52ff55f601fd8901a6c7ea3991858/treeherder/perf/management/commands/import_perf_data.py#L159
Flags: needinfo?(wlachance)
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/0dc85fa04bed17f72ea8fffacddd28b88dcd9be6 Bug 1452306 - Fix test_analyze_perf command (#3429) Prevents the `ImportError` after the rename in #2284.
Assignee: nobody → emorley
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: