Closed Bug 1151329 Opened 10 years ago Closed 10 years ago

Autophone - properly handle local build urls

Categories

(Testing Graveyard :: Autophone, defect)

defect
Not set
normal

Tracking

(firefox40 affected)

RESOLVED FIXED
Tracking Status
firefox40 --- affected

People

(Reporter: bc, Assigned: bc)

References

Details

(Keywords: regression)

Attachments

(1 file)

44 bytes, text/x-github-pull-request
gbrown
: review+
Details | Review
utils.get_remote_text does not properly handle local file:// urls. First, it will not even attempt to read the file content due to the conditional on the request's code. Second, if the url is a simple local path without a file scheme, urllib2.urlopen will fail due to the unknown scheme. This is a regression from bug 1133580. In autophone.new_job when checking if the build is from a supported repository for the device and test, it uses a check if the repo is contained in the build url. This doesn't work for local builds where the local file path does not match the pattern used on ftp.mozilla.org. We should instead uses the repo returned from the build.txt file. In builds.BuildLocation.find_builds_by_directory we should the returned builds for local paths include the file scheme. I've tested this with local builds and remote builds using the various date selections.
Attached file pr 21
Attachment #8588435 - Flags: review?(gbrown)
Comment on attachment 8588435 [details] [review] pr 21 Looks good. Consider handling unexpected (non-http and non-file) schemes with an explicit error.
Attachment #8588435 - Flags: review?(gbrown) → review+
Comment on attachment 8588435 [details] [review] pr 21 Added an exception if utils.get_remote_text's url does not specify a scheme and fixed the find_builds_by_directory urlparse.urljoin to use file: instead of file.
Attachment #8588435 - Flags: review+ → review?(gbrown)
Attachment #8588435 - Flags: review?(gbrown) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: