Open harapeko opened 3 years ago
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @lukasbestle @mheap click here for bot help
@harapeko Could you please post the output of mas outdated
? It looks like the changes in https://github.com/mas-cli/mas/pull/312 caused it.
@lukasbestle thx!
$ mas outdated
Warning: Identifier 562184107 not found in store. Was expected to identify LanScan Pro.
Warning: Identifier 715768417 not found in store. Was expected to identify Microsoft Remote Desktop.
Warning: Identifier 498944723 not found in store. Was expected to identify JPEGmini.
OK, that explains it. The Ansible mas
module does not expect the Warning
messages that were added in mas-cli
1.8.1.
I consider this a huge breaking change and I'm not sure if the warnings should be supported by the Ansible module or if mas-cli
should instead have a "porcelain" mode that prints the data in a defined format that will never change (like Git does it for example). To be honest I prefer the latter to avoid similar issues in the future.
Pinging @rgoldberg and @phatblat who were engaged in the PR that changed the behavior.
@lukasbestle Thanks for your great research and foresight!
Here's my workaround. Here's how to revert to mas v1.8.0.
$ /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/
$ git checkout a7a97a9818dbbfc299a2d21a4e22921513917052 mas.rb
$ brew uninstall mas
$ brew install mas
$ mas version
1.8.0
The old version of mas outdated
(& mas upgrade
) used a now-broken Apple API that provided the outdated apps, so it hasn't been reporting any apps as outdated for a few years.
The new implementation iterates over the apps in your local App Library, checking each against the version in the store.
If the identifier of an app in your library is not found in the store, mas now outputs a warning. This situation was not possible using the old API, so it's a new warning.
If warnings aren't already output to stderr, maybe they should be switched there. I just used the standard warning function to report them.
Or a nowarn mode could be added to mas.
It would be easy to send warnings to stderr as a quick fix for this.
The output from mas is mainly intended for humans but with tools such as this relying on that format this is a fragile dependency. Been thinking about introducing a JSON output for tools to use in v2. See mas-cli/mas#190
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
Summary
I get an error when updating mas-cli from 1.8.0 to 1.8.1
Issue Type
Bug Report
Component Name
Module mas
Ansible Version
ansible 2.10.6 config file = None configured module search path = ['/Users/harapeko/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /opt/homebrew/Cellar/ansible/3.0.0/libexec/lib/python3.9/site-packages/ansible executable location = /opt/homebrew/bin/ansible python version = 3.9.2 (default, Mar 15 2021, 10:13:36) [Clang 12.0.0 (clang-1200.0.32.29)]
Configuration
mas version 1.8.1
OS / Environment
macOS Big Sur 11.2.3 MacBook Air(M1, 2020) MacBook Pro(M1, 2020)
Steps to Reproduce
Expected Results
source code↓
Actual Results
Code of Conduct