fix(ci): unbreak bazel — netprobe zerolog dep + addon-sdk async-trait proc-macro (#3425) #3487

Merged
mfreeman451 merged 1 commit from fix/ci-bazel-netprobe-zerolog-addonsdk-procmacro into staging 2026-06-01 04:28:33 +00:00
Owner

Summary

Unbreaks bazel test (invocation 3893dbd3-bbda-4c31-8881-e2e53d298110). Two analysis/compile failures:

1. //go/pkg/agent/netprobe — unresolved github.com/rs/zerolog

The §2.2 apply-on-connect change (#3483) added a zerolog Logger to netprobe/sidecar.go, but the go_library deps weren't updated. The go test ./... lane resolves it via go.mod; the bazel lane needs the explicit dep (this is the bazel-vs-go-test gap I'd flagged). → added @com_github_rs_zerolog//:zerolog.

2. //rust/addon-sdk:addon_sdk — proc-macro in deps

async-trait is a pure proc-macro; rules_rust requires it in proc_macro_deps, not deps, or the target fails to analyze. → pulled async-trait out of the shared ADDON_SDK_DEPS into ADDON_SDK_PROC_MACROS = crate_deps(["async-trait"]) and set proc_macro_deps on the library, the rust_binary, and the rust_test.

Validation

  • bazel build //go/pkg/agent/netprobe:netprobeBuild completed successfully (zerolog resolves + compiles).
  • bazel build --nobuild //rust/addon-sdk:{addon_sdk, serviceradar-rust-sample-addon, addon_sdk_handshake_mtls_test} → analyzes cleanly (the proc-macro error is gone).

Note (separate, non-fatal)

The same invocation logs a web-ng SSR bun build error ("No matching export … for import 'Component'" for the 3 new dashboard components + RemoteAccessDesktopSession.test.jsx). That's caught in the phx.react.bun.bundle mix task (catch -> IO.inspect) so it doesn't fail the bazel tests — but it does mean the SSR bundle (priv/react/server.js) silently fails to build, breaking SSR rendering. Root cause: phx.react.bun.bundle recursively globs every file under assets/component/src and requires each to export Component; the 3 dashboard files only export default, and the co-located test isn't a component. I'll address that separately (add the Component export to the dashboard components; keep the test out of the SSR glob).

🤖 Generated with Claude Code

## Summary Unbreaks `bazel test` (invocation `3893dbd3-bbda-4c31-8881-e2e53d298110`). Two analysis/compile failures: ### 1. `//go/pkg/agent/netprobe` — unresolved `github.com/rs/zerolog` The §2.2 apply-on-connect change (#3483) added a zerolog `Logger` to `netprobe/sidecar.go`, but the `go_library` deps weren't updated. The `go test ./...` lane resolves it via `go.mod`; the **bazel lane needs the explicit dep** (this is the bazel-vs-go-test gap I'd flagged). → added `@com_github_rs_zerolog//:zerolog`. ### 2. `//rust/addon-sdk:addon_sdk` — proc-macro in `deps` `async-trait` is a pure proc-macro; rules_rust requires it in `proc_macro_deps`, not `deps`, or the target fails to analyze. → pulled `async-trait` out of the shared `ADDON_SDK_DEPS` into `ADDON_SDK_PROC_MACROS = crate_deps(["async-trait"])` and set `proc_macro_deps` on the library, the `rust_binary`, and the `rust_test`. ## Validation - `bazel build //go/pkg/agent/netprobe:netprobe` → **Build completed successfully** (zerolog resolves + compiles). - `bazel build --nobuild //rust/addon-sdk:{addon_sdk, serviceradar-rust-sample-addon, addon_sdk_handshake_mtls_test}` → analyzes cleanly (the proc-macro error is gone). ## Note (separate, non-fatal) The same invocation logs a web-ng SSR `bun build` error ("No matching export … for import 'Component'" for the 3 new dashboard components + `RemoteAccessDesktopSession.test.jsx`). That's **caught** in the `phx.react.bun.bundle` mix task (`catch -> IO.inspect`) so it doesn't fail the bazel tests — but it does mean the SSR bundle (`priv/react/server.js`) silently fails to build, breaking SSR rendering. Root cause: `phx.react.bun.bundle` recursively globs every file under `assets/component/src` and requires each to `export Component`; the 3 dashboard files only `export default`, and the co-located test isn't a component. I'll address that separately (add the `Component` export to the dashboard components; keep the test out of the SSR glob). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(ci): unbreak bazel — netprobe zerolog dep + addon-sdk async-trait proc-macro (#3425)
Some checks failed
Secret Scan / gitleaks (pull_request) Successful in 29s
lint / lint (push) Successful in 1m13s
Rust Add-on Interop Test / interop (push) Successful in 1m21s
Golang Tests / test-go (push) Successful in 1m29s
lint / lint (pull_request) Successful in 1m17s
CI / build (pull_request) Failing after 3m56s
4e6d09d97b
Two analysis/compile failures broke `bazel test` (invocation 3893dbd3):

1. //go/pkg/agent/netprobe:netprobe (+ :netprobe_test) failed: "import of
   github.com/rs/zerolog" unresolved. The §2.2 apply-on-connect change (#3483) added a
   zerolog Logger to netprobe/sidecar.go but the go_library deps weren't updated — the
   `go test ./...` lane resolves it via go.mod, the bazel lane needs the explicit dep.
   Added "@com_github_rs_zerolog//:zerolog" to the netprobe go_library.

2. //rust/addon-sdk:addon_sdk failed analysis: async-trait is a proc-macro and rules_rust
   requires it in proc_macro_deps, not deps. Pulled "async-trait" out of the shared
   ADDON_SDK_DEPS into a new ADDON_SDK_PROC_MACROS = crate_deps(["async-trait"]) and set
   proc_macro_deps on the library, the rust_binary, and the rust_test.

Validation: `bazel build //go/pkg/agent/netprobe:netprobe` completes; `bazel build --nobuild`
of the three addon-sdk targets analyzes cleanly (proc-macro error gone).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
mfreeman451 left a comment

lgtm

lgtm
mfreeman451 deleted branch fix/ci-bazel-netprobe-zerolog-addonsdk-procmacro 2026-06-01 04:28:33 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carverauto/serviceradar!3487
No description provided.