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

Advice requested: rules_oci and most recent version of Docker Desktop on Mac #509

Closed
simontoens opened this issue Feb 22, 2024 · 11 comments
Closed
Labels
bug Something isn't working

Comments

@simontoens
Copy link

Hi, not sure this is a rules_oci issue, this is just a shot in the dark. Wondering if anybody knows anything about this error we are seeing with the latest Mac Docker Desktop version.

We (developers at our company) were recently required to upgrade our Mac Docker Desktop version to 4.27.2 (to pick up security fixes). All users with older Intel-based Macs are now unable to "bazel run" rules_oci targets. More recent arm64-based Macs seem fine. The error we're seeing is:

setxattr com.apple.provenance /manifest.json: operation not supported

The file path may be different, but usually it is manifest.json.

Downgrading to a lower version of Docker Desktop (below 4.27.0) works, but isn't an option for us (because security requires us to be on the higher Docker version).

Has anybody here seen this? Thank you!

@thesayyn
Copy link
Collaborator

I have never seen that error before. but my educated guess is that it has something to do with how we create tars. When the tarball (oci_tarball) is created on a mac with bsdtar, it will include macos specific xattrs. on linux these are pretty much ignored by gnutar by default --no-xattrs.

Before i can make my conclusions, does this happen after you do bazel run and the tarball is already on the docker daemon but fails during extraction?

@thesayyn
Copy link
Collaborator

Related: #328. Probably will be fixed by #385

@thesayyn thesayyn added the bug Something isn't working label Feb 22, 2024
@simontoens
Copy link
Author

Thanks for the reply @thesayyn. This fails during "bazel run", specifically when executing this cmd in the generated script:

"$CONTAINER_CLI" load --input "$IMAGE"

$CONTAINER_CLI is "docker"

@Strum355
Copy link

Issue has been reported upstream as well moby/moby#47517

@jsn-li
Copy link

jsn-li commented Mar 13, 2024

I'm running into this issue now on an M1 mac.

@jasonschroeder-sfdc
Copy link

bazel clean --expunge and re-build has cleared it up for me so far 🤞

@agirorn
Copy link

agirorn commented Apr 9, 2024

Using bazel clean --expunge does not resolve this for me. Is there no workaround for this on the Mac?

@Strum355
Copy link

Strum355 commented Apr 9, 2024

Fwiw we have worked around this (with rules_oci 1.7.2, aspect-build/bazel-lib 1.40.3 and rules_pkg 0.10.1) with the following patch to rules_oci https://github.com/sourcegraph/sourcegraph/blob/b870d3bc611144b62e43b3af46ddbf68b1b671b6/third_party/rules_oci/no_xattr.patch

@agirorn
Copy link

agirorn commented Apr 10, 2024

Thanks @Strum355.

Do you by any chance, know if there is a similar patch available for rules_docker?
Or is it just time to move over to OCI completely?

@Strum355
Copy link

Do you by any chance, know if there is a similar patch available for rules_docker? Or is it just time to move over to OCI completely?

I've never looked at rules_docker before, so Im afraid I dont know
rules_docker is marked as archived 😅

@thesayyn
Copy link
Collaborator

thesayyn commented May 1, 2024

This is fixed in 2.0 branch by #385

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

6 participants