Closed Bug 1635381 Opened 5 years ago Closed 5 years ago

brew cask outdated -q returned non-zero exit status 1

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

All
macOS
defect

Tracking

(firefox-esr68 unaffected, firefox75 unaffected, firefox76 unaffected, firefox77 fixed, firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox-esr68 --- unaffected
firefox75 --- unaffected
firefox76 --- unaffected
firefox77 --- fixed
firefox78 --- fixed

People

(Reporter: mortimergoro, Assigned: canova)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

The details of the failure are as follows:

subprocess.CalledProcessError: Command '['/usr/local/bin/brew', 'cask', 'outdated', '-q']' returned non-zero exit status 1.

  File "/Users/mortimer/Projects/gecko/python/mozboot/mozboot/mach_commands.py", line 44, in bootstrap
    bootstrapper.bootstrap()
  File "/Users/mortimer/Projects/gecko/python/mozboot/mozboot/bootstrap.py", line 456, in bootstrap
    getattr(self.instance, 'install_%s_packages' % application)()
  File "/Users/mortimer/Projects/gecko/python/mozboot/mozboot/osx.py", line 201, in install_mobile_android_packages
    getattr(self, 'ensure_%s_mobile_android_packages' % self.package_manager)()
  File "/Users/mortimer/Projects/gecko/python/mozboot/mozboot/osx.py", line 380, in ensure_homebrew_mobile_android_packages
    self._ensure_homebrew_casks(casks)
  File "/Users/mortimer/Projects/gecko/python/mozboot/mozboot/osx.py", line 338, in _ensure_homebrew_casks
    self._ensure_homebrew_packages(casks, extra_brew_args=['cask'])
  File "/Users/mortimer/Projects/gecko/python/mozboot/mozboot/osx.py", line 311, in _ensure_homebrew_packages
    universal_newlines=True).split())
  File "/Users/mortimer/Projects/gecko/python/mozboot/mozboot/base.py", line 443, in check_output
    return subprocess.check_output(*args, **kwargs)
  File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr) 

It seems that the -q option doesn't work well with cask

 brew cask outdated -q
Error: ambiguous option: -q
OS: Unspecified → macOS
Hardware: Unspecified → All
Flags: needinfo?(mstange)
Regressed by: 1624380
Has Regression Range: --- → yes

I hit the same error during mach bootstrap. Using --quiet instead of -q works for me.
Output of man brew-cask:

outdated [--greedy] [--verbose|--quiet] [ token ... ]
              Without  token  arguments,  display  all  the installed Casks that have newer versions available in the tap; otherwise
              check only the tokens given in the command line. If --greedy is given then also include in the output the Casks having
              auto_updates true or version :latest. Otherwise they are skipped because there is no reliable way to know when updates
              are available for them.
              --verbose forces the display of the outdated and latest version.
              --quiet suppresses the display of versions.
Assignee: nobody → canaltinova
Status: NEW → ASSIGNED

Created a patch that fixes the issue. Removing Markus' ni request.

Flags: needinfo?(mstange)
Pushed by canaltinova@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5259f7a304fc Change the -q flag of brew cask outdated into --quiet. r=rstewart,mhentges
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78

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

The patch landed in nightly and beta is affected.
:canova, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(canaltinova)

I don't think this is worth uplifting since this only fixes bootstrap and I don't think we use bootstrap for beta development or in the CI. But on the other hand, this is pretty low risk patch to uplift and may fix a problem that 1% of the people will encounter.

Hey Ricky, redirecting the ni to you since I'm not completely sure about uplifting here. What's your opinion on this?

Flags: needinfo?(canaltinova) → needinfo?(rstewart)

Comment on attachment 9145770 [details]
Bug 1635381 - Change the -q flag of brew cask outdated into --quiet. r?mstange

Beta/Release Uplift Approval Request

  • User impact if declined: Prevents bootstrap from being run on macOS entirely (at least, for those using homebrew, which to my knowledge is the large majority of them). mach bootstrap is not really used in CI or real beta development but in my experience some people do try to use it anyway and they're not hesitant to report problems. I think that the latest beta is probably recent enough overall that running bootstrap will still work with the addition of this patch.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This only affects bootstrap; most people doing stuff with beta won't even run this code, and this just fixes a broken series of command line arguments if they do end up running it.
  • String changes made/needed:
Flags: needinfo?(rstewart)
Attachment #9145770 - Flags: approval-mozilla-beta?

So I requested the uplift. As the request says, and as comment 9 noted, this is outside the typical beta dev cycle, so there's an argument for not bothering with the uplift. This week our general approach with beta uplifts has been that if small, extremely low-risk patches can possibly make things better for a small subset of people, it's probably worth it. Might as well because this code is clearly broken without the patch and somebody COULD conceivably get use out of it, basically.

Comment on attachment 9145770 [details]
Bug 1635381 - Change the -q flag of brew cask outdated into --quiet. r?mstange

Low risk and already broken, uplift approved for beta 6, thanks.

Attachment #9145770 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: