Test patched tar_writer against rules_pkg tests#1060
Draft
aiuto wants to merge 4 commits intobazelbuild:mainfrom
Draft
Test patched tar_writer against rules_pkg tests#1060aiuto wants to merge 4 commits intobazelbuild:mainfrom
aiuto wants to merge 4 commits intobazelbuild:mainfrom
Conversation
- copy from datadog-agent repo - patch `pkg_tar` to use our new version - run the unit tests. - We had to fix the compression tester because the python and Go implementations of gz and xz vary.
aiuto
added a commit
to DataDog/datadog-agent
that referenced
this pull request
Apr 28, 2026
This change creates an enhanced version of tar_writer from rules_pkg. - drop in replacement for the original, generated from the original source as an input - with the added capability to produce an md5sums file - written in Go for increased compression speed - patch rules_pkg to use our writer instead of the default. This is step 1 of several PRs to follow. Some of these may merge if they are small enough. - Create a pkg_deb wrapper which uses this - Apply the wrapper to all the rules in //packages/... **Testing** Patch this back into upstream rules_pkg and see that tests pass - https://github.com/aiuto/rules_pkg/tree/dd_abld_457 - bazelbuild/rules_pkg#1060 **Alternatives considered** 1. upstream this capability to rules_pkg - that requires too much work. The maintainers (me) won't accept this limited fix. - it is a pkg_tar solution only. we would have to do pkg_zip. - it introduces go as a development language. That is a full on breaking change. We would have to first discuss and agree on a technique where the non-python version could be optional. The user would select it as a repo-rule. - an intermediate step would be to refactor pkg_tar so one could write their own, using the guts of pkg_tar_impl. 2. fork our own copy to a new repository - this is feasible. It is heavyweight right now, but we can consider it if other DataDog repos want to use this. 3. write it in Rust instead of Go? - distinctly possible, and we can do it at any time in the future
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.
Test a Go implementation of tar_writer against rules_pkg tests.
pkg_tarto use our new versionDo not submit. This is only to prove that a patch would pass tests.