Implement GeneratorService data masking & generation execution logic#24
Merged
MaximumTrainer merged 2 commits intomainfrom Apr 1, 2026
Merged
Conversation
Agent-Logs-Url: https://github.com/MaximumTrainer/OpenDataMask/sessions/2e36f54b-a0a6-4558-b763-5a09dde079bb Co-authored-by: MaximumTrainer <1376575+MaximumTrainer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add data masking and generation execution logic
Implement GeneratorService data masking & generation execution logic
Apr 1, 2026
There was a problem hiding this comment.
Pull request overview
Adds unit tests to validate row generation behavior in GeneratorService, ensuring correct row counts and expected fallback behavior for CUSTOM generators.
Changes:
- Added tests verifying
generateRowsreturns the requested number of rows and produces non-empty generated values. - Added test verifying
generateRowsreturns an empty list whencountis zero. - Added test verifying
GeneratorType.CUSTOMfalls back tooriginalValuewhen params are not provided.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
JobServicefetched column generators from the DB but never applied them — noGeneratorServiceexisted to transform data. MASK and GENERATE table modes were effectively no-ops.Changes
GeneratorService— new Spring service implementing all 11GeneratorTypevariants via datafaker 2.1.0:NAME,EMAIL,PHONE,ADDRESS,SSN,CREDIT_CARD,DATE,UUID— realistic synthetic values from fakerCONSTANT— returnsparams["value"](JSON-configured)NULL— returnsnullCUSTOM— returnsparams["value"]with fallback to original source valueapplyGenerators(row, generators)— masks an existing row in-place per column configgenerateRows(generators, count)— produces fully synthetic rows with no source dependencyJobService.processTable()— wiredGeneratorServiceinto both active modes:MASK: fetch source rows →applyGenerators()per row → write to destinationGENERATE:generateRows(generators, rowLimit ?: 100)→ write to destination (no source read)GeneratorServiceTest— adds 3 tests for previously uncoveredgenerateRowspath: correct row count, zero-count edge case, andCUSTOMoriginalValue fallback.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
example.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Dorg.gradle.internal.worker.tmpdir=/home/REDACTED/work/OpenDataMask/OpenDataMask/backend/build/tmp/test/work -Dorg.gradle.native=false -javaagent:/home/REDACTED/work/OpenDataMask/OpenDataMask/backend/build/tmp/.cache/expanded/zip_0bd0851504e6286cb5fc6f37a81e25cc/jacocoagent.jar=destfile=build/jacoco/test.exec,append=true,inclnolocationclasses=false,dumponexit=true,output=file,jmx=false @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath9555417616528680429txt -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -ea worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Test Executor 1'(dns block)/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Dorg.gradle.internal.worker.tmpdir=/home/REDACTED/work/OpenDataMask/OpenDataMask/backend/build/tmp/test/work -Dorg.gradle.native=false -javaagent:/home/REDACTED/work/OpenDataMask/OpenDataMask/backend/build/tmp/.cache/expanded/zip_0bd0851504e6286cb5fc6f37a81e25cc/jacocoagent.jar=destfile=build/jacoco/test.exec,append=true,inclnolocationclasses=false,dumponexit=true,output=file,jmx=false @/home/REDACTED/.gradle/.tmp/gradle-worker-classpath11343826022672846332txt -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -ea worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Test Executor 3'(dns block)If you need me to access, download, or install something from one of these locations, you can either: