-
-
Notifications
You must be signed in to change notification settings - Fork 202
fix: Use target tar toolchain for cross-platform execution #844
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
fix: Use target tar toolchain for cross-platform execution #844
Conversation
|
|
I'd like to fix these issues as well, i just don't see a good way going forward. I thought |
|
@thesayyn Do you have objections against using target toolchain and more in favor of going with toolchain exec groups attribute? I'm not exactly sure how's it going to work(don't have an experience with execution groups) so it might be more elegant solution but if I understand correctly nobody is sure that it's going to work. On the other side target toolchain is a proven solution(although is not fancy), that might be a good idea to implement as a short term mitigation of this issue. Also I encourage @alexeagle and @fmeum to join discussion here as there were comments in related PR with opinions that this solution makes sense. |
|
There are no correct fancy alternatives. If we started again from scratch, a simpler alternative would have been to only offer toolchains with |
This PR is a follow-up to bazel-contrib/bazel-lib#1180 which is supposed to help with the issue described in bazel-contrib/rules_oci#769. The description of the issue and proposal are in bazel-contrib/rules_oci#844 PR. CC @alexeagle @fmeum
|
@fmeum @thesayyn @alexeagle I'm not sure where the migration to tar.bzl is being tracked, but I did some work related to this in scope of this PR. |
Addresses remote execution failures when host != exec platform. Related to bazel-contrib#769
5447010 to
f04538c
Compare
|
@thesayyn @alexeagle @fmeum I noticed that #854 was merged recently so I rebased my PR and all tests are green now. Could you please consider to accept this PR so we can resolve the issue? |
thesayyn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me

Hi @thesayyn, @alexeagle.
I'd like to help solve the cross-platform remote execution issue described in bazel-contrib/rules_oci#769, which significantly affects us. I see this is connected to the fundamental Bazel limitation described in bazelbuild/bazel#19645.
I've noticed that a similar issue was addressed for crane and yq toolchains in bazel-contrib/rules_oci#590, but the same transition-based solution for tar toolchain (bazel-contrib/rules_oci#762) got stuck because it doesn't work well in other cases.
Proposal
I'm suggesting to use target_toolchain which was recently implemented instead of toolchain to determine it correctly. As a prerequisite we need to migrate to tar.bzl.
Changes summary
aspect_bazel_lib/tar.bzl