-
Notifications
You must be signed in to change notification settings - Fork 23
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
Adopt bzlmod to build the repository #77
Conversation
b1cbf2e
to
7917ec9
Compare
@rmohr this is ready for a review, it looks bigger than it is because of all of the e2e tests with different mode and repetated files. I can split it into smaller PRs if you want, but I think it's worth to review as whole |
Ping @rmohr |
8cd688b
to
e8ad817
Compare
The repository uses bzlmod to build, getting all it's external dependencies through bzlmod instead of the WORKSPACE
Stop waisting valuable CI time in protoc building
Prebuilts are now handled differently and require a proper release process, in order to allow forks to also release we need to consume GITHUB_REPOSITORY while rendering the repo files. To build our binary and provide a prebuilt for those consuming over bzlmod, then we need a better repository structure. Change the release process, which is now heaviliy inspired in https://github.com/aspect-build/bazel-lib which also provides a few prebuilt golang binaries
Adding a tag that allows to expose an rpm file, similar to the approach we have in WORKSPACE mode
Adding the bzlmod to our CI tests
e8ad817
to
f9fe1e4
Compare
Adding tests that build the bazeldnf binary before doing it's work
Introducing a proxy repository to make it easier to consume rpms by not polluting the public repository namespace
Adding a very basic lock file support, we don't generate the lock file yet, this will come in the future. It allows reducing complexity from MODULE.bazel though
Now gazelle can handle skylib targets, which are used by stardoc
Now we can generate the markdown files describing our interface from our code
When consuming bazeldnf most of the time users don't want to build the binary
The release script had a typo
CI was pulling the wrong binary name, artifacts have a version prefix
My version string had a v prefixed which was wrong
The release workflow is spending more time in updating the cache than building, and there's no benefit as consecutive builds will get a different cache anyway
f9fe1e4
to
57e5310
Compare
@genert FYI I'm already using bazeldnf through bzlmod with:
This is enough to start getting it tested while we get Roman's attention again |
ping @rmohr, maybe you're back from holidays now? |
Excellent! Thanks so much! |
Introducing bzlmod support to the repo. For bzlmod we don't support Bazel < 6.
We expose a basic extension so others can start using bazeldnf. We provide a legacy mode that has a lot of RPM information on MODULE.bazel and exposes 1 bazel repository per RPM, then there's another non legacy mode where we provide a proxy repository to reduce some complexity out of MODULE.bazel and finally there's a mode with a json lock file to move all the RPM tracking into a non starlark file. We don't provide yet a way to generate such lock file. All this modes get an e2e test.
On top of this we also allow to use a prebuilt and non prebuilt bazeldnf binary. When building the binary if we're in bazel 7+ then we use a prebuilt protoc which speeds up the build considerably.
Here's a sample of the release CI artifacts pipeline
This builds on top of #76