Skip to content

bazel: use BCR for c-ares and libxml2#28975

Open
dotnwat wants to merge 3 commits intoredpanda-data:devfrom
dotnwat:use-bcr
Open

bazel: use BCR for c-ares and libxml2#28975
dotnwat wants to merge 3 commits intoredpanda-data:devfrom
dotnwat:use-bcr

Conversation

@dotnwat
Copy link
Copy Markdown
Member

@dotnwat dotnwat commented Dec 13, 2025

  • bazel: use BCR for c-ares and libxml2
  • minor fix in rptest log line printing

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v25.3.x
  • v25.2.x
  • v25.1.x

Release Notes

  • none

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Also updates to 2.15

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Fixes this:

    RuntimeError: Node <ducktape.cluster.cluster.ClusterNode object at 0x7f8e3c01f580> joined cluster,

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Copilot AI review requested due to automatic review settings December 13, 2025 18:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the c-ares and libxml2 dependencies from custom Bazel build files to the Bazel Central Registry (BCR), simplifying dependency management. Additionally, it fixes a minor logging issue in the test suite.

Key changes:

  • Removed custom Bazel build configurations for c-ares and libxml2 in favor of BCR versions
  • Updated all import paths from custom thirdparty wrappers to direct library includes
  • Fixed test logging to use old_node.name instead of old_node for proper string formatting

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
MODULE.bazel Added c-ares 1.34.5 and libxml2 2.15.1 as BCR dependencies; removed from non_module_dependencies
bazel/repositories.bzl Removed custom http_archive definitions for c-ares and libxml2
bazel/thirdparty/c-ares.BUILD Deleted custom c-ares build configuration
bazel/thirdparty/libxml2.BUILD Deleted custom libxml2 build configuration
src/v/thirdparty/c-ares/ Removed custom c-ares wrapper files (BUILD, ares.h)
src/v/thirdparty/libxml2/ Removed custom libxml2 wrapper files (BUILD, parser.h, xmlwriter.h)
src/v/kafka/client/broker.cc Updated include from thirdparty/c-ares/ares.h to <ares.h>
src/v/kafka/client/BUILD Changed dependency from //src/v/thirdparty/c-ares to @c-ares//:ares
src/v/cloud_storage_clients/xml_sax_parser.h Updated include from thirdparty/libxml2/parser.h to <libxml/parser.h>
src/v/cloud_storage_clients/BUILD Changed dependency from //src/v/thirdparty/libxml2 to @libxml2
src/v/test_utils/boost_result_redirect.cc Updated include from thirdparty/libxml2/xmlwriter.h to <libxml/xmlwriter.h>
src/v/test_utils/BUILD Changed dependency from //src/v/thirdparty/libxml2 to @libxml2
bazel/thirdparty/seastar.BUILD Updated seastar's c-ares dependency reference to @c-ares//:ares
tests/rptest/tests/cluster_features_test.py Fixed logging to use old_node.name for proper string representation

Copy link
Copy Markdown
Contributor

@rockwotj rockwotj left a comment

Choose a reason for hiding this comment

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

This is exciting!

@rockwotj
Copy link
Copy Markdown
Contributor

@rockwotj
Copy link
Copy Markdown
Contributor

@vbotbuildovich
Copy link
Copy Markdown
Collaborator

CI test results

test results on build#77828
test_class test_method test_arguments test_kind job_url test_status passed reason test_history
SegmentAppenderFixture TestFlushesAreMerged unit https://buildkite.com/redpanda/redpanda/builds/77828#019b18ec-d423-4ec5-9aa5-c8dce370da66 FAIL 0/1

@dotnwat
Copy link
Copy Markdown
Member Author

dotnwat commented Dec 16, 2025

Also missing zlib, I don't know if that matters

hmm, yeh looks like libxml will automatically inflate/deflate files if needed. not a clue if we actually depend on this. seems like maybe only the xml_sax_parser would be affected. @nvartolomei do you know if we depend on gzip?

@nvartolomei
Copy link
Copy Markdown
Contributor

nvartolomei commented Dec 17, 2025

@dotnwat I never seen compression used in our xml processing. grepped the code for mentions and for XML_INPUT_UNZIP flag and did not find anything. Likely no, we don't depend on zlib.

@StephanDollberg
Copy link
Copy Markdown
Member

This good to merge @dotnwat ?

@dotnwat
Copy link
Copy Markdown
Member Author

dotnwat commented Jan 8, 2026

This good to merge @dotnwat ?

looks like the zlib question is resolved. i looked at c-ares and there are a bunch of autoconf-derived configs that are hard coded. they all look fine for 64bit machines. its a bit tedious to examine i think the only concern is if whoever published the BCR there had any baked in x86 assumptions

@travisdowns
Copy link
Copy Markdown
Member

@dotnwat should we split this into libxml2 and c-ares PRs if c-ares is holding things up here? Happy to do the legwork.

Merging libxml2 on BCR would mean that we don't need this hack for hermeticity: #30187

@dotnwat
Copy link
Copy Markdown
Member Author

dotnwat commented Apr 17, 2026

@dotnwat should we split this into libxml2 and c-ares PRs if c-ares is holding things up here? Happy to do the legwork.

@travisdowns oh yeh that sounds good. feel free to close this PR!

@travisdowns
Copy link
Copy Markdown
Member

The libxml2 side of this has been cherry-picked over to #30224.

@travisdowns
Copy link
Copy Markdown
Member

@travisdowns oh yeh that sounds good. feel free to close this PR!

Thanks @dotnwat , I just pulled out the libxml2 side of things and put it up separately, but this can stay open for c-ares side (which based on my tests seemed hermetic but obviously moving to BCR has other benefits).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants