viirya opened a new pull request, #9:
URL: https://github.com/apache/spark-connect-gateway/pull/9
### What changes were proposed in this pull request?
Part of importing the Spark Connect Gateway reference implementation into
`apache/spark-connect-gateway` as a series of small, bottom-up PRs (tracked
in
the do-not-merge reference PR #1).
This adds two small leaf crates, grouped into one PR:
- `scg-audit` — structured audit logging for the gateway.
- `scg-ratelimit` — per-tenant (and optional per-user) token-bucket rate
limiting, with a Redis-backed distributed token bucket for multi-replica
deployments.
Both are leaf crates (no internal dependencies), so they compile and test on
their own (audit: 6 unit tests; ratelimit: 9 tests, plus Redis integration
tests
that are `#[ignore]` so they compile but don't require Docker in CI). They
are
appended to the workspace `members` list, and are consumed later by the
`proxy`
crate.
### Why are the changes needed?
Implements the reference gateway from the approved SPIP (SPARK-58455),
imported
one reviewable piece at a time.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
`cargo fmt --all --check`, `cargo clippy --workspace --all-targets -- -D
warnings`,
`cargo build --workspace`, and `cargo test --workspace` all pass locally
(audit 6 tests, ratelimit 9 tests; Redis integration tests are `#[ignore]`).
### Was this patch authored or co-authored using generative AI tooling?
Yes, co-authored with Claude Code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]