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

Detect module dependencies #4

Closed
wants to merge 1 commit into from
Closed

Detect module dependencies #4

wants to merge 1 commit into from

Conversation

kornicameister
Copy link

Order the plan to build the dependencies before
the children

Closes #2

Order the plan to build the dependencies before
the children

Closes #2
@timothyb89
Copy link
Member

Thanks for the patch! A few things that come to mind:

  • we'll need to make sure dockerfile-parse supports multistage builds like we use in kibana (unfortunately I suspect it does not...) or at least behaves reasonably rather than crashing
  • dbuild may try to build images in parallel so just ordering them in the input list may not be enough, I think child images will need to be explicitly be built as child plans of their parent (in build_plan_tree of build.py)
  • like you mentioned in Support image dependencies #2, we will need to replace the FROM ... in child images with the newly-built parent

Actually, that last point might be more complex... just switching around FROMs could be invalid sometimes. To really do this "right" we'd need to somehow make sure we only swap in e.g. monasca/python:2 for some images and not :3. Not totally sure how we'd go about that short of trying to pull metadata from tags like I'd like to do in monasca/pr-bot#17...

@kornicameister
Copy link
Author

kornicameister commented Sep 20, 2017

Are you referring to this part of the code or maybe that. Hard to get a grip there :D

I will try to play around with dbuild here and follow somehow your suggestion.

@kornicameister
Copy link
Author

If I can be serious, after digging deeper inside dbuild I started to feel like this too much for me. Don't get me wrong but I thought it will be a bit simpler. I am leaving my project and I am suppose to work on either simple stuff and complete my open changes.

Sorry, but I guess I have to call it a day and leave that bit for you to handle ;-(

@matrixik you think you could work on this or is it out of your scope as well ?

@timothyb89
Copy link
Member

Heh, yeah, that's totally fair. The complexity is a big part of why I haven't touched on it myself (yet, at least).

I've been thinking more and more that dealing with this build dependencies problem is not really worthwhile on a per-repository basis, to the point that we're just making PRs that change any parent/child modules an error in monasca/monasca-helm#186. From there we can have the pr-bot propose changes automatically, since it has all of the logic for figuring out dependency trees in one place.

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 this pull request may close these issues.

2 participants