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

Support chunk dependencies on other chunks #44

Open
tculp opened this issue Feb 27, 2022 · 4 comments
Open

Support chunk dependencies on other chunks #44

tculp opened this issue Feb 27, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@tculp
Copy link

tculp commented Feb 27, 2022

I would like to specify when a chunk requires another chunk. For example, if I want to have multiple chunks which install independent s6-init services, I don't want to have to install and configure s6 separately in each chunk.

It would be great if I could have an s6 chunk, and then several other chunks which just install tools and setup the service files to run them.

This could be performed through the chunk.yaml file which could look something like:

dependencies:
  chunks:
    - s6-init

This could perform either by automatically adding the s6-init chunk to any combinations specifying the current chunk, or by throwing an error if all dependent chunks have not been specified.

@utam0k
Copy link
Contributor

utam0k commented Feb 28, 2022

@tculp Hi, first of all, thanks for rising this PR. dazzle has a function to set the base image. Could you use this instead?
e.g.

@utam0k utam0k added the enhancement New feature or request label Feb 28, 2022
@csweichel
Copy link
Collaborator

Introducing chunk dependencies would mean we'd need to ship that information on the images somehow, so that we can support combinations without the dazzle.yaml in the future. Not a problem, just something to consider.

Dependencies would be reasonably straight forward to implement: we'd flatten the dependency DAG and just end up with a flat list of chunks afterwards.

Today we already support one combination referring to another combination, but afaik we're not using that feature.

@tculp
Copy link
Author

tculp commented Apr 24, 2022

@utam0k That wouldn't really solve the problem, because there may not be an image that has that (combination of) dependency(ies) to use as base, hence why we'd be using dazzle in the first place.

@csweichel I think it could be done without adding that information to the images, just with the caveat of it assumes the dependencies will all be pulled in while the dazzle.yaml is available

@csweichel
Copy link
Collaborator

it assumes the dependencies will all be pulled in while the dazzle.yaml is available

We will need to be able to build dazzle images from the chunks alone, in absence of the the dazzle.yaml file. I think adding this information as OCI annotations would be reasonably straight forward.

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

No branches or pull requests

3 participants