Skip to content

fix(protos): import core.proto in configs.proto and compile protos in CI - #2475

Closed
apilaskowski wants to merge 1 commit into
mainfrom
fix-configs-proto-import
Closed

apilaskowski wants to merge 1 commit into
mainfrom
fix-configs-proto-import

Conversation

@apilaskowski

Copy link
Copy Markdown
Collaborator

Summary

protos/configs.proto uses DefaultIcebergConfig and DefaultLakehouseConfig, which are defined in core.proto, but never imports it. Compiling //protos:dataform_proto with protoc (e.g. bazel build //...) fails:

configs.proto:62:3: "DefaultIcebergConfig" is not defined.
configs.proto:110:3: "DefaultLakehouseConfig" is not defined.

Changes

  • protos/configs.proto: add import "core.proto";. No import cycle — core.proto no longer imports configs.proto.
  • scripts/run_tests: build //protos:dataform_proto before the unit tests, so CI catches this class of error.

Impact

Nothing is broken today. The generated JS/TS code (//protos:ts) is produced by loading all .proto files together in one shared namespace, so the missing import is never noticed, and CI (bazel test --build_tests_only) never runs protoc on these files.

It should still be fixed: the files are invalid for any protoc-based consumer (other language bindings, external tooling) and break bazel build //... locally.

Background

configs.proto references DefaultIcebergConfig and DefaultLakehouseConfig,
defined in core.proto, without importing it, so protoc fails on
//protos:dataform_proto. The generated JS/TS code is unaffected because it
loads all .proto files into a shared namespace, and CI never runs protoc on
these files. Add the missing import and build //protos:dataform_proto in
scripts/run_tests to catch this in CI.

@rafal-hawrylak rafal-hawrylak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I want to decouple core.proto and configs.proto once for good - #2477

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