feat: add CI/release automation and complete SDK implementation
- Add Forgejo CI workflow: gofmt checks, module caching, coverage reporting - Add release workflow: auto-tag-triggered release with changelog extraction - Update module paths from rock/ to homelab/ namespace - Enhance test coverage and documentation (PLAN.md, README.md) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
6ef58c108f
commit
e4017aea9e
@@ -2,7 +2,7 @@
|
||||
|
||||
## Context
|
||||
|
||||
Companion to `kafaka_management_service` (server), `kmsvc-proto` (shared wire contract), and `kmsvc-cli` (design.md §11a). Standalone Go module — own `go.mod` (`forgejo.riotpiao.homelab.com/rock/kmsvc-sdk`), own Forgejo repo, own release pipeline — so any Go project (including `kmsvc-cli`) can `go get` it without pulling in the server's `internal/` packages, Kafka admin clients, or Redis dependencies.
|
||||
Companion to `kafaka_management_service` (server), `kmsvc-proto` (shared wire contract), and `kmsvc-cli` (design.md §11a). Standalone Go module — own `go.mod` (`forgejo.riotpiao.homelab.com/homelab/kmsvc-sdk`), own Forgejo repo, own release pipeline — so any Go project (including `kmsvc-cli`) can `go get` it without pulling in the server's `internal/` packages, Kafka admin clients, or Redis dependencies.
|
||||
|
||||
The SDK wraps the generated gRPC client for `kafkamgmt.v1` with ergonomic Go methods, auth-token attachment, and long-poll handling — callers never touch raw protobuf types or gRPC metadata.
|
||||
|
||||
@@ -10,13 +10,13 @@ The SDK wraps the generated gRPC client for `kafkamgmt.v1` with ergonomic Go met
|
||||
|
||||
## Proto sourcing
|
||||
|
||||
`kmsvc-proto` publishes pre-generated Go code (`gen/kafkamgmt/v1`), committed and tagged in that repo. This SDK consumes it as a plain Go module dependency — `go get forgejo.riotpiao.homelab.com/rock/[email protected]` with `GOPRIVATE=forgejo.riotpiao.homelab.com` set. No submodule, no local `buf generate`, no `internal/genapi`.
|
||||
`kmsvc-proto` publishes pre-generated Go code (`gen/kafkamgmt/v1`), committed and tagged in that repo. This SDK consumes it as a plain Go module dependency — `go get forgejo.riotpiao.homelab.com/homelab/[email protected]` with `GOPRIVATE=forgejo.riotpiao.homelab.com` set. No submodule, no local `buf generate`, no `internal/genapi`.
|
||||
|
||||
## Repo layout
|
||||
|
||||
```
|
||||
kmsvc-sdk/
|
||||
go.mod # module forgejo.riotpiao.homelab.com/rock/kmsvc-sdk
|
||||
go.mod # module forgejo.riotpiao.homelab.com/homelab/kmsvc-sdk
|
||||
client.go # Client, Option, New()
|
||||
auth.go # TokenSource + per-call credential attachment
|
||||
messages.go # SendMessage(Batch)/DeleteMessage(Batch)/ChangeMessageVisibility(Batch)
|
||||
@@ -32,7 +32,7 @@ kmsvc-sdk/
|
||||
## Implementation steps — status
|
||||
|
||||
### Step 1 — Dependency wiring ✅ done
|
||||
- `go.mod` + `go get forgejo.riotpiao.homelab.com/rock/[email protected]`.
|
||||
- `go.mod` + `go get forgejo.riotpiao.homelab.com/homelab/[email protected]`.
|
||||
- **Verified**: `go build ./...` succeeds.
|
||||
|
||||
### Step 2 — `Client` + connection/auth plumbing ✅ done
|
||||
@@ -64,7 +64,7 @@ kmsvc-sdk/
|
||||
- **Verify**: a real push runs the workflow successfully in Forgejo (pending first push).
|
||||
|
||||
## Acceptance criteria (overall)
|
||||
- [x] `go get forgejo.riotpiao.homelab.com/rock/kmsvc-sdk@<tag>` works from a clean external module given `GOPRIVATE` set, no `replace` directives.
|
||||
- [x] `go get forgejo.riotpiao.homelab.com/homelab/kmsvc-sdk@<tag>` works from a clean external module given `GOPRIVATE` set, no `replace` directives.
|
||||
- [x] No `kafkamgmt/v1` (generated) types appear in any exported function signature.
|
||||
- [x] All unit tests pass against the `bufconn` fake server; no real Kafka/Redis/network dependency in CI.
|
||||
- [ ] `examples/sendreceive` runs successfully against a real server instance once one exists (manual checkpoint, not CI-gated).
|
||||
|
||||
Reference in New Issue
Block a user