refactor: restructure backend code organization#247
Conversation
- Move handlers to handler/v1beta1/ (from internal/server/v1beta1/) - Move interceptors to internal/middleware/ (from pkg/server/interceptor/) - Move store to store/ (from internal/store/) - Move telemetry to internal/telemetry/ (from pkg/telemetry/) - Extract server config to internal/config/ package - Remove pkg/ directory entirely (metrics, statsd, telemetry) - Migrate proto generation from PGV to buf protovalidate - Switch buf.gen.yaml to source_relative with proto/gen/ output - Replace manual ValidateAll() calls with connectrpc/validate interceptor - Remove envoyproxy/protoc-gen-validate dependency
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 4 minutes and 40 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (144)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Move handler files from handler/v1beta1/ to handler/ and rename package from handlersv1beta1 to handler.
Remove the proto/ wrapper directory — generated code now lives directly at gen/ (gen/raystack/compass/v1beta1/, gen/buf/validate/).
- Move config.yaml to internal/config/config.example.yaml - Flatten test/e2e_test/ to test/ - Update Makefile reference
Pull Request Test Coverage Report for Build 23678554517Details
💛 - Coveralls |
Summary
handler/v1beta1/(frominternal/server/v1beta1/)internal/middleware/(frompkg/server/interceptor/), rename package tomiddlewarestore/(frominternal/store/)internal/telemetry/(frompkg/telemetry/)internal/config/packagepkg/directory entirely (unused metrics, statsd packages)connectrpc.com/validateinterceptor)buf.gen.yamltosource_relativewithproto/gen/output structureValidateAll()calls with automatic validation interceptorenvoyproxy/protoc-gen-validatedependencyDepends on: raystack/proton#460
Test plan
go build ./...passesgo test ./...passes