Closed Bug 1162405 Opened 9 years ago Closed 9 years ago

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

Categories

(Taskcluster :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: hsinyi, Assigned: chmanchester)

References

Details

Attachments

(1 file, 1 obsolete file)

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
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
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
(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)
Blocks: 978846
Flags: needinfo?(cmanchester)
(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: nobody → cmanchester
(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 :)
/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+
(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?
(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.
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.
Attachment #8602757 - Attachment is obsolete: true
Attachment #8620248 - Flags: review+
Component: TaskCluster → General
Product: Testing → Taskcluster
Status: NEW → RESOLVED
Closed: 9 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: