-
Notifications
You must be signed in to change notification settings - Fork 97
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
Malformed bindep.txt files do not halt execution #90
Comments
Issue was filed upstream for Ping @pabelanger, this can create situations which are really difficult to debug. I mainly hit it where it would error without a trailing newline at the end of the input bindep.txt file (but there are many other things that can go wrong, from collection bindep.txt files). It keeps running deep into the build process because there's no indicator to alert the code to the error (meaning of return code is overloaded for other purpose), and by the time it does error it is a nightmare to figure out. This is a big part of the reason we write the intermediary files like |
I'm increasingly thinking that the best solution is to make if depends is None:
depends = bindep.depends.get_depends(args.filename)
if not depends:
return 1
if args.profiles:
logging.info("Platform profiles:")
for profile in depends.platform_profiles():
logging.info("%s", profile)
logging.info("")
logging.info("Configuration profiles:")
for profile in depends.profiles():
logging.info("%s", profile)
return 0 The cases which are actually painful for us look like fairly intentional return 1 or 0 cases in code, and we could error handle just fine if we were doing this in python, IMO. But now we're calling this via the |
I am likely to combine this with #201 |
Hmm, I think I also encountered that: https://github.com/ansible-collections/community.sops/runs/6039420137?check_suite_focus=true I had URLs in my bindep.txt file, which made bindep barf, but the build process just continued and ended with |
See #89
We don't know how to determine of the
bindep
CLI command is successful in finding the missing deps, or if it has erred.The text was updated successfully, but these errors were encountered: