Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2ae9747
Use gha oracle runners for build and test job (#2277)
ddelnano Dec 5, 2025
b77b322
Bump golang.org/x/crypto from 0.35.0 to 0.45.0 (#2274)
dependabot[bot] Dec 5, 2025
770c509
Replace `GUARDED_BY` with `ABSL_GUARDED_BY` in preparation for abseil…
ddelnano Dec 5, 2025
68b196b
Remove use of protobuf debug APIs in test assertions to fix breaking …
ddelnano Dec 8, 2025
6f57997
Update python toolchain to 3.12 and upgrade pip deps (#2288)
ddelnano Dec 9, 2025
aa730da
Replace raw use of bazel with bazelisk (#2286)
ddelnano Dec 9, 2025
defe050
Upgrade googletest and benchmark (#2291)
ddelnano Dec 9, 2025
b81253e
Fix openssl bpf test failure introduced by python 3.12 upgrade (#2292)
ddelnano Dec 10, 2025
f4e30ef
Increase ASAN short test timeout to address flaky tests (#2294)
ddelnano Dec 12, 2025
521c0e2
Fix build issues with missing `rules_docker` loader binary (#2300)
ddelnano Dec 15, 2025
a507457
Upgrade bazel to v6.5.0, upgrade protobuf, tensorflow and dependent d…
ddelnano Dec 16, 2025
76d03e7
Upgrade magic_enum to fix builds for clang v16 and later (#2299)
ddelnano Dec 16, 2025
d42bc14
Upgrade `rules_scala` and `rules_meta` (#2293)
ddelnano Dec 16, 2025
245d728
Upgrade to bazel 7 (#2297)
ddelnano Dec 17, 2025
8142de8
Replace deprecated `std::result_of` with `std::invoke_result` (#2304)
ddelnano Dec 21, 2025
a4cdf70
Upgrade bcc to version that's clang 21 compatible (#2305)
ddelnano Dec 28, 2025
a6349a9
Replace u8string method to keep return value consistent (#2308)
ddelnano Jan 5, 2026
bc01887
Consolidate `all_scripts_test.go` to use a single CGO target to fix d…
ddelnano Jan 7, 2026
9ae660b
Remove accidental stamp (#2312)
ddelnano Jan 8, 2026
c4d9e77
Merge remote-tracking branch 'upstream/main' into ddelnano/sync-with-…
ddelnano Feb 19, 2026
ec9e7d4
Fix incorrect magic_enum include
ddelnano Feb 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Use local Cache directory if building on a VM:
# On Chef VM, create a directory and comment in the following line:
# build --disk_cache=</tmp/bazel/> # Optional for multi-user cache: Make this directory owned by a group name e.g. "bazelcache"
common --noenable_bzlmod --enable_workspace

# Use strict action env to prevent leaks of env vars.
build --incompatible_strict_action_env
Expand All @@ -29,11 +30,6 @@ run --remote_download_outputs=all
coverage --build_runfile_links
coverage --nocache_test_results

# Needed by rules_meta.
# Follow https://github.com/fmeum/rules_meta/issues/1#issuecomment-1255828109
# for updates.
common --incompatible_remove_rule_name_parameter=false

# Get version information into the build.
build --workspace_status_command=bazel/get_workspace_status.sh

Expand Down Expand Up @@ -109,7 +105,7 @@ test:aarch64_sysroot --test_tag_filters=-no_libcpp,-requires_root,-requires_bpf,
# Build for Clang using Libc++.
build:clang --config=clang-base
build:clang --//bazel:enable_libcpp
build:clang --features=libc++ --features=-libstdc++
build:clang --features=libc++ --features=-libstdc++ --host_features=libc++ --host_features=-libstdc++
build:clang --build_tag_filters=-no_libcpp
build:clang --test_tag_filters=-no_libcpp,-requires_root,-requires_bpf,-disabled
test:clang --config=tmp-sandbox
Expand All @@ -122,7 +118,7 @@ test:clang-libstdc++ --config=tmp-sandbox

build:qemu-bpf --config=clang-base
build:qemu-bpf --//bazel:enable_libcpp
build:qemu-bpf --features=libc++ --features=-libstdc++
build:qemu-bpf --features=libc++ --features=-libstdc++ --host_features=libc++ --host_features=-libstdc++
build:qemu-bpf --build_tag_filters=requires_bpf,requires_root,-no_qemu,-no_libcpp
build:qemu-bpf --test_tag_filters=requires_bpf,requires_root,-no_qemu,-no_libcpp,-disabled
build:qemu-bpf --sandbox_fake_username
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.2.0
7.7.1
67 changes: 38 additions & 29 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ pl_register_cc_toolchains()
# Install Pixie Labs Dependencies.
pl_deps()

load("@bazel_features//:deps.bzl", "bazel_features_deps")

bazel_features_deps()

load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")

compatibility_proxy_repo()

# Order is important. Try to go from most basic/primitive to higher level packages.
# - go_rules_dependencies
# - protobuf_deps
Expand All @@ -45,6 +53,10 @@ go_register_toolchains()
# gazelle:repository_macro go_deps.bzl%pl_go_dependencies
pl_go_dependencies()

load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")

rules_java_dependencies()

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()
Expand All @@ -53,17 +65,34 @@ load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")

grpc_deps()

load("@io_bazel_rules_scala//:scala_config.bzl", "scala_config")
load("@io_bazel_rules_scala//scala:deps.bzl", "rules_scala_dependencies")

scala_version = "2.13.6"
rules_scala_dependencies()

scala_config(scala_version = scala_version)
load("@io_bazel_rules_scala//:scala_config.bzl", "scala_config")

load("@io_bazel_rules_scala//scala:scala.bzl", "scala_repositories")
scala_version = "2.13.16"

scala_repositories()
scala_config(scala_version = scala_version)

load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains")
load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains", "scala_toolchains")

scala_toolchains(
fetch_sources = True,
twitter_scrooge = {
"libthrift": "@thrift_deps//:org_apache_thrift_libthrift",
# Use scrooge_core_with_finagle to include finagle on the compile classpath
# for generated thrift service code. Must use @px// prefix to reference
# the main workspace from within the generated @rules_scala_toolchains repo.
"scrooge_core": "@px//src/stirling/source_connectors/socket_tracer/testing/containers/thriftmux:scrooge_core_with_finagle",
"scrooge_generator": "@thrift_deps//:com_twitter_scrooge_generator_2_13",
"util_core": "@thrift_deps//:com_twitter_util_core_2_13",
"util_logging": "@thrift_deps//:com_twitter_util_logging_2_13",
"javax_annotation_api": "@thrift_deps//:javax_annotation_javax_annotation_api",
"mustache": "@thrift_deps//:com_github_spullara_mustache_java_compiler",
"scopt": "@thrift_deps//:com_github_scopt_scopt_2_13",
},
)

scala_register_toolchains()

Expand Down Expand Up @@ -141,17 +170,17 @@ tf_workspace0()
pl_model_files()

python_register_toolchains(
name = "python3_10",
name = "python3_12",
# Allow the root user to build the code base since this is a current requirement for
# building in a containerized environment. See https://github.com/bazelbuild/rules_python/pull/713
# for more details.
ignore_root_user_error = True,
# Available versions are listed in @rules_python//python:versions.bzl.
# We recommend using the same version your team is already standardized on.
python_version = "3.10",
python_version = "3.12",
)

load("@python3_10//:defs.bzl", "interpreter")
load("@python3_12//:defs.bzl", "interpreter")

# Setup the environment for the open-source python API.
pip_parse(
Expand Down Expand Up @@ -183,26 +212,6 @@ load("@thrift_deps//:defs.bzl", thrift_pinned_maven_install = "pinned_maven_inst

thrift_pinned_maven_install()

# twitter_scrooge will use incompatible versions of @scrooge_jars and @thrift_jars.
# These bind statements ensure that the correct versions of finagle libthrift, scrooge core
# and scrooge generator are used to ensure successful compilation.
# See https://github.com/bazelbuild/rules_scala/issues/592 and
# https://github.com/bazelbuild/rules_scala/pull/847 for more details.
bind(
name = "io_bazel_rules_scala/dependency/thrift/scrooge_core",
actual = "//src/stirling/source_connectors/socket_tracer/testing/containers/thriftmux:scrooge_jars",
)

bind(
name = "io_bazel_rules_scala/dependency/thrift/scrooge_generator",
actual = "//src/stirling/source_connectors/socket_tracer/testing/containers/thriftmux:scrooge_jars",
)

bind(
name = "io_bazel_rules_scala/dependency/thrift/libthrift",
actual = "//src/stirling/source_connectors/socket_tracer/testing/containers/thriftmux:thrift_jars",
)

# gazelle:repo bazel_gazelle
# Gazelle deps need to be loaded last to make sure they don't override our dependencies.
# The first one wins when it comes to package declaration.
Expand Down
1 change: 0 additions & 1 deletion bazel/cc_toolchains/sysroots/images.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def _sysroot_variant_image_factory(variant):
return _image_from_sysroot_info(ctx, sysroot_toolchain.sysroot)

return rule(
name = "sysroot_{variant}_image".format(variant = variant),
implementation = _impl,
attrs = dicts.add(_container.image.attrs, {
"default_image": attr.label(mandatory = True, doc = "Default container_image to use if no sysroot toolchain is found"),
Expand Down
110 changes: 76 additions & 34 deletions bazel/cc_toolchains/unix_cc_toolchain_config.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
diff --color -Naur a/cc_toolchain_config.bzl b/cc_toolchain_config.bzl
--- a/cc_toolchain_config.bzl 2023-01-06 15:34:50.000000000 -0800
+++ b/cc_toolchain_config.bzl 2023-01-22 15:33:16.794758043 -0800
@@ -27,6 +27,7 @@
"with_feature_set",
)
diff --git a/cc_toolchain_config.bzl b/cc_toolchain_config.bzl
index 1dd0e7a6e7..29b59c6325 100644
--- a/cc_toolchain_config.bzl
+++ b/cc_toolchain_config.bzl
@@ -15,6 +15,7 @@
"""A Starlark cc_toolchain configuration rule"""

load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")
+load(":toolchain_features.bzl", "pl_toolchain_pre_features", "PL_EXTRA_CC_CONFIG_ATTRS", "pl_toolchain_post_features", "pl_action_configs")

def layering_check_features(compiler):
if compiler != "clang":
@@ -147,7 +148,7 @@
load(
"@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl",
"action_config",
@@ -228,7 +229,7 @@ def _impl(ctx):
tool_path(name = name, path = path)
for name, path in ctx.attr.tool_paths.items()
]
Expand All @@ -18,7 +19,7 @@ diff --color -Naur a/cc_toolchain_config.bzl b/cc_toolchain_config.bzl

llvm_cov_action = action_config(
action_name = ACTION_NAMES.llvm_cov,
@@ -168,6 +169,10 @@
@@ -278,6 +279,10 @@ def _impl(ctx):
name = "supports_start_end_lib",
enabled = True,
)
Expand All @@ -27,9 +28,9 @@ diff --color -Naur a/cc_toolchain_config.bzl b/cc_toolchain_config.bzl
+ enabled = True,
+ )

default_compile_flags_feature = feature(
name = "default_compile_flags",
@@ -203,7 +208,7 @@
gcc_quoting_for_param_files_feature = feature(
name = "gcc_quoting_for_param_files",
@@ -323,7 +328,7 @@ def _impl(ctx):
flags = ctx.attr.dbg_compile_flags,
),
] if ctx.attr.dbg_compile_flags else []),
Expand All @@ -38,49 +39,89 @@ diff --color -Naur a/cc_toolchain_config.bzl b/cc_toolchain_config.bzl
),
flag_set(
actions = all_compile_actions,
@@ -212,7 +217,7 @@
@@ -332,7 +337,7 @@ def _impl(ctx):
flags = ctx.attr.opt_compile_flags,
),
] if ctx.attr.opt_compile_flags else []),
- with_features = [with_feature_set(features = ["opt"])],
+ with_features = [with_feature_set(features = ["opt", "default_opt_level_flags"])],
),
flag_set(
actions = all_cpp_compile_actions + [ACTION_NAMES.lto_backend],
@@ -244,7 +249,7 @@
actions = [ACTION_NAMES.c_compile],
@@ -372,7 +377,7 @@ def _impl(ctx):
flags = ctx.attr.opt_link_flags,
),
] if ctx.attr.opt_link_flags else []),
- with_features = [with_feature_set(features = ["opt"])],
+ with_features = [with_feature_set(features = ["opt", "default_opt_level_flags"])],
),
],
env_sets = [
@@ -1473,27 +1478,6 @@ def _impl(ctx):
enabled = True,
)
@@ -1255,6 +1260,7 @@

- asan_feature = _sanitizer_feature(
- name = "asan",
- specific_compile_flags = [
- "-fsanitize=address",
- "-fno-common",
- ],
- specific_link_flags = [
- "-fsanitize=address",
- ],
- )
-
- tsan_feature = _sanitizer_feature(
- name = "tsan",
- specific_compile_flags = [
- "-fsanitize=thread",
- ],
- specific_link_flags = [
- "-fsanitize=thread",
- ],
- )
-
ubsan_feature = _sanitizer_feature(
name = "ubsan",
specific_compile_flags = [
@@ -1569,11 +1553,10 @@ def _impl(ctx):
strip_debug_symbols_feature,
coverage_feature,
supports_pic_feature,
- asan_feature,
- tsan_feature,
ubsan_feature,
gcc_quoting_for_param_files_feature,
static_link_cpp_runtimes_feature,
+ default_opt_level_flags_feature,
] + (
[
supports_start_end_lib_feature,
@@ -1276,6 +1282,7 @@
else:
features = [
supports_pic_feature,
@@ -1613,11 +1596,10 @@ def _impl(ctx):
set_install_name_feature,
libtool_feature,
archiver_flags_feature,
- asan_feature,
- tsan_feature,
ubsan_feature,
gcc_quoting_for_param_files_feature,
static_link_cpp_runtimes_feature,
+ default_opt_level_flags_feature,
] + (
[
supports_start_end_lib_feature,
@@ -1294,6 +1301,7 @@
unfiltered_compile_flags_feature,
] + layering_check_features(ctx.attr.compiler)
@@ -1643,8 +1625,8 @@ def _impl(ctx):
parse_headers_action_configs, parse_headers_features = parse_headers_support(
parse_headers_tool_path = ctx.attr.tool_paths.get("parse_headers"),
)
+ features = pl_toolchain_pre_features(ctx) + features + parse_headers_features + pl_toolchain_post_features(ctx)
action_configs += parse_headers_action_configs
- features += parse_headers_features

+ features = pl_toolchain_pre_features(ctx) + features + pl_toolchain_post_features(ctx)
return cc_common.create_cc_toolchain_config_info(
ctx = ctx,
features = features,
@@ -1313,7 +1321,7 @@
if symbol_check:
features.append(symbol_check)
@@ -1669,7 +1651,7 @@ def _impl(ctx):

cc_toolchain_config = rule(
implementation = _impl,
Expand All @@ -89,11 +130,12 @@ diff --color -Naur a/cc_toolchain_config.bzl b/cc_toolchain_config.bzl
"cpu": attr.string(mandatory = True),
"compiler": attr.string(mandatory = True),
"toolchain_identifier": attr.string(mandatory = True),
@@ -1336,6 +1344,6 @@
"coverage_link_flags": attr.string_list(),
"supports_start_end_lib": attr.bool(),
"builtin_sysroot": attr.string(),
@@ -1699,7 +1681,7 @@ cc_toolchain_config = rule(
fragment = "apple",
name = "xcode_config_label",
)),
- },
+ }, **PL_EXTRA_CC_CONFIG_ATTRS),
fragments = ["apple", "cpp"],
provides = [CcToolchainConfigInfo],
)
35 changes: 35 additions & 0 deletions bazel/external/flatbuffers_remove_rules_js_use.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/BUILD.bazel b/BUILD.bazel
index b4f015a0..70848962 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -1,5 +1,3 @@
-load("@aspect_rules_js//npm:defs.bzl", "npm_link_package")
-load("@npm//:defs.bzl", "npm_link_all_packages")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")

licenses(["notice"])
@@ -8,12 +6,7 @@ package(
default_visibility = ["//visibility:public"],
)

-npm_link_all_packages(name = "node_modules")

-npm_link_package(
- name = "node_modules/flatbuffers",
- src = "//ts:flatbuffers",
-)

exports_files([
"LICENSE",
@@ -40,11 +33,9 @@ filegroup(
"BUILD.bazel",
"WORKSPACE",
"build_defs.bzl",
- "typescript.bzl",
"//grpc/src/compiler:distribution",
"//reflection:distribution",
"//src:distribution",
- "//ts:distribution",
] + glob([
"include/flatbuffers/*.h",
]),
Loading
Loading