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

Nested LLB invocation support #83

Merged
merged 1 commit into from
Jul 26, 2017

Conversation

tonistiigi
Copy link
Member

@tonistiigi tonistiigi commented Jul 22, 2017

Adds a buildOp for nested builder invocation. Currently only nested llb is supported. In the end, this feature should be used with frontends.

Example:

go run ./examples/nested-llb/main.go | buildctl  build

This builds buildctl binary for all the currently open PRs for buildkit. The main.go script itself doesn't access github for getting the list of current PRs, that is done in a build step as well.

This is WIP. Some things are not working yet like detecting duplicate vertex statuses for progress. I added the required llb pkg methods with quick copy/paste from exec. I think this package needs some refactoring as ideally something like a nested build step would not be defined there at all, instead the package should be extendable so custom implementations with own marshal functions can be added. Done

@AkihiroSuda
Copy link
Member

Interesting feature, do you have more usecases?

@tonistiigi
Copy link
Member Author

@AkihiroSuda The usecases are:

  • code reuse without copy/paste. Common cases can be written once, shared publicly and just referred inside build definition
  • subcomponents/subprojects can define how they are built. For example if a dependency has a Dockerfile we can build it from that directly.
  • detecting and generating build definition from the source

The current example is just something that can be easily verified and didn't require any new tooling. I don't think anyone would actually build go from source to generate the definitions.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi changed the title wip: Nested LLB invocation support Nested LLB invocation support Jul 25, 2017
@tonistiigi
Copy link
Member Author

@AkihiroSuda I've fixed the issues and removed the WIP label

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need consideration for #81 but lets merge this PR first.
LGTM.

@AkihiroSuda AkihiroSuda merged commit 24eeb9d into moby:master Jul 26, 2017
alexcb pushed a commit to alexcb/buildkit that referenced this pull request Jul 14, 2022
Expose GC analytics in ListWorkers call
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.

None yet

2 participants