-
-
Notifications
You must be signed in to change notification settings - Fork 112
feat: add target-based tar toolchain support #1180
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
feat: add target-based tar toolchain support #1180
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 <[email protected]>
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 <[email protected]>
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> -> [email protected] -> [email protected] -> [email protected]: error executing MODULE.bazel file for [email protected] ``` 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
|
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. |
|
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) |
|
@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? |
|
Submitted a PR into tar.bzl so closing this PR |
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
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.