moby / moby/moby

mergeop/diffop not working properly with Moby worker

Open
#45,111 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/builder area/builder/buildkit kind/bug version/23.0
Dominant language
Go
Stars
72.1k
Forks
19.2k
Avg merge
1d 18h
Merged PRs (30d)
164

Description

Description

Issue was reported in docker slack involving missing filecaps after using COPY --link:

image image image image image

While the specific issue was fixed in https://github.com/moby/buildkit/pull/3671 , the reason it appeared in Moby and not in regular buildkit is that there seems to be an issue with the way images are created from the merge/diff references. While the correct behavior is to export the original individual layers, Moby exports the merge base snapshot. This isn't correct and doesn't have the cache semantics that merge/diff is supposed to promise. I think it may also cause failed cache imports when using --cache-from with such images.

@sipsma

Reproduce

Use COPY --link with 23.0

Expected behavior

No response

docker version
-
docker info
-
Additional Info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start by reproducing the issue with COPY --link on Docker 23.0 and compare Moby's image creation from merge/diff references with regular BuildKit; done when individual original layers are exported and cache semantics remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.