Closed Bug 1616818 Opened 5 years ago Closed 5 years ago

Get rid of bool_from_str method. Use distutils.util.strtobool instead.

Categories

(Testing :: Raptor, enhancement, P1)

Version 3
enhancement

Tracking

(firefox75 fixed)

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: onegru, Assigned: onegru)

References

Details

Attachments

(1 file)

Instead of testing/raptor/raptor/manifest.py:bool_from_str, use strtobool from distutils.util

Summary: Bet rid of bool_from_str method. Use distutils.util.strtobool instead. → Get rid of bool_from_str method. Use distutils.util.strtobool instead.
Assignee: nobody → onegru
Status: NEW → ASSIGNED
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/026538af0f95 Get rid of bool_from_str method. Use distutils.util.strtobool instead. r=perftest-reviewers,Marian,sparky

Hmm, I don't think the patch applied properly when I tested it because I'm seeing that the ares6 and speedometer tasks are failing again on autoland: https://treeherder.mozilla.org/#/jobs?repo=autoland&tier=1%2C2%2C3&searchStr=browsertime&tochange=f449a588de9aa51bbce98437f5e125eaf901c224&fromchange=5022efe33088676d18253c3c2f86ada5ba7a9cbe

This is the error which is happening because strtobool returns 0 for False, and 1 for True:

[task 2020-02-24T15:41:02.748Z] 15:41:02     INFO -  perftest-results-handler Info: Validating PERFHERDER_DATA against /home/cltbld/tasks/task_1582555098/mozharness/external_tools/performance-artifact-schema.json
[task 2020-02-24T15:41:02.752Z] 15:41:02     INFO -  perftest-results-handler Critical: Error while validating PERFHERDER_DATA
[task 2020-02-24T15:41:02.752Z] 15:41:02     INFO -  perftest-results-handler Info: 1 is not of type u'boolean'
[task 2020-02-24T15:41:02.752Z] 15:41:02     INFO -  Failed validating u'type' in schema[u'properties'][u'suites'][u'items'][u'properties'][u'lowerIsBetter']:
[task 2020-02-24T15:41:02.752Z] 15:41:02     INFO -      {u'description': u'Whether lower values are better for suite',
[task 2020-02-24T15:41:02.752Z] 15:41:02     INFO -       u'title': u'Lower is better',
[task 2020-02-24T15:41:02.752Z] 15:41:02     INFO -       u'type': u'boolean'}
[task 2020-02-24T15:41:02.752Z] 15:41:02     INFO -  On instance[u'suites'][0][u'lowerIsBetter']:
[task 2020-02-24T15:41:02.752Z] 15:41:02     INFO -      1
[task 2020-02-24T15:41:02.752Z] 15:41:02     INFO -  perftest-results-handler Info: Writing video jobs and application data {'application': {'version': '75.0a1', 'name': 'firefox'}, 'jobs': [{'browsertime_json_path': 'browsertime-results/raptor-ares6-firefox/browsertime.json', 'test_name': 'raptor-ares6-firefox'}]} into /home/cltbld/tasks/task_1582555098/build/blobber_upload_dir/browsertime-results/jobs.json
Flags: needinfo?(onegru)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75

The backout in comment 4 will be included in the next round of merges to m-c.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla75 → ---

The result returned by strtobool must be casted to bool.
I'm changing it right now.

Flags: needinfo?(onegru)

Why? Isn't strtobool implying that a boolean is returned? When does that not happen?

Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0b7d49c2ff97 Get rid of bool_from_str method. Use distutils.util.strtobool instead. r=perftest-reviewers,Marian,sparky
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: