Closed Bug 1585698 Opened 7 years ago Closed 7 years ago

Exception: Unknown key in Tree Status response: tags in mozautomation/treestatus.py

Categories

(Developer Services :: Mercurial: mozext, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sfink, Assigned: sfink)

Details

Attachments

(1 file, 2 obsolete files)

Recently, the treestatus response format changed, and mozautomation's treestatus.py throws an Exception on any unrecognized key.

Note that I won't be able to make sure this gets in (and don't have commit privs anyway), as I'll be on PTO for the rest of the week.
Attachment #9098267 - Flags: review?(rgarbas)
(fixed commit message)
Attachment #9098268 - Flags: review?(rgarbas)
Attachment #9098267 - Attachment is obsolete: true
Attachment #9098267 - Flags: review?(rgarbas)

Steve, can you send this on Phabricator, and tag me for review? Thanks.

Flags: needinfo?(sphink)
Comment on attachment 9098268 [details] [diff] [review] Handle new keys in tree status response, >+ elif k == 'tags': >+ self.tags = d[k] >+ elif k in ('log_id',): >+ pass > else: > raise Exception('Unknown key in Tree Status response: %s' % k) The api change was a minor version bump, since api got only extended (new fields) and existing fields change. I'm not aware of a reason why checking full api response is actually needed. I would ignore fields that you are not using in the script. That would make it more future proof if there will be another field that will be added, for whatever reason.
Attachment #9098268 - Flags: review?(rgarbas) → review-

(In reply to Rok Garbas [:garbas] from comment #4)

I'm not aware of a reason why checking full api response is actually needed.
I would ignore fields that you are not using in the script. That would make
it more future proof if there will be another field that will be added, for
whatever reason.

Sorry, I shouldn't have tagged you for review (but I was leaving and in a rush). Connor is a better one to make decisions about what makes sense for this code. I also don't have a reason to go one way or the other, I was just mostly following existing style. I've redirected the review to Connor.

Flags: needinfo?(sphink)
Attachment #9098268 - Attachment is obsolete: true

Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/fdb9aada493e
Handle new keys in tree status response, r=sheehan

Status: ASSIGNED → 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: