Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible fails to launch with dependency error since last upgrade #153763

Closed
4 tasks done
DocEmmetBrown opened this issue Nov 9, 2023 · 5 comments · Fixed by #154196
Closed
4 tasks done

Ansible fails to launch with dependency error since last upgrade #153763

DocEmmetBrown opened this issue Nov 9, 2023 · 5 comments · Fixed by #154196
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age

Comments

@DocEmmetBrown
Copy link

DocEmmetBrown commented Nov 9, 2023

brew gist-logs <formula> link OR brew config AND brew doctor output

gist-logs ansible
Error: No logs.

brew config
HOMEBREW_VERSION: 4.1.19-27-gfd6d412
ORIGIN: https://github.com/Homebrew/brew
HEAD: fd6d412b01b13fec848e933e4f9f2f85f8a5f544
Last commit: 12 hours ago
Core tap JSON: 09 Nov 12:51 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: dodeca-core 64-bit arm_blizzard_avalanche
Clang: 15.0.0 build 1500
Git: 2.42.1 => /opt/homebrew/bin/git
Curl: 8.1.2 => /usr/bin/curl
macOS: 14.1.1-arm64
CLT: 15.0.0.0.1.1694021235
Xcode: 15.0.1
Rosetta 2: false

brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  openssl@1.1
  packer

Verification

  • My "brew doctor output" says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

Just run ansible, or ansible-playbook

What happened (include all command output)?

 ~ ansible
ERROR: No module named 'markupsafe'
 ~ ansible-playbook
ERROR: No module named 'markupsafe'

What did you expect to happen?

I would expect ansible to not fail :)

Step-by-step reproduction instructions (by running brew commands)

it happened following the upgrade `ansible 8.6.0 -> 8.6.0_1`, with the regular `brew upgrade`, on latest MacOS, on a M2 Mac.
I could also reproduce the problem on another Mac, with the same specs.
@DocEmmetBrown DocEmmetBrown added the bug Reproducible Homebrew/homebrew-core bug label Nov 9, 2023
@SMillerDev
Copy link
Member

Probably Homebrew/brew#16152

@artpropp
Copy link

artpropp commented Nov 10, 2023

This seems to be related to the Python 3.12 upgrade in formula... see commit history for formula: https://github.com/Homebrew/homebrew-core/commits/2c2b8c195ea0d28ff1ff43215308bd0563b94564/Formula/a/ansible.rb

Unfortunately all related dependencies (i.e. packages like python-markupsafe) were before that installed with in my case Homebrew Python 3.11.6

Solution for me was:

brew remove ansible python-markupsafe #and probably some other related dependencies
brew install ansible # which then installed all the appropriate dependencies within the new Python scope

@todeveni
Copy link
Contributor

Fixed for me by first uninstalling markupsafe and ansible and then installing ansible back (which pulls markupsafe)

brew uninstall python-markupsafe ansible && brew install ansible

@DocEmmetBrown
Copy link
Author

Thanks @todeveni , I can now run ansible again.

@cho-m
Copy link
Member

cho-m commented Nov 13, 2023

There are 2 places that can cause issue for users:

  1. homebrew-core issue - There was no revision bump to python-markupsafe so users did not get update with python@3.12 support - should hopefully be fixed with python-tabulate: revision bump for python@3.12 support #154145 python-markupsafe: revision bump for python@3.12 support #154196
  2. brew issue - Some installs/upgrades didn't automatically upgrade revision bumps. Should already be fixed now that Store and use revision in tab runtime dependencies brew#16152 is merged and in brew release.

@github-actions github-actions bot added the outdated PR was locked due to age label Dec 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants