Skip to content

Close gap in CI script uncovered when adding P4Runtime to BCR#591

Closed
smolkaj wants to merge 1 commit into
mainfrom
test
Closed

Close gap in CI script uncovered when adding P4Runtime to BCR#591
smolkaj wants to merge 1 commit into
mainfrom
test

Conversation

@smolkaj

@smolkaj smolkaj commented Feb 20, 2026

Copy link
Copy Markdown
Member

In bazelbuild/bazel-central-registry#7594, P4Runtime did not build correctly even though we have CI set up to ensure that it does.

Here is what I believe is going on:

  • Fact: In Bazel, it is possible (and unfortunately common) that a project builds from its own workspace, but fails to build when depended on from another workspace.
  • Fact: We have an example project in example/using-bzlmod that we build in our CI script to ensure both direct and transitive builds work.
  • Fact: Despite this, in Add p4runtime 1.5.0 (initial release to BCR) bazelbuild/bazel-central-registry#7594, P4Runtime did not build even though our CI script passes.
  • I suspect the gap is that our example project exercises some, but not all @p4runtime targets in a transitive fashion.
  • Proposed solution: run bazel build @p4runtime//... from the example workspace to close the gap.

If my theory is correct, the CI run on this PR should fail and reproduce the issue I encountered in bazelbuild/bazel-central-registry#7594.

… another workspace.

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
@smolkaj

smolkaj commented Feb 20, 2026

Copy link
Copy Markdown
Member Author

Jackpot!

smolkaj added a commit that referenced this pull request Feb 20, 2026
…her Bazel workspace.

Details:
- In Bazel, it is possible and not uncommon that a project builds from its own workspace, but fails to build when depended on from another workspace.
- We have an example project in example/using-bzlmod that we build in our CI script to ensure both direct and transitive builds work.
- Despite this, in bazelbuild/bazel-central-registry#7594, P4Runtime did not build even though our CI script passed.
- The gap: our example project exercises some, but not all @p4runtime targets in a transitive fashion.
- The solution: run bazel build @p4runtime//... from the example workspace to close the gap.
- The proof: I reproduced the issue seen in bazelbuild/bazel-central-registry#7594 in #591.

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
smolkaj added a commit that referenced this pull request Feb 20, 2026
…her Bazel workspace.

Details:
- In Bazel, it is possible and not uncommon that a project builds from its own workspace, but fails to build when depended on from another workspace.
- We have an example project in example/using-bzlmod that we build in our CI script to ensure both direct and transitive builds work.
- Despite this, in bazelbuild/bazel-central-registry#7594, P4Runtime did not build even though our CI script passed.
- The gap: our example project exercises some, but not all @p4runtime targets in a transitive fashion.
- The solution: run bazel build @p4runtime//... from the example workspace to close the gap.
- The proof: I reproduced the issue seen in bazelbuild/bazel-central-registry#7594 in #591.

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
smolkaj added a commit that referenced this pull request Feb 20, 2026
…her Bazel workspace.

Details:
- In Bazel, it is possible and not uncommon that a project builds from its own workspace, but fails to build when depended on from another workspace.
- We have an example project in example/using-bzlmod that we build in our CI script to ensure both direct and transitive builds work.
- Despite this, in bazelbuild/bazel-central-registry#7594, P4Runtime did not build even though our CI script passed.
- The gap: our example project exercises some, but not all @p4runtime targets in a transitive fashion.
- The solution: run bazel build @p4runtime//... from the example workspace to close the gap.
- The proof: I reproduced the issue seen in bazelbuild/bazel-central-registry#7594 in #591.

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
smolkaj added a commit that referenced this pull request Feb 20, 2026
…her Bazel workspace.

Details:
- In Bazel, it is possible and not uncommon that a project builds from its own workspace, but fails to build when depended on from another workspace.
- We have an example project in example/using-bzlmod that we build in our CI script to ensure both direct and transitive builds work.
- Despite this, in bazelbuild/bazel-central-registry#7594, P4Runtime did not build even though our CI script passed.
- The gap: our example project exercises some, but not all @p4runtime targets in a transitive fashion.
- The solution: run bazel build @p4runtime//... from the example workspace to close the gap.
- The proof: I reproduced the issue seen in bazelbuild/bazel-central-registry#7594 in #591.

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
@smolkaj smolkaj closed this Feb 20, 2026
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.

1 participant