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

Replacing tar with tar --no-xattrs to make mac continue to work with Docker version > 4.26 #11

Open
wants to merge 13 commits into
base: databricks
Choose a base branch
from

Conversation

kevinqian-db
Copy link

@kevinqian-db kevinqian-db commented Oct 23, 2024

Context: https://databricks.atlassian.net/browse/ES-1094678

How to test:

  • Docker desktop (macOS) update to v4.27
  • Checkout the test version of rules_docker in your local universe
# Go to universe WORKSPACE file and update to
http_archive(
    name = "io_bazel_rules_docker",
    patch_args = ["-p1"],
    patches = ["//bazel/patches:io_bazel_rules_docker.six-1.9.patch"],
    # This might need to be changed locally if you have error pulling. macOS might tamper with its sha, so download the zip locally yourself first and run sha256sum on it to get the sha to be copied here
    sha256 = "0b23460c018678a8d646101762bd29dbfbb7224ab89221edb5a2bff13b5fc857",  # <-- changed
    strip_prefix = "rules_docker-3243fd53c0a12036741d6f7ce4e254bf48419708",  # <-- changed
    urls = [
        # Github supports downloading zip like this using a commit.
        "https://github.com/databricks/rules_docker/archive/3243fd53c0a12036741d6f7ce4e254bf48419708.zip", # <-- changed
    ],
)

# Go to universe .bazeldownloader file and temporary replace
block *
# With the following
allow github.com
# So we can fetch from Github the zip for testing.
  • Run bazel run //docker-images/tidb:tidb-all-in-one-brickstore_binary_loader.

Before:

$ bazel run //docker-images/tidb:tidb-all-in-one-brickstore_binary_loader
...
lsetxattr com.apple.provenance /db0e59396abbd3cd3136c376a49a947aa8022c8927d2f6d383c26ee5b07d6864.tar: operation not supported
tar: Write error

After:

$ bazel run //docker-images/tidb:tidb-all-in-one-brickstore_binary_loader
...
8264e3874cd42cb149ae14655ff843863eab76d2c5c61a1c742e6676019ce460%

Also double check you can run the image without problem.

@kevinqian-db kevinqian-db force-pushed the kevinqian-db/mac-tar-xattr branch 14 times, most recently from ef34ed4 to 8559d69 Compare October 24, 2024 01:47
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.

1 participant