Closed Bug 1845833 Opened 2 years ago Closed 2 years ago

./mach storybook launch throws a KeyError 'runprefs' when invoked

Categories

(Firefox Build System :: Mach Core, defect, P3)

defect

Tracking

(firefox-esr102 unaffected, firefox-esr115 unaffected, firefox115 unaffected, firefox116 unaffected, firefox117 fixed, firefox118 fixed)

RESOLVED FIXED
118 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- unaffected
firefox115 --- unaffected
firefox116 --- unaffected
firefox117 --- fixed
firefox118 --- fixed

People

(Reporter: tgiles, Assigned: ahochheiden)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

According to my bisecting, it seems like https://phabricator.services.mozilla.com/D180500 did something that caused the ./mach storybook launch command to stop working.

STR:

  1. Check-out the latest mozilla-central
  2. Run ./mach storybook launch

Expected:
The ./mach storybook launch starts Firefox on localhost:5703 without error

Actual:
The following error appears:

KeyError: 'runprefs'

  File "G:\mozilla\mozilla-unified\browser\components\storybook\mach_commands.py", line 33, in storybook_launch
    return run_mach(
  File "G:\mozilla\mozilla-unified\browser\components\storybook\mach_commands.py", line 55, in run_mach
    return command_context._mach_context.commands.dispatch(
  File "G:\mozilla\mozilla-unified\python\mach\mach\registrar.py", line 202, in dispatch
    return self._run_command_handler(handler, context, **kwargs)
  File "G:\mozilla\mozilla-unified\python\mach\mach\registrar.py", line 125, in _run_command_handler
    result = fn(instance, **kwargs)
  File "G:\mozilla\mozilla-unified\python\mozbuild\mozbuild\mach_commands.py", line 1521, in run
    return _run_desktop(command_context, **kwargs)
  File "G:\mozilla\mozilla-unified\python\mozbuild\mozbuild\mach_commands.py", line 2016, in _run_desktop
    prefs.update(command_context._mach_context.settings.runprefs)
  File "G:\mozilla\mozilla-unified\python\mach\mach\config.py", line 145, in _
    six.reraise(AttributeError().__class__, exc, tb)
  File "g:\mozilla\mozilla-unified\third_party\python\six\six.py", line 696, in reraise
    raise value
  File "G:\mozilla\mozilla-unified\python\mach\mach\config.py", line 142, in _
    return func(*args, **kwargs)
  File "G:\mozilla\mozilla-unified\python\mach\mach\config.py", line 415, in __getattr__
    return self.__getitem__(k)
  File "G:\mozilla\mozilla-unified\python\mach\mach\config.py", line 410, in __getitem__
    return self._sections[k]

Sentry event ID: 7b3aac31933d48c491a0a7f1f0eb37b0
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-Break to quit

Is there some workaround we can use in storybook/mach_commands.py to handle this change?

Set release status flags based on info from the regressing bug 1695312

:ahochheiden, since you are the author of the regressor, bug 1695312, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

This just forces other command modules to be loaded in addition to the
'base' command. We need this so that decorators needed by the 'base'
command that are in another command module are ran in initialization
(eg: @SettingsProvider).

I thought about centralizing the @SettingsProvider decorators into one
module and always loading it, but they can depend on the
'command_handlers' in Registrar, so the modules they're currently in
have to be loaded for them to execute, so there wasn't a way around
this.

Depends on D184851

Assignee: nobody → ahochheiden
Status: NEW → ASSIGNED
Severity: -- → S3
Flags: needinfo?(ahochheiden)
Priority: -- → P3

Set release status flags based on info from the regressing bug 1695312

Pushed by ahochheiden@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bb37af5e577c Add the ability to specify command dependencies for commands r=firefox-build-system-reviewers,glandium
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch

The patch landed in nightly and beta is affected.
:ahochheiden, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox117 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(ahochheiden)
Flags: needinfo?(ahochheiden)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: