Skip to content

Move translatorservice to the dataplane as well#7318

Merged
katrogan merged 2 commits intomainfrom
katrina/eng26-329-move-translatorservice-to-the-dataplane-as-well
Apr 30, 2026
Merged

Move translatorservice to the dataplane as well#7318
katrogan merged 2 commits intomainfrom
katrina/eng26-329-move-translatorservice-to-the-dataplane-as-well

Conversation

@katrogan
Copy link
Copy Markdown
Contributor

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:

  • added: For new features.
  • changed: For changes in existing functionality.
  • deprecated: For soon-to-be-removed features.
  • removed: For features being removed.
  • fixed: For any bug fixed.
  • security: In case of vulnerabilities

This is important to improve the readability of release notes.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Stack

If you do use git town to manage PR Stacks, the stack relevant to this PR
will show below. Otherwise, you can ignore this section.

Docs link

Copilot AI review requested due to automatic review settings April 30, 2026 08:54
pingsutw
pingsutw previously approved these changes Apr 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TranslatorService implementation and mounted it in the dataproxy HTTP mux.
  • Moved/duplicated literal↔JSON-schema translation logic into dataproxy/converter and 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>
@katrogan katrogan force-pushed the katrina/eng26-329-move-translatorservice-to-the-dataplane-as-well branch from e8e9976 to 5f4bcd1 Compare April 30, 2026 17:38
Signed-off-by: Katrina Rogan <katroganGH@gmail.com>
Copilot AI review requested due to automatic review settings April 30, 2026 18:14
@pingsutw pingsutw added this to the V2 GA milestone Apr 30, 2026
@katrogan katrogan added this pull request to the merge queue Apr 30, 2026
Merged via the queue into main with commit 355c5ce Apr 30, 2026
23 checks passed
@katrogan katrogan deleted the katrina/eng26-329-move-translatorservice-to-the-dataplane-as-well branch April 30, 2026 18:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TranslatorService from runs setup.
  • Mount TranslatorService in dataproxy setup and relocate the service implementation accordingly.
  • Add a new dataproxy/converter package (plus tests) used by the data-plane TranslatorService for 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants