-
Notifications
You must be signed in to change notification settings - Fork 592
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
bazel: foundation #20849
bazel: foundation #20849
Conversation
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Useful for passing in BOOST_TEST_MODULE=foo to add a main(). Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
The config option `--@seastar//:numa=True` didn't read very intuitively, so changed it to `numactl`. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
exit 1 | ||
fi | ||
|
||
deb_deps=( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For these is where rules-nixpkg/nixpkgs_package
or devenv
/devbox
could be handy in terms of determinism.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah right on. is anyone using these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use devenv
in Cloud to stand up the entire stack in our laptops. DevProd is using devbox
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH it's better to move all tools into Bazel - I don't think that's a huge lift for this list. nixpkg is a fair amount of complexity, and I've had problems with clang toolchains and such not having a good development environment because of all the extra flags they inject to make things hermetic.
Co-authored-by: Mike Boquard <michael@redpanda.com>
The hash changed when a previous commit altered a comment. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really nice, first full round of review/feedback.
use_repo(non_module_dependencies, "numactl") | ||
use_repo(non_module_dependencies, "openssl") | ||
use_repo(non_module_dependencies, "openssl-fips") | ||
use_repo(non_module_dependencies, "rapidjson") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? https://registry.bazel.build/modules/rapidjson
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The published version appears to be too old. I added a note into MODULE.bazel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SG - FWIW you can override the version much like we are doing for the compilation commands database generator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SG - FWIW you can override the version much like we are doing for the compilation commands database generator
i see this pattern, and it always seems super sketchy. like, IIUC, it effectively uses the BUILD files from BCR and source files from whatever version you swap in for the override? i mean, it works fine for a header-only library, assuming that the BUILD uses globbing. Generally I'd want the BUILD to be perfectly in sync with the source...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, maybe we should just be proposing updates upstream. Let me read about how dependency resolution works with non modules
new failures in https://buildkite.com/redpanda/redpanda/builds/51320#01909d77-59ec-4b8b-9a11-2f7f47141d4d:
|
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/51320#01909d77-59f1-43e8-87c2-e6822f584ed6 |
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Also removes an empty dependency list. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
"include/bytes/iobuf.h", | ||
], | ||
strip_include_prefix = "include", | ||
visibility = ["//visibility:public"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW instead of making everything public, you can also make public the default.
package(
default_visibility = ["//visibility:public"],
)
https://bazel.build/reference/be/functions#package
Also at somepoint we probably want to limit visibility, but it's probably fine for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh right. honestly after this PR merges I think it's gonna be open season on evolving the Bazel build. Hopefully we put down a solid foundation!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good foundation - I am happy to merge and help tweak stuff as we go along.
Bazel build foundation.
This builds all dependencies from source, along with a solid chunk of our foundational libraries (container, bytes, model, utils, net, rpc, etc...), but doesn't build the final redpanda binary.
The idea behind merging this now is that with CI running (see GHA checks) we can lock-in the progress here. If we were to not merge, then as build coverage increased in the development branch, we would be increasingly chasing and fixing regressions created in upstream.
Best to review all commits combined. The argument for not squashing all these commits is that they contain quite a lot of good information, including some work that was replaced as development proceeded (e.g. openssl replacing dependencies) but which is useful to have in the historical log.
Backports Required
Release Notes