Giter Club home page Giter Club logo

Comments (4)

AlanCoding avatar AlanCoding commented on August 21, 2024 1

@kdelee test coverage in

def test_collection_system_requirement(cli, container_runtime, ee_tag, tmpdir, data_dir):

and

def test_user_system_requirement(cli, container_runtime, ee_tag, tmpdir, data_dir):

from ansible-builder.

AlanCoding avatar AlanCoding commented on August 21, 2024

This is implemented for a user's file, but not yet for collecting bindep files from collections themselves.

from ansible-builder.

AlanCoding avatar AlanCoding commented on August 21, 2024

Also need to update the README.md

from ansible-builder.

AlanCoding avatar AlanCoding commented on August 21, 2024

Updating and documenting this issue...

We merged #52 which addressed this for user-specified bindep file, meaning the execution-environment.yml file had an entry system: bindep.txt in it. The WIP #59 addresses it for collections. Here is where I'm at with that, the flow loosely reflects the order in which my own thought process shaped up.

The aggressive proposal is most similar to how the similar problem for python requirements was addressed in #57. However, I would, right away, push against this option because bindep stuff has fairly different issues from python stuff. We for bindep, we only really need to detect if the final result is blank or not blank. Including entries which are obviously not relevant isn't a problem, and it's kind of part of the design. Not mentioned here - we may still like to scrub a combined bindep.txt file for literal duplicates, because this case will occur commonly in the existing collections, like python3-devel [test platform:rpm], which is copy+pasted for several collections like frr.frr, arista.eos, and many others.

My preference is clearly the in-between proposal.

Current PR:

  • in introspect script, exclude lines which are blank or have "test" in them, only "count" bindep.txt if it's not blank after that
  • introspect script returns bindep.txt file locations
  • Do a single-line RUN layer in Containerfile for each bindep.txt file from user or collections
  • (this can still error if bindep reqs are not relevant to platform)

Agressive proposal:

  • in introspect script, only remove obviously blank lines or comment lines
  • introspect script returns lines from bindep.txt files
  • Add bindep as a requirement of ansible-builder itself
  • import functions from bindep in order to scrub the requirements, remove those which are obviously N/A, test profile in particular
  • builder writes combined bindep.txt to build context
  • Do a single-line RUN layer in Containerfile for single bindep.txt
  • (not airtight, can still error if bindep reqs are not relevant to platform)

In-between proposal:

  • in introspect script, only remove obviously blank lines or comment lines
  • introspect script returns lines from bindep.txt files
  • builder writes combined bindep.txt to build context (will contain test profile lines, don't care)
  • use multiple RUN layers to install that single bindep.txt file:
    • pipe bindep result to intermediate requirements file
    • have some conditional inside Containerfile itself to only run dnf if intermediate requirements file is not blank

Verbose proposal:

  • same as in-between proposal, but don't bother combining bindep.txt, have multiple lines for each collection bindep.txt file

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.