Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement in-memory test harness for IRC Events REST endpoint
Fixes #13582
Summary
This PR introduces a lightweight test harness for the IRC Events REST endpoint in the Iceberg REST Catalog.
The implementation is intentionally non-production, using an in-memory event store, and is designed to unblock further development and validation of the Events API before it is merged into the REST Catalog specification.
This work follows the consensus reached in #12584 and builds on the groundwork from #13580.
Motivation
Before finalizing and merging the IRC Events endpoint into the REST Catalog specification, we need a concrete implementation to:
Validate endpoint contracts
Enable integration and unit testing
Provide a reference implementation for future production backends
The test harness satisfies these needs without introducing storage or operational complexity.
What’s Included
This PR adds support for POST and GET operations on:
using an in-memory backend.
Key components introduced
In-memory events store
Thread-safe storage for received events
Suitable for tests and local development only
Request / response models
PostEventsRequestEventsResponseREST wiring
New routes registered in
RouteEndpoint handling added to
RESTCatalogAdapterPath helpers
Centralized
/v1/{prefix}/eventspath inResourcePathsTests
TestEventsEndpointvalidates:Posting events
Retrieving stored events
Basic request/response flow
Files Changed
Design Notes
Non-production by design
The in-memory store is scoped to testing and local usage only.
No persistence guarantees
Events are not durable and reset between runs.
Minimal surface area
No external dependencies or configuration required.
This approach keeps the implementation simple while providing meaningful coverage and validation.
Testing
Added
TestEventsEndpointVerified:
POST events are accepted
GET returns previously posted events
Full build executed locally using:
Backward Compatibility
No breaking changes
No impact on existing REST Catalog functionality
New endpoint is additive and isolated
Follow-ups / Future Work
Pluggable or persistent event stores
Metrics and retention policies
Authorization and filtering
Production-ready implementations
Checklist
Follows Iceberg REST patterns
Minimal, test-only implementation
Covered by unit tests
No production assumptions introduced
Ready for review and iteration