Skip to content

pkg/rpctype: remove unused net/rpc hub package - #8216

Draft
ramosian-glider wants to merge 6 commits into
google:masterfrom
ramosian-glider:hub-http-pr3-remove-rpctype
Draft

ramosian-glider wants to merge 6 commits into
google:masterfrom
ramosian-glider:hub-http-pr3-remove-rpctype

Conversation

@ramosian-glider

Copy link
Copy Markdown
Member

Remove the unused pkg/rpctype package (rpc.go, rpc_test.go, rpctype.go, -379 lines) now that syz-hub, syz-manager, and tools/syz-hubtool use pkg/hubapi over HTTP.

Stacked PR: Built on top of #8214 and #8215. Opened as a draft against master and will be rebased and marked ready for review once #8215 merges.

Fixes #8176

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request replaces the custom TCP/RPC-based communication protocol between syz-manager and syz-hub with a modern HTTP/JSON-based API. It removes the legacy pkg/rpctype package and introduces a new pkg/hubapi package defining the client and request/response payloads. The syz-hub service now serves POST endpoints for connection and synchronization, and syz-manager and syz-hubtool have been updated to use the new HTTP client. A critical compilation error was identified in syz-hub/api.go where the non-existent errors.AsType function is used instead of the standard errors.As function.

Comment thread syz-hub/api.go
}

func writeBodyReadError(w http.ResponseWriter, msg string, err error) {
if _, ok := errors.AsType[*http.MaxBytesError](err); ok {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The function errors.AsType does not exist in the Go standard library errors package. This will cause a compilation error.

Please use the standard errors.As function instead.

Suggested change
if _, ok := errors.AsType[*http.MaxBytesError](err); ok {
var maxBytesErr *http.MaxBytesError
if errors.As(err, &maxBytesErr) {

@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.90164% with 104 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.0%. Comparing base (1c78e8c) to head (08f2071).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
syz-hub/api.go 67.0% 23 Missing and 11 partials ⚠️
syz-manager/hub.go 49.0% 24 Missing and 1 partial ⚠️
syz-hub/hub.go 52.8% 16 Missing and 1 partial ⚠️
pkg/hubapi/hubapi.go 81.2% 8 Missing and 8 partials ⚠️
tools/syz-hubtool/hubtool.go 62.5% 6 Missing and 3 partials ⚠️
syz-hub/state/state.go 71.4% 2 Missing ⚠️
syz-manager/manager.go 0.0% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
syz-manager/manager.go 2.2% <0.0%> (+<0.1%) ⬆️
syz-hub/state/state.go 80.2% <71.4%> (ø)
tools/syz-hubtool/hubtool.go 23.1% <62.5%> (+23.1%) ⬆️
pkg/hubapi/hubapi.go 81.2% <81.2%> (ø)
syz-hub/hub.go 52.7% <52.8%> (+1.7%) ⬆️
syz-manager/hub.go 55.1% <49.0%> (+45.7%) ⬆️
syz-hub/api.go 67.0% <67.0%> (ø)

... and 13 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ramosian-glider
ramosian-glider force-pushed the hub-http-pr3-remove-rpctype branch from 5e53c10 to 8b451f7 Compare November 26, 2026 11:08
@ramosian-glider
ramosian-glider force-pushed the hub-http-pr3-remove-rpctype branch from 8b451f7 to 08f2071 Compare November 26, 2026 12:41
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.

syz-hub: migrate RPC protocol from pkg/rpctype (net/rpc) to HTTP

1 participant