feat: migrate from msgpack to protobuf (handler-base v1.0.0)
Some checks failed
CI / Lint (push) Successful in 3m9s
CI / Test (push) Successful in 2m42s
CI / Release (push) Successful in 1m0s
CI / Notify (push) Successful in 2s
CI / Docker Build & Push (push) Failing after 9m28s

- Replace msgpack encoding with protobuf wire format
- Update field names to proto convention
- Change Parameters type from map[string]any to map[string]string
- Rewrite tests for proto round-trips
This commit is contained in:
2026-02-21 15:30:17 -05:00
parent 338210eb74
commit 66ef758808
5 changed files with 45 additions and 48 deletions

View File

@@ -2,6 +2,7 @@ package main
import (
"encoding/json"
"fmt"
"net/http"
"net/http/httptest"
"sync/atomic"
@@ -27,10 +28,10 @@ func TestSubmitArgoE2E_FullPayload(t *testing.T) {
defer ts.Close()
ctx := t.Context()
params := map[string]any{
params := map[string]string{
"source": "s3://bucket/docs",
"collection": "knowledge-base",
"batch_size": 100,
"batch_size": "100",
}
runID, err := submitArgo(ctx, ts.Client(), ts.URL, "ai-ml", "document-ingestion", params, "req-e2e-001")
@@ -80,9 +81,9 @@ func TestSubmitKubeflowE2E_FullPayload(t *testing.T) {
defer ts.Close()
ctx := t.Context()
params := map[string]any{
params := map[string]string{
"query": "what is kubernetes",
"top_k": 5,
"top_k": "5",
"user_id": "test-user",
}
@@ -131,7 +132,7 @@ func TestPipelineDispatchE2E_UnknownPipeline(t *testing.T) {
names = append(names, k)
}
resp := &messages.PipelineStatus{
RequestID: "req-bad",
RequestId: "req-bad",
Status: "error",
Error: "Unknown pipeline: nonexistent-pipeline",
AvailablePipelines: names,
@@ -162,7 +163,7 @@ func TestSubmitArgoE2E_ConcurrentRequests(t *testing.T) {
for i := 0; i < 10; i++ {
go func() {
_, err := submitArgo(ctx, ts.Client(), ts.URL, "ai-ml", "batch-inference",
map[string]any{"batch": i}, "req-concurrent")
map[string]string{"batch": fmt.Sprintf("%d", i)}, "req-concurrent")
errs <- err
}()
}
@@ -189,7 +190,7 @@ func BenchmarkSubmitArgo(b *testing.B) {
defer ts.Close()
ctx := b.Context()
params := map[string]any{"source": "test"}
params := map[string]string{"source": "test"}
b.ResetTimer()
for b.Loop() {
@@ -204,7 +205,7 @@ func BenchmarkSubmitKubeflow(b *testing.B) {
defer ts.Close()
ctx := b.Context()
params := map[string]any{"query": "test"}
params := map[string]string{"query": "test"}
b.ResetTimer()
for b.Loop() {