Skip to content

Conversation

@ddelnano
Copy link
Member

Summary: Upgrade rules scala and rules_meta

Relevant Issues: #2282

Type of change: /kind cleanup

Test Plan: Build succeeds

@ddelnano ddelnano force-pushed the ddelnano/upgrade-rules_scala-and-meta branch from e8b3dc6 to c00c23b Compare December 10, 2025 14:59
ddelnano added a commit that referenced this pull request Dec 16, 2025
…eps (#2290)

Summary: Upgrade Bazel from 6.2.0 to 6.5.0 along with protobuf,
tensorflow, and related dependencies. This is a coordinated upgrade
since these dependencies have hard interdependencies that make
incremental upgrades difficult.

Key changes
- Upgrade Bazel from 6.2.0 to 6.5.0 (required by these new dependencies)
- Protobuf upgrade with compatibility patches for text format handling
and JavaScript generation
- TensorFlow upgrade with patches to disable GPU/LLVM/Python features.
The GPU disable patch will not be necessary as TensorFlow's fallback
logic will work with Bazel 7
- gRPC-web upgrade to 2.0.2 and replacement of the vendored
`protoc-gen-grpc-web` with a Bazel repository
- Flatbuffers patched to remove rules_js dependency (this upgrade is
required by TensorFlow v2.20.0)
- absl upgrade (causes transitive header changes)
- Regenerated TypeScript protobuf bindings for the UI

I attempted to split this into a smaller change in #2296. TensorFlow has
a tight dependency on protobuf, which prevented that attempt from
working. I'm open to other ideas on how to split this up, but so far
this seemed like the best balance with #2293 and #2297 to follow to
complete the Bazel 7 migration.

Relevant Issues: #2282

Type of change: /kind cleanup

Test Plan: Build passes

---------

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
(cherry picked from commit 430eb96)
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano force-pushed the ddelnano/upgrade-rules_scala-and-meta branch from 9d9119a to 5613047 Compare December 16, 2025 17:35
@ddelnano ddelnano marked this pull request as ready for review December 16, 2025 17:47
@ddelnano ddelnano requested review from a team as code owners December 16, 2025 17:47
Comment on lines +512 to +516
REPOSITORY_LOCATIONS["with_cfg.bzl"] = dict(
sha256 = "c7af6227d24499438fa0bb96fe4034e163d8c807b06f7c0645f3654448268b84",
strip_prefix = "with_cfg.bzl-0.11.0",
urls = ["https://github.com/fmeum/with_cfg.bzl/releases/download/v0.11.0/with_cfg.bzl-v0.11.0.tar.gz"],
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason not to stick it inline above? you might need to quote the key I guess?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the dict() function expects the key (kwarg) to be a valid identifier. Since with_cfg.bzl contains a period, I wasn't able to get this to work another way.

I was going to start moving dependencies to bzlmod after #2297 and this was one of the dependencies I intended to move initially. So this will get cleaned up quickly.

@ddelnano ddelnano force-pushed the ddelnano/upgrade-rules_scala-and-meta branch from 7ff4375 to 5613047 Compare December 16, 2025 19:04
Comment on lines -68 to 70
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"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change fixes the following error:

root@px-dev-docker-hacksaw:/px/src/px.dev/pixie# bazel build @com_github_iovisor_bpftrace//:bpftrace --verbose_failures
ERROR: Traceback (most recent call last):
        File "/px/src/px.dev/pixie/bazel/cc_toolchains/sysroots/images.bzl", line 82, column 55, in <toplevel>
                sysroot_runtime_image = _sysroot_variant_image_factory("runtime")
        File "/px/src/px.dev/pixie/bazel/cc_toolchains/sysroots/images.bzl", line 67, column 16, in _sysroot_variant_image_factory
                return rule(
Error in rule: in call to rule(), parameter 'name' is deprecated and will be removed soon. It may be temporarily re-enabled by setting --incompatible_remove_rule_name_parameter=false
ERROR: /root/.cache/bazel/_bazel_root/54060b0ed2e63c063d495ae4fb1a7d19/external/com_github_iovisor_bcc/BUILD.bazel:27:6: error loading package '': initialization of module 'bazel/cc_toolchains/sysroots/images.bzl' failed and referenced by '@com_github_iovisor_bcc//:bcc'
ERROR: /root/.cache/bazel/_bazel_root/54060b0ed2e63c063d495ae4fb1a7d19/external/com_github_iovisor_bpftrace/BUILD.bazel:27:6: error loading package '': initialization of module 'bazel/cc_toolchains/sysroots/images.bzl' failed and referenced by '@com_github_iovisor_bpftrace//:bpftrace'
ERROR: Analysis of target '@com_github_iovisor_bpftrace//:bpftrace' failed; build aborted:
INFO: Elapsed time: 0.459s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

@ddelnano ddelnano merged commit d42bc14 into pixie-io:main Dec 16, 2025
50 checks passed
@ddelnano ddelnano deleted the ddelnano/upgrade-rules_scala-and-meta branch December 16, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants