Autoland treestatus code needs to handle full repository urls

RESOLVED FIXED

Status

MozReview
General
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: dminor, Assigned: dminor)

Tracking

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
For instance, when the destination looks like:

ssh://hg.mozilla.org/integration/mozilla-inbound/?format=json

we need to query treestatus for:

mozilla-inbound

not the whole url.
(Assignee)

Comment 1

3 years ago
Created attachment 8712669 [details]
MozReview Request: autoland: make treestatus handle full tree urls properly (bug 1243365) r?glob

We check for full integration branch urls and map them just to the short
tree name for use with treestatus.

Review commit: https://reviewboard.mozilla.org/r/32609/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/32609/
Attachment #8712669 - Flags: review?(glob)
Assignee: nobody → dminor
Attachment #8712669 - Flags: review?(glob)
Comment on attachment 8712669 [details]
MozReview Request: autoland: make treestatus handle full tree urls properly (bug 1243365) r?glob

https://reviewboard.mozilla.org/r/32609/#review29333

lgtm; fix issues on commit

::: autoland/autoland/treestatus.py:14
(Diff revision 1)
> +    m = re.match('ssh://hg.mozilla.org/integration/([A-Za-z-]+)', tree)

periods are wildcards; you need to escape them in 'hg.mozilla.org'

[A-Za-z-]+ is quite restrictive; we already have branches that this doesn't match -- they _are_ b2g branches but this isn't future friendly.

i think it would be better to grab everything between the slashes: /([^\/]+)/ or if the trailing slash is optional the rest of the string excluding a trailing slash.
https://reviewboard.mozilla.org/r/32609/#review29333

oops, ignore this comment.  i'd like to see an updated regex before shipping.
(Assignee)

Comment 4

3 years ago
Comment on attachment 8712669 [details]
MozReview Request: autoland: make treestatus handle full tree urls properly (bug 1243365) r?glob

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/32609/diff/1-2/
Attachment #8712669 - Flags: review?(glob)
Comment on attachment 8712669 [details]
MozReview Request: autoland: make treestatus handle full tree urls properly (bug 1243365) r?glob

https://reviewboard.mozilla.org/r/32609/#review29339

lgtm
Attachment #8712669 - Flags: review?(glob) → review+
(Assignee)

Comment 6

3 years ago
https://hg.mozilla.org/hgcustom/version-control-tools/rev/ccf46af1d79d
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.