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

[Bug]: tar mtree should expand treeartifacts automatically #625

Closed
thesayyn opened this issue Oct 18, 2023 · 4 comments
Closed

[Bug]: tar mtree should expand treeartifacts automatically #625

thesayyn opened this issue Oct 18, 2023 · 4 comments
Labels
bug Something isn't working untriaged Requires traige

Comments

@thesayyn
Copy link
Collaborator

What happened?

Currently, only treeartifacts root directory is added as directory without the contents. bsdtar doesn't automatically expand directories, this should be done beforehand.

Version

Development (host) and target OS/architectures:

Output of bazel --version:

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

Language(s) and/or frameworks involved:

How to reproduce

No response

Any other information?

No response

@thesayyn thesayyn added the bug Something isn't working label Oct 18, 2023
@github-actions github-actions bot added the untriaged Requires traige label Oct 18, 2023
@thesayyn
Copy link
Collaborator Author

It will fail horribly with following error;

Error reading archive bazel-out/darwin_arm64-opt/bin/lib/tests/tar/_transform.mtree.txt: mtree specification has different type for package/pkg

@mvgijssel
Copy link

Running into issue in vgijssel/setup#544, where I'm trying to package up a py_binary with deps coming from https://github.com/jvolkman/rules_pycross. That rule set outputs a package as a single directory (instead as separate file) as can be seen here https://github.com/jvolkman/rules_pycross/blob/c6923332dacb3ef5c4df172155be526981a140ab/pycross/private/wheel_library.bzl#L8.

The error I'm getting:

ERROR: /Users/maarten/Development/setup/tools/bunq2ynab/BUILD.bazel:116:9: Tar tools/bunq2ynab/bunq2ynab_image_python_layer.tar failed: (Exit 1): tar failed: error executing command (from target //tools/bunq2ynab:bunq2ynab_image_python_layer) external/aspect_bazel_lib~2.0.0-rc0~toolchains~bsd_tar_host/tar --create --file bazel-out/darwin_arm64-fastbuild-ST-59894ec379d6/bin/tools/bunq2ynab/bunq2ynab_image_python_layer.tar ... (remaining 1 argument skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
tar: Error reading archive bazel-out/darwin_arm64-fastbuild-ST-59894ec379d6/bin/tools/bunq2ynab/bunq2ynab_image_python_layer_mtree_prefixed.txt: mtree specification has different type for opt/tools/bunq2ynab/bunq2ynab.runfiles/pdm-setup/deps/requests_2.31.0
tar: Error exit delayed from previous errors.
Target //tools/bunq2ynab:bunq2ynab_image_run failed to build
Use --verbose_failures to see the command lines of failed build steps.

@mvgijssel
Copy link

I think this is actually fixed by #630! Using bazel_dep(name = "aspect_bazel_lib", version = "2.0.0-rc1") solves it for me 🎉

@thesayyn
Copy link
Collaborator Author

fixed by #630

@github-project-automation github-project-automation bot moved this to ✅ Done in Open Source Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged Requires traige
Projects
None yet
Development

No branches or pull requests

2 participants