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

Failing to find ansible-build-data fails while exiting 0 #418

Closed
dmsimard opened this issue Apr 26, 2022 · 2 comments · Fixed by #442
Closed

Failing to find ansible-build-data fails while exiting 0 #418

dmsimard opened this issue Apr 26, 2022 · 2 comments · Fixed by #442

Comments

@dmsimard
Copy link
Contributor

I had -e antsibull_data_reset=false when running the role but ansible-build-data had not been checked out yet so it failed with the following error:
/home/dmsimard/dev/git/ansible-community/antsibull/build/ansible-build-data/5 must be an existing directory

The role continued because antsibull exit 0 instead of 1, though.
It was recorded by ara here: https://demo.recordsansible.org/results/780862.html

@felixfontein
Copy link
Collaborator

When reporting xxx must be an existing directory antsibull exists with error code 2. But it depends on how it is run, apparently. When installed with pip, this works fine. But when run with poetry run, it returns 0, because the binary created by poetry calls main() from antsibull.cli.antsibull_build - which does not call sys.exit() but simply returns the value. The script created by pip calls main() as well, but explicitly runs sys.exit() on its result.

When seaching a bit, I found this: https://packaging.python.org/en/latest/specifications/entry-points/#use-for-scripts and it suggests that poetry is doing something wrong. This was actually reported in python-poetry/poetry#4453, and fixed in python-poetry/poetry#4456 Unfortunately, this fix is only contained in poetry 1.2.0b1 so far...

Anyway, this is another reason to get #417 merged ASAP and remove the role's dependency on poetry ASAP :)

@felixfontein
Copy link
Collaborator

This one should be effectively fixed (at least when using the role) since #420 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants