Move translatorservice to the dataplane as well#7318
Conversation
There was a problem hiding this comment.
Pull request overview
This PR exposes the TranslatorService from the dataproxy (data plane) so translation requests can be served without traversing the control plane, aligning better with security-conscious deployments.
Changes:
- Added
TranslatorServiceimplementation and mounted it in thedataproxyHTTP mux. - Moved/duplicated literal↔JSON-schema translation logic into
dataproxy/converterand updated the runs translator to use it. - Added a comprehensive test suite for the new converter package.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
runs/service/translator_service.go |
Updates translator service to use the new dataproxy/converter package. |
dataproxy/translator.go |
Adds a TranslatorService implementation served by the dataproxy binary. |
dataproxy/setup.go |
Registers/mounts the translator handler in the dataproxy server setup. |
dataproxy/converter/literal_json_converter.go |
Introduces the converter implementation used by the translator endpoints. |
dataproxy/converter/literal_json_converter_test.go |
Adds unit tests covering many conversion paths and edge cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Katrina Rogan <katroganGH@gmail.com>
e8e9976 to
5f4bcd1
Compare
Signed-off-by: Katrina Rogan <katroganGH@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR moves the TranslatorService endpoint from the runs (control plane) binary to the dataproxy (data plane) binary to support security-conscious deployments where translation requests should not transit the control plane.
Changes:
- Unmount
TranslatorServicefromrunssetup. - Mount
TranslatorServiceindataproxysetup and relocate the service implementation accordingly. - Add a new
dataproxy/converterpackage (plus tests) used by the data-planeTranslatorServicefor literal/JSON-schema conversions.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| runs/setup.go | Removes mounting of TranslatorService from the runs mux. |
| dataproxy/setup.go | Mounts TranslatorService on the dataproxy mux. |
| dataproxy/translator.go | Hosts TranslatorService in the dataproxy package and routes requests into the new converter package. |
| dataproxy/converter/literal_json_converter.go | Adds the conversion implementation used by TranslatorService. |
| dataproxy/converter/literal_json_converter_test.go | Adds unit tests for converter behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Why are the changes needed?
Required for security-conscious environments.
What changes were proposed in this pull request?
See PR title
How was this patch tested?
Tested with a local deploy.
Labels
Please add one or more of the following labels to categorize your PR:
This is important to improve the readability of release notes.
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Stack
If you do use
git townto manage PR Stacks, the stack relevant to this PRwill show below. Otherwise, you can ignore this section.
Docs link