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

[Refactor] Sources with subpaths are not optimal #364

Open
1 task
cpuguy83 opened this issue Sep 4, 2024 · 0 comments
Open
1 task

[Refactor] Sources with subpaths are not optimal #364

cpuguy83 opened this issue Sep 4, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@cpuguy83
Copy link
Member

cpuguy83 commented Sep 4, 2024

Expected Behavior

No response

Actual Behavior

When we have a Source with a subpath added we are, in most cases, performing a copy to shift the root of the state to that subpath.

E.g. if we have a source:

sources:
  src:
    path: some/path
    context: {}

We first fetch the source, e.g. llb.Local("context", ...) and then we have to llb.Scratch().File(llb.Copy(st, "some/path")).

However, we don't really need to shift the root of these states like this if we provide a higher level abstraction than just an llb.State.
We would be able to, in most cases, use a mount with a subpath which is much cheaper and plumb that through to all the various parts that want the state.

Steps To Reproduce

No response

Are you willing to submit PRs to contribute to this bug fix?

  • Yes, I am willing to implement it.
@cpuguy83 cpuguy83 added the bug Something isn't working label Sep 4, 2024
@cpuguy83 cpuguy83 added this to the vNext milestone Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant