Open hlopko opened 5 years ago
CC @jayconrod for more ideas :)
cc @philwo
cc @aiuto @dslomov
EngProd already has plans to add release capabilities to Bazel CI in Q3, especially motivated by Bazelisk, Buildtools and Bazel itself. We're happy to address your use cases, too :)
\o/ :)
@fweikert What are the plans?
In case it's useful, rules_go has a release process but little automation. To summarize:
git archive
and uploaded to GitHub and bazel-mirror.I've been exploring packaging techiniques over the last few weeks. I finding myself in favor of not using full archives for releases. Instead we should be providing releases in two packagings.
The first package is interesting because it means you will probably have to refactor rules so that the tests and other packaging are distinct from the core rules. The reason for doing this is to prevent accidental bloat - where your regression tests on your rules bring in more than what is usually needed - possibly even a new language toolchain. At a minimum, complete rules will depend on skydoc to produce documentation, but users do not actually need the docs in practice. You should not have to bring in skydoc just to use the rules.
I have started to organize the pkg_tar/deb/rpm rules that way.. https://github.com/bazelbuild/rules_pkg/tree/master/pkg/distro I am also working on some tools to help generate the text of the release notes page (same folder). One important part is to generate an accurate stanza for someone to include in their WORKSPACE. It should have the correct URL and sha256 values. E.g. https://github.com/bazelbuild/rules_pkg/releases
I will continue to iterate on the release packaging code in rules_pkg until I am happy with it, but it could also go in its own repository.
About packaging for rule users: I've been thinking about something like this for integration testing. There could be some target that packages rules and supporting tools and libraries, then extracts those in a test workspace, invokes bazel commands in that workspace, and verifies the output. I hadn't thought about using that for release artifacts, but it makes sense.
About archives of GitHub tags: be careful not to rely on the SHA-256 sum of GitHub's auto-generated release archives. They may change when GitHub upgrades git, zip, or whatever else. This happened a couple times in 2017, and it broke everyone on old versions. I think it's better to attach the output of git archive
to the release or upload to bazel-mirror.
@aiuto - nit - https://docs.bazel.build/versions/master/skylark/deploying.html#registering-toolchains suggests the name `
I was already planning to not include non-rule related deps and srcs in the release archive, so package 1. I'm all in.
What is 2. archive for? Who will use it? I was not planning to release this package, so I probably miss some use case.
Hello EngProd :)
I see there is a space in the Bazel ecosystem for leadership regarding releasing. Currently we have quite a few repositories that will eventually be members of the federation that don't have releases (rules_cc, rules_java, platforms, rules_foreign_cc ...). Then we have other rules that do have releases, but they've all built their own homegrown tooling around releasing (e.g. rules_go). Benefits:
Since I come from the 'we-don't-yet-have-releases' camp, I might be oversimplifying things, but what I think we need is:
How and where in the process should we deal with release notes?
Thank you all!