Emulator tests are orange on Taskcluster due to keyError: 'branch' in _parse_extra_try_arguments

RESOLVED FIXED

Status

Taskcluster
General
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: hsinyi, Assigned: chmanchester)

Tracking

Details

MozReview Requests

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

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

3 years ago
Error message:

File "/home/worker/mozharness/mozharness/mozilla/testing/testbase.py", line 261, in _parse_extra_try_arguments
if not self.buildbot_config or self.buildbot_config['properties']['branch'] != 'try':
KeyError: 'branch' 

https://treeherder.allizom.org/#/jobs?repo=try&revision=ee39b26516c0
(Reporter)

Comment 1

3 years ago
Looks [1] could be the cause, as per log [2], there's no "branch" key in buildbot_config['properties'] that might trigger exception.

[1] https://hg.mozilla.org/build/mozharness/rev/4aaa64f9d5cf#l1.58
[2] https://s3-us-west-2.amazonaws.com/taskcluster-public-artifacts/bfWN5JJrRau2SCgqNVel_A/0/public/logs/live_backing.log
(Reporter)

Updated

3 years ago
Summary: Emulator tests are orange on Taskcluster due to keyError: 'branch' → Emulator tests are orange on Taskcluster due to keyError: 'branch' in _parse_extra_try_arguments
(Reporter)

Comment 2

3 years ago
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #1)
> Looks [1] could be the cause, as per log [2], there's no "branch" key in
> buildbot_config['properties'] that might trigger exception.
> 
> [1] https://hg.mozilla.org/build/mozharness/rev/4aaa64f9d5cf#l1.58
> [2]
> https://s3-us-west-2.amazonaws.com/taskcluster-public-artifacts/
> bfWN5JJrRau2SCgqNVel_A/0/public/logs/live_backing.log

Hi Chris,
This issue seems result from bug 978846. Could you help check? Thank you.
Flags: needinfo?(cmanchester)
(Assignee)

Updated

3 years ago
Blocks: 978846
Flags: needinfo?(cmanchester)
(Assignee)

Comment 3

3 years ago
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #2)
> (In reply to Hsin-Yi Tsai [:hsinyi] from comment #1)
> > Looks [1] could be the cause, as per log [2], there's no "branch" key in
> > buildbot_config['properties'] that might trigger exception.
> > 
> > [1] https://hg.mozilla.org/build/mozharness/rev/4aaa64f9d5cf#l1.58
> > [2]
> > https://s3-us-west-2.amazonaws.com/taskcluster-public-artifacts/
> > bfWN5JJrRau2SCgqNVel_A/0/public/logs/live_backing.log
> 
> Hi Chris,
> This issue seems result from bug 978846. Could you help check? Thank you.

Taskcluster stubs out buildbot properties, so the key we're checking for doesn't exist. I'll post a patch to check for it.
(Assignee)

Updated

3 years ago
Assignee: nobody → cmanchester
(Reporter)

Comment 4

3 years ago
(In reply to Chris Manchester [:chmanchester] from comment #3)
> (In reply to Hsin-Yi Tsai [:hsinyi] from comment #2)
> > (In reply to Hsin-Yi Tsai [:hsinyi] from comment #1)
> > > Looks [1] could be the cause, as per log [2], there's no "branch" key in
> > > buildbot_config['properties'] that might trigger exception.
> > > 
> > > [1] https://hg.mozilla.org/build/mozharness/rev/4aaa64f9d5cf#l1.58
> > > [2]
> > > https://s3-us-west-2.amazonaws.com/taskcluster-public-artifacts/
> > > bfWN5JJrRau2SCgqNVel_A/0/public/logs/live_backing.log
> > 
> > Hi Chris,
> > This issue seems result from bug 978846. Could you help check? Thank you.
> 
> Taskcluster stubs out buildbot properties, so the key we're checking for
> doesn't exist. I'll post a patch to check for it.

Thank you :)
(Assignee)

Comment 5

3 years ago
Created attachment 8602757 [details]
MozReview Request: bz://1162405/chmanchester

/r/8349 - Bug 1162405 - Check for the existence of the 'branch' key before accessing it when determining whether we're running on try;r=ahal

Pull down this commit:

hg pull -r 0cd6363afbe6a292c9b389665b47fc470fa63571 https://reviewboard-hg.mozilla.org/build-mozharness
Attachment #8602757 - Flags: review?(ahalberstadt)
Comment on attachment 8602757 [details]
MozReview Request: bz://1162405/chmanchester

https://reviewboard.mozilla.org/r/8347/#review7055

Ship It!
Attachment #8602757 - Flags: review?(ahalberstadt) → review+
(Reporter)

Comment 7

3 years ago
(In reply to Andrew Halberstadt [:ahal] from comment #6)
> Comment on attachment 8602757 [details]
> MozReview Request: bz://1162405/chmanchester
> 
> https://reviewboard.mozilla.org/r/8347/#review7055
> 
> Ship It!

Sorry to jump in. Given in task cluster the 'branch' key doesn't exist at all, the if clause |self.buildbot_config['properties'].get('branch') == 'try'| will never be true. How could this patch correctly determine whether we are running on try and execute as expected?
(Assignee)

Comment 8

3 years ago
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #7)
> (In reply to Andrew Halberstadt [:ahal] from comment #6)
> > Comment on attachment 8602757 [details]
> > MozReview Request: bz://1162405/chmanchester
> > 
> > https://reviewboard.mozilla.org/r/8347/#review7055
> > 
> > Ship It!
> 
> Sorry to jump in. Given in task cluster the 'branch' key doesn't exist at
> all, the if clause |self.buildbot_config['properties'].get('branch') ==
> 'try'| will never be true. How could this patch correctly determine whether
> we are running on try and execute as expected?

The branch will never be taken, so for the time being this feature will not be available on taskcluster. I'd like to support it, but I haven't had an opportunity to look into that yet.
(Assignee)

Comment 9

3 years ago
https://reviewboard.mozilla.org/r/8347/#review7061

::: mozharness/mozilla/testing/testbase.py:410
(Diff revision 1)
> -        if self.buildbot_config and self.buildbot_config['properties']['branch'] == 'try':
> +        if (self.buildbot_config and 'proerties' in self.buildbot_config and

Just noticed the typo. I'll fix before pushing.
(Assignee)

Comment 10

3 years ago
https://hg.mozilla.org/build/mozharness/rev/9f743f3621a0
mozharness production tag moved to: https://hg.mozilla.org/build/mozharness/rev/production
(Assignee)

Comment 12

2 years ago
Comment on attachment 8602757 [details]
MozReview Request: bz://1162405/chmanchester
Attachment #8602757 - Attachment is obsolete: true
Attachment #8620248 - Flags: review+
(Assignee)

Comment 13

2 years ago
Created attachment 8620248 [details]
MozReview Request: Bug 1162405 - Check for the existence of the 'branch' key before accessing it when determining whether we're running on try;r=ahal
Component: TaskCluster → General
Product: Testing → Taskcluster
(Assignee)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.