GithubHelp home page GithubHelp logo

Comments (4)

AlanCoding avatar AlanCoding commented on May 19, 2024

Issue was filed upstream for bindep here https://storyboard.openstack.org/#!/story/2008049

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 bindep_combined.txt - because this file might contain an error dump from the bindep CLI, and there's no way for the user to know. I would say that assemble becomes obligated to handle these errors, but I honestly don't think it can because this is a pretty fundamental problem.

from ansible-builder.

AlanCoding avatar AlanCoding commented on May 19, 2024

I'm increasingly thinking that the best solution is to make ansible-builder depend on bindep as a python package and call it directly in code.

    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 assemble script, and this leads back to my idea that we may be better off to combine those with introspect to create multiple documented tools with a CLI to go with them.

from ansible-builder.

AlanCoding avatar AlanCoding commented on May 19, 2024

I am likely to combine this with #201

from ansible-builder.

felixfontein avatar felixfontein commented on May 19, 2024

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 Complete!. (Obviously the dependency wasn't in the EE image and thus the tests expecting it to be there failed...)

from ansible-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.