Closed Bug 1154002 Opened 9 years ago Closed 9 years ago

[mozbuild] assert current_type is not None hit in read_mozconfig() on a recent b2g build

Categories

(Firefox OS Graveyard :: GonkIntegration, defect)

defect
Not set
normal

Tracking

(b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S10 (17apr)
Tracking Status
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: ahal, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

STR:

cd $B2G_HOME
./repo sync
./mach help

Result:
This assertion is hit:
https://dxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/mozconfig.py#363

This was regressed in the last couple of days, as I had been testing mochitest mach commands with emulator builds on Thursday. This means that all b2g mach commands are currently broken.

Gps, any idea if this is a bad assumption in read_mozconfig() or a bad mozconfig checked into B2G?
Flags: needinfo?(gps)
bug 1151787 seems to be related?
Attached patch bug1154002 (obsolete) — Splinter Review
mach xpcshell-test works fine with this patch, mach help still fails yet.
Blocks: 1151787
Attachment #8592067 - Attachment is patch: true
Attachment #8592067 - Attachment mime type: text/x-patch → text/plain
This is definitely regressed by bug 1151787. Still not sure if the bug lies with that patch, or with mozbuild.

A workaround is to revert that patch:
$ cd gonk-misc
$ git revert 09cc97f87175c3b89b0c347855b84a8cd2b767bb
Your patch seems to fix it for me, even for |mach help|. What error are you seeing with help?

If you get it working would you mind pushing this as a pull request to gonk-misc and flag :mwu for review?
Flags: needinfo?(hiikezoe)
Attachment #8592067 - Attachment is obsolete: true
Flags: needinfo?(hiikezoe)
Attachment #8592513 - Flags: review?(mwu)
Component: Build Config → GonkIntegration
Product: Core → Firefox OS
(In reply to Andrew Halberstadt [:ahal] from comment #4)
> Your patch seems to fix it for me, even for |mach help|. What error are you
> seeing with help?

The error is:

TypeError: populate_context() takes exactly 1 argument (2 given)

  File "/home/ikezoe/B2G/gecko/python/mach/mach/main.py", line 344, in run
    return self._run(argv)
  File "/home/ikezoe/B2G/gecko/python/mach/mach/main.py", line 390, in _run
    args = parser.parse_args(argv)
  File "/usr/lib/python2.7/argparse.py", line 1690, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1722, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1931, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "/usr/lib/python2.7/argparse.py", line 1887, in consume_positionals
    take_action(action, args)
  File "/usr/lib/python2.7/argparse.py", line 1796, in take_action
    action(self, namespace, argument_values, option_string)
  File "/home/ikezoe/B2G/gecko/python/mach/mach/dispatcher.py", line 101, in __call__
    self._handle_main_help(parser, namespace.verbose)
  File "/home/ikezoe/B2G/gecko/python/mach/mach/dispatcher.py", line 253, in _handle_main_help
    instance = handler.cls(self._context)
  File "/home/ikezoe/B2G/gecko/testing/mochitest/mach_commands.py", line 833, in __init__
    setattr(self, attr, getattr(context, attr, None))
  File "/home/ikezoe/B2G/gecko/python/mach/mach/main.py", line 160, in __getattribute__
    ret = object.__getattribute__(self, '_handler')(self, key)

There might be another issue on my environment.
Comment on attachment 8592513 [details] [review]
Fix mach command breakage

Thanks!
Attachment #8592513 - Flags: review?(mwu) → review+
Comment on attachment 8592513 [details] [review]
Fix mach command breakage

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 1151787
User impact if declined:  b2g mach commands are currently broken on v2.2
Testing completed: verify on master
Risk to taking this patch (and alternatives if risky): low, just set a default value to variable
String or UUID changes made by this patch:none
Attachment #8592513 - Flags: approval-mozilla-b2g37?
Attachment #8592513 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: