Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Orchestration Data Masking tests #52

Merged
merged 13 commits into from
Oct 2, 2024

Conversation

MatKuhr
Copy link
Member

@MatKuhr MatKuhr commented Sep 5, 2024

Context

AI/ai-sdk-java-backlog#70.

As an orchestration user I want to anonymize and pseudonymize my input prompts using the data masking capabilites of orchestration.

Feature scope:

  • Create an end-to-end test endpoint to test data-masking
  • Create a unit test, verify the request sent, assert on the received result

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Aligned changes with the JavaScript SDK
  • Documentation updated
  • Release notes updated

@CharlesDuboisSAP CharlesDuboisSAP marked this pull request as ready for review October 1, 2024 11:46
@CharlesDuboisSAP CharlesDuboisSAP self-assigned this Oct 1, 2024
@CharlesDuboisSAP CharlesDuboisSAP changed the title Expand E2E Test Added Orchestration Data Masking e2e tests Oct 1, 2024
@CharlesDuboisSAP CharlesDuboisSAP changed the title Added Orchestration Data Masking e2e tests Added Orchestration Data Masking tests Oct 1, 2024
@@ -66,6 +75,33 @@ public class OrchestrationUnitTest {
.templatingModuleConfig(templatingModuleConfig)))
.inputParams(Map.of());

private static final Function<MaskingProviderConfig.MethodEnum, CompletionPostRequest>
MASKING_CONFIG =
(MaskingProviderConfig.MethodEnum maskingType) -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

(Comment)

I didn't know you can add type def signature in lambda syntax ^^

.getResourceAsStream("templatingRequest.json")
.readAllBytes());
verify(postRequestedFor(urlPathEqualTo("/completion")).withRequestBody(equalToJson(request)));
void templating() throws IOException {
Copy link
Contributor

@newtork newtork Oct 2, 2024

Choose a reason for hiding this comment

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

(Comment)

(Still) not a fan of dropping the test method name prefix.

*
* @return the assistant message response
*/
@GetMapping("/maskingPseudonymization")
Copy link
Contributor

Choose a reason for hiding this comment

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

- @GetMapping("/maskingPseudonymization")
+ @GetMapping("/maskingPseudoAnonymization")

Copy link
Contributor

Choose a reason for hiding this comment

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

Why? Orchestration calls it pseudonymization.

README.md Show resolved Hide resolved
Copy link
Member Author

@MatKuhr MatKuhr left a comment

Choose a reason for hiding this comment

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

lgtm

@CharlesDuboisSAP CharlesDuboisSAP merged commit 47f9c72 into main Oct 2, 2024
5 checks passed
@CharlesDuboisSAP CharlesDuboisSAP deleted the feat/orchestration-data-masking branch October 2, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants