Skip to content

Conversation

@ddelnano
Copy link
Member

@ddelnano ddelnano commented Jan 7, 2026

Summary: Consolidate all_scripts_test.go to use a single CGO target to fix duplicate symbol errors introduced by rules_go v0.58.1

bazel-contrib/rules_go#4438, included in rules_go v0.58.1, causes certain statically linked CGO binaries to fail with duplicate symbol errors. This occurs when a binary depends on more than one CGO library that transitively depends on a common set of object files.

all_scripts_test.go previously depended on two CGO targets:

  • //src/carnot/planner
  • //src/e2e_test/vizier/planner/dump_schemas/godumpschemas

This PR solves this issue by removing the src/e2e_test/vizier/planner/dump_schemas/godumpschemas CGO library and instead generate the protobuf export directly in C++, loading it in the main application. This approach mirrors the existing pattern used in src/vizier/funcs.

Why not fix rules_go?

The rules_go change that causes the issue explains that it doesn't include the necessary deduplication logic to avoid these duplicate symbol errors (bazel-contrib/rules_go#4438 (comment)). This tradeoff was deemed acceptable since it solved the c++ initialization problem with minimal complexity.

Relevant Issues: N/A

Type of change: /kind cleanup

Test Plan: Build should pass

protobuf encoded export

Signed-off-by: Dom Del Nano <[email protected]>
(cherry picked from commit 322954c)
@ddelnano ddelnano marked this pull request as ready for review January 7, 2026 15:04
@ddelnano ddelnano requested a review from a team as a code owner January 7, 2026 15:04
pl_cc_binary(
name = "export_schemas",
srcs = ["export_schemas.cc"],
stamp = -1,
Copy link
Member

Choose a reason for hiding this comment

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

why do we need to disable stamping here?

Copy link
Member Author

@ddelnano ddelnano Jan 8, 2026

Choose a reason for hiding this comment

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

Oops missed this before I merged the original PR yesterday. We actually don't need this.

Removed in #2312.

@ddelnano ddelnano merged commit bc01887 into pixie-io:main Jan 7, 2026
24 checks passed
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.

2 participants