Client for add table REST API
- Dominant language
- Java
- Stars
- 107
- Forks
- 29
- Avg merge
- 19h 46m
- Merged PRs (30d)
- 141
Description
### Description / Background
We'd like some client code to call the REST API to add a Sleeper table. This should be usable in users' application code, and for system tests.
### Technical Notes / Implementation Details
This can sit in the clients module. It can use the same SerDe code that's used by the REST API implementation.
We can test this with WireMock, since we can't reproduce API Gateway in tests. We can point to WireMock by setting the CDK-defined instance property `sleeper.rest.api.url` in a test.
The following issue calls the API in the system test module, so we should be able to move this implementation to the clients module:
- https://github.com/gchq/sleeper/issues/7347
That uses the built-in Java HttpClient, and it caused problems with connections being reset by our NAT:
- https://github.com/gchq/sleeper/issues/7996
We had to set a JVM system property to avoid that problem. We should probably switch to a different HTTP client where we can configure that more directly. We can then remove the workaround for this in `scripts/test/nightly/runTests.sh`.
Contributor guide
Research direction
Start by reading issue 7347 and locating the existing system-test implementation, then inspect the clients module and the nightly test script at scripts/test/nightly/runTests.sh. Use WireMock with the CDK-defined sleeper.rest.api.url property for tests. Done means the add-table REST call is available from the clients module, is covered by tests, and the documented connection workaround can be removed if the replacement client supports the needed configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100