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

missing provenance for fuqamtlkfg8ef41sv5ivh9bn6 #6125

Closed
nicks opened this issue May 25, 2023 · 3 comments · Fixed by #6141
Closed

missing provenance for fuqamtlkfg8ef41sv5ivh9bn6 #6125

nicks opened this issue May 25, 2023 · 3 comments · Fixed by #6141
Assignees
Labels
bug Something isn't working

Comments

@nicks
Copy link
Member

nicks commented May 25, 2023

We've received a report of buildkit on Docker 24 returning this error when running under tilt:

Build Failed: ImageBuild: missing provenance for fuqamtlkfg8ef41sv5ivh9bn6

we haven't been able to reproduce the problem. buildkit-team pointed us at moby/buildkit#3562 but i can't think of a way you could even tell tilt to build multi-arch image.

filing for now to see if we get other reports and/or a repro case.

@nicks
Copy link
Member Author

nicks commented Jun 2, 2023

we have repro steps! thanks @AceFire6 - #6130

@nicks
Copy link
Member Author

nicks commented Jun 2, 2023

OK, i think i understand the basic bug:

  • The Docker CLI ensures that you pass in a directory as a context. If you try to pass in a directory that doesn't exist, you will get an error ERROR: unable to prepare context: path X not found
  • Tilt does not work this way. If you try to pass in a directory that doesn't exist to tilt, it will build fine. It treats that as an non-existent context.
  • As of Docker 24, Buildkit has a regression where if you pass in an non-existent build context, you get cryptic provenance errors.

In the short term, you can workaround this by making sure that docker_build(tag, context) always sets context to a real directory.

in the medium term, I think we should change the tilt build behavior to more closely match the docker cli behavior:

  • passing in a non-existent directory should be an error
  • passing "-" as the context should give you an empty context

@nicks
Copy link
Member Author

nicks commented Jun 2, 2023

filed upstream as moby/buildkit#3928

@nicks nicks self-assigned this Jun 9, 2023
nicks added a commit to nicks/tilt that referenced this issue Jun 9, 2023
Before this change, if you specified a directory that doesn't
exist as your docker_build context, you would get an empty build context.

After this change, if you specify a directory that doesn't exist,
you get a build-time error. You can use "-" to specify an empty build context.

this is a breaking change, but i think makes us more consistent with
how the docker cli works.

fixes tilt-dev#3897
fixes tilt-dev#6125
nicks added a commit to nicks/tilt that referenced this issue Jun 9, 2023
Before this change, if you specified a directory that doesn't
exist as your docker_build context, you would get an empty build context.

After this change, if you specify a directory that doesn't exist,
you get a build-time error. You can use "-" to specify an empty build context.

this is a breaking change, but i think makes us more consistent with
how the docker cli works.

fixes tilt-dev#3897
fixes tilt-dev#6125

Signed-off-by: Nick Santos <nick.santos@docker.com>
nicks added a commit to nicks/tilt that referenced this issue Jun 9, 2023
Before this change, if you specified a directory that doesn't
exist as your docker_build context, you would get an empty build context.

After this change, if you specify a directory that doesn't exist,
you get a build-time error. You can use "-" to specify an empty build context.

this is a breaking change, but i think makes us more consistent with
how the docker cli works.

fixes tilt-dev#3897
fixes tilt-dev#6125

Signed-off-by: Nick Santos <nick.santos@docker.com>
nicks added a commit that referenced this issue Jun 12, 2023
Before this change, if you specified a directory that doesn't
exist as your docker_build context, you would get an empty build context.

After this change, if you specify a directory that doesn't exist,
you get a build-time error. You can use "-" to specify an empty build context.

this is a breaking change, but i think makes us more consistent with
how the docker cli works.

fixes #3897
fixes #6125

Signed-off-by: Nick Santos <nick.santos@docker.com>
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

Successfully merging a pull request may close this issue.

1 participant