feat: add target-based tar toolchain support#1180
Closed
sfc-gh-dbieliaiev wants to merge 17 commits intobazel-contrib:mainfrom
Closed
feat: add target-based tar toolchain support#1180sfc-gh-dbieliaiev wants to merge 17 commits intobazel-contrib:mainfrom
sfc-gh-dbieliaiev wants to merge 17 commits intobazel-contrib:mainfrom
Conversation
* chore: add windows_arm64 support to yq * Update docs to fix tests
…zel-contrib#1116) * chore(deps): update bazel-contrib/publish-to-bcr action to v0.2.2 * Update publish.yaml --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Eagle <alex@aspect.dev>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update coreutils to v0.1.0 Triggered by bazel-contrib/rules_oci#826 * Update docs
…rib#1137) * windows fixes * update * green root tests for windows * enable another test on windows * enable coreutils tests on windows * fix comment * fix issue during copy_directory_toolchain analysis * remove workaround * lint fix * disable 4 tests on windows * disable two incompatible tests on windows * bazel 8 fixes * add noshow_progress to ci jobs * fix windows/bazel7 * bump skylib 1.8.1 and disable one bats test * tidy * fix presubmit * align bcr patches to go bump * Update BUILD.bazel * Apply suggestions from code review * update e2e versions to match root * lock onto current go1.22.7 * Update go.mod * update patches --------- Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Also enable macOS and Windows tests for all PRs. Work towards bazel-contrib#1146
…ontrib#1153) Users might dereference this toolchain and then use it directly - but without a MODULE.bazel dep on @tar.bzl this breaks the abstraction. They need an alias instead. Fixes issue observed in rules_distroless.
…trib#1127) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [bazel-contrib/.github](https://redirect.github.com/bazel-contrib/.github) | action | patch | `v7.2.2` -> `v7.2.3` | --- ### Release Notes <details> <summary>bazel-contrib/.github (bazel-contrib/.github)</summary> ### [`v7.2.3`](https://redirect.github.com/bazel-contrib/.github/compare/v7.2.2...v7.2.3) [Compare Source](https://redirect.github.com/bazel-contrib/.github/compare/v7.2.2...v7.2.3) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/bazel-contrib/bazel-lib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS40MC4wIiwidXBkYXRlZEluVmVyIjoiNDEuNDAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Attempting to use this repo with bazel 6.4.1 results in: ``` ERROR: https://bcr.bazel.build/modules/rules_jvm_external/6.1/MODULE.bazel:89:13: name 'use_repo_rule' is not defined ERROR: Error computing the main repository mapping: in module dependency chain <root> -> aspect_bazel_lib@2.21.0 -> stardoc@0.7.1 -> rules_jvm_external@6.1: error executing MODULE.bazel file for rules_jvm_external@6.1 ``` Document the minimum requirement of bazel 6.5.0. This is already configured in the CI matrix.
…zel-contrib#1162) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [bazel-contrib/publish-to-bcr](https://redirect.github.com/bazel-contrib/publish-to-bcr) | action | patch | `v0.2.2` -> `v0.2.3` | --- ### Release Notes <details> <summary>bazel-contrib/publish-to-bcr (bazel-contrib/publish-to-bcr)</summary> ### [`v0.2.3`](https://redirect.github.com/bazel-contrib/publish-to-bcr/releases/tag/v0.2.3) [Compare Source](https://redirect.github.com/bazel-contrib/publish-to-bcr/compare/v0.2.2...v0.2.3) #### What's Changed - chore(deps): update dependency typescript-eslint to v8.35.0 by [@​renovate](https://redirect.github.com/renovate)\[bot] in [#​285](https://redirect.github.com/bazel-contrib/publish-to-bcr/pull/285) - docs: link to gh workflow examples in rules template by [@​kormide](https://redirect.github.com/kormide) in [#​289](https://redirect.github.com/bazel-contrib/publish-to-bcr/pull/289) - feat: fill substitutions in source.json#docs\_url by [@​alexeagle](https://redirect.github.com/alexeagle) in [#​290](https://redirect.github.com/bazel-contrib/publish-to-bcr/pull/290) - chore: update workflow to point to latest action sha by [@​kormide](https://redirect.github.com/kormide) in [#​291](https://redirect.github.com/bazel-contrib/publish-to-bcr/pull/291) **Full Changelog**: <bazel-contrib/publish-to-bcr@v0.2.2...v0.2.3> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/bazel-contrib/bazel-lib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS44Mi43IiwidXBkYXRlZEluVmVyIjoiNDEuODIuNyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Otherwise the data of the expand_template has to be repeated on dependents Fixes https://github.com/r0bobo/rules-py-datafiles-reproducer
Introduces a new target_tar_toolchain_type and registers target-based tar toolchains alongside the existing exec-based ones. This enables tar operations that need to be aware of the target platform rather than just the execution platform. - Add new toolchain_type 'target_tar_toolchain_type' in lib/BUILD.bazel - Create target toolchain registration using target_compatible_with in tar_toolchain.bzl - Register both exec and target toolchains in repositories.bzl
Member
|
I think that this is the right solution to the problem in rules_oci. But most of the tar functionality has been moved out into https://github.com/bazel-contrib/tar.bzl, so new toolchain types should probably be added there instead. |
Member
Collaborator
|
Agreed, as I understand it, tar.bzl should add support for toolchain compatibility exec vs. target. Could you transfer the PR over there? This repo is dropping the code you changed (the 3.x branch should become the main branch shortly) |
Author
|
@alexeagle @fmeum Thanks for responses, will make a PR there. Could you please also point me to the issue where you track migration of rules_oci to tar.bzl toolchain? |
Author
|
Submitted a PR into tar.bzl so closing this PR |
alexeagle
pushed a commit
to bazel-contrib/tar.bzl
that referenced
this pull request
Oct 2, 2025
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'd like to help with solving cross-platform remote execution issue described in bazel-contrib/rules_oci#769. The description of the issue and proposal are in bazel-contrib/rules_oci#844 PR. I'd like to get your opinion on approach before submitting changes ready for merge.