Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,17 @@ jobs:

cat /tmp/contract-baseline-diff.md

# The full report can exceed GitHub's 65,536-character comment limit when a whole
# package moves (the Detect package rename produced several hundred KB). Keep the
# complete markdown as a run artifact; the comment below is truncated to fit.
- name: Upload full contract diff
if: always() && (steps.baseline-diff-check.outputs.changed == 'true' || steps.baseline-diff-check.outputs.changed == 'new')
uses: actions/upload-artifact@v4
with:
name: contract-baseline-diff-${{ matrix.module }}
path: /tmp/contract-baseline-diff.md
if-no-files-found: ignore

- name: Comment contract baseline change on PR
if: always() && (steps.baseline-diff-check.outputs.changed == 'true' || steps.baseline-diff-check.outputs.changed == 'new')
uses: actions/github-script@v7
Expand All @@ -142,7 +153,19 @@ jobs:
const preamble = isNew
? `This PR adds \`${module}/api-report/${artifact}.baseline.jar\`, the approved public API contract for this module.`
: `This PR updates \`${module}/api-report/${artifact}.baseline.jar\` (the approved public API contract). Here is exactly what it changes, comparing the baseline on \`${{ github.event.pull_request.base.ref }}\` against the baseline committed in this PR:`;
const body = `${marker}\n${heading}\n\n${preamble}\n\n${summary}`;
// GitHub rejects comment bodies over 65,536 characters ("Body is too long"), which
// took the whole job down when the Detect package was renamed. Truncate the report
// and point at the artifact and the step log, which both carry the full text.
const LIMIT = 60000;
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
const head = `${marker}\n${heading}\n\n${preamble}\n\n`;
let report = summary;
if (head.length + report.length > LIMIT) {
const note = `\n\n---\n**Report truncated** (${summary.length.toLocaleString()} characters). The full report is the ` +
`\`contract-baseline-diff-${module}\` artifact and the "Diff old vs new contract baseline" step log of [this run](${runUrl}).\n`;
report = summary.slice(0, LIMIT - head.length - note.length) + note;
}
const body = head + report;
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down
8 changes: 4 additions & 4 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ component_management:
- "**/src/main/java/com/skyflow/vault/controller/**"
- component_id: vault_detect
name: Detect
# Detect V2 lives in com.skyflow.detect (models, mappers, polling, file output) plus
# BaseDetectController / DetectController under vault.controller, which the Vault
# Controller component already covers. The old vault/detect package no longer exists.
# Detect V2 lives in com.skyflow.vault.detect (models, mappers, polling, file output), the
# same package the removed V1 classes used. BaseDetectController / DetectController sit under
# vault.controller, which the Vault Controller component already covers.
paths:
- "**/src/main/java/com/skyflow/detect/**"
- "**/src/main/java/com/skyflow/vault/detect/**"
- component_id: vault_audit
name: Audit
paths:
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/java/com/skyflow/enums/RedactionType.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
/**
* How a stored value is rendered when it is read back. Shared by the skyvault vault operations
* ({@code get} and {@code detokenize}) and by Detect re-identification, where a
* {@link com.skyflow.detect.RedactionRule} (the SDK's {@code RedactionLevel}) applies it to one entity type.
* {@link com.skyflow.vault.detect.RedactionRule} (the SDK's {@code RedactionLevel}) applies it to one entity type.
*/
public enum RedactionType {
PLAIN_TEXT,
MASKED,
/**
* Use the redaction configured on the vault column. Valid for {@code get} and {@code detokenize}.
* The Detect API rejects it with HTTP 400 in a {@link com.skyflow.detect.RedactionRule}
* The Detect API rejects it with HTTP 400 in a {@link com.skyflow.vault.detect.RedactionRule}
* (the SDK's {@code RedactionLevel}); use {@link #PLAIN_TEXT}, {@link #MASKED} or {@link #REDACTED}
* for re-identification.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
import com.skyflow.BaseVaultClient;
import com.skyflow.config.BaseCredentials;
import com.skyflow.config.BaseVaultConfig;
import com.skyflow.detect.CheckGuardrailsRequest;
import com.skyflow.detect.CheckGuardrailsResponse;
import com.skyflow.detect.DeidentifyFileRequest;
import com.skyflow.detect.ReidentifyFileSource;
import com.skyflow.detect.DeidentifyFileSource;
import com.skyflow.detect.DeidentifyFileResponse;
import com.skyflow.detect.DeidentifyStringRequest;
import com.skyflow.detect.DeidentifyStringResponse;
import com.skyflow.detect.GetRunRequest;
import com.skyflow.detect.GetRunResponse;
import com.skyflow.detect.ReidentifyFileRequest;
import com.skyflow.detect.ReidentifyFileResponse;
import com.skyflow.detect.ReidentifyStringRequest;
import com.skyflow.detect.ReidentifyStringResponse;
import com.skyflow.detect.internal.DeidentifyFileFlow;
import com.skyflow.detect.internal.DetectRequestMapper;
import com.skyflow.detect.internal.DetectResponseMapper;
import com.skyflow.detect.internal.DetectValidations;
import com.skyflow.detect.internal.ReidentifyFileMapper;
import com.skyflow.detect.internal.ReidentifyFileValidations;
import com.skyflow.vault.detect.CheckGuardrailsRequest;
import com.skyflow.vault.detect.CheckGuardrailsResponse;
import com.skyflow.vault.detect.DeidentifyFileRequest;
import com.skyflow.vault.detect.ReidentifyFileSource;
import com.skyflow.vault.detect.DeidentifyFileSource;
import com.skyflow.vault.detect.DeidentifyFileResponse;
import com.skyflow.vault.detect.DeidentifyStringRequest;
import com.skyflow.vault.detect.DeidentifyStringResponse;
import com.skyflow.vault.detect.GetRunRequest;
import com.skyflow.vault.detect.GetRunResponse;
import com.skyflow.vault.detect.ReidentifyFileRequest;
import com.skyflow.vault.detect.ReidentifyFileResponse;
import com.skyflow.vault.detect.ReidentifyStringRequest;
import com.skyflow.vault.detect.ReidentifyStringResponse;
import com.skyflow.vault.detect.internal.DeidentifyFileFlow;
import com.skyflow.vault.detect.internal.DetectRequestMapper;
import com.skyflow.vault.detect.internal.DetectResponseMapper;
import com.skyflow.vault.detect.internal.DetectValidations;
import com.skyflow.vault.detect.internal.ReidentifyFileMapper;
import com.skyflow.vault.detect.internal.ReidentifyFileValidations;
import com.skyflow.errors.SkyflowException;
import com.skyflow.generated.common.rest.core.ApiClientApiException;
import com.skyflow.generated.common.rest.core.ApiClientException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Audio processing options.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Bleep tone applied over detected speech in audio.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Response of {@code checkGuardrails}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* How a detected entity is replaced in the processed output.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* File formats accepted by {@code deidentifyFile} as the request {@code dataFormat}. The wire value is the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* How the file of {@code deidentifyFile} is supplied, and how a run reports its outputs. Each SDK ships its own
* {@code com.skyflow.detect.DeidentifySourceType} enum implementing this interface with the sources its vault
* {@code com.skyflow.vault.detect.DeidentifySourceType} enum implementing this interface with the sources its vault
* type accepts: skyvault {@code BASE64}, {@code SKYFLOW_ID}, {@code PRESIGNED_URL}; flowvault {@code BASE64},
* {@code PRESIGNED_URL}. {@code getOutputType()} on {@code DeidentifyFileResponse} and {@code GetRunResponse}
* returns a constant of that same enum. The constant name is the wire value.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Request for {@code deidentifyString}. configurationId and configuration are both optional and are sent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Lifecycle status of an asynchronous Detect file run.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Document processing options.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Configures how a single entity type is detected and de-identified.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Position of a detected entity in the original and processed text.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Entity types Skyflow Detect can identify. Also used to target entities in {@code RedactionLevel}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Maps an input file location to output locations. File inputs only.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* One output artifact of a Detect file de-identification run, returned by {@code deidentifyFile} and {@code getRun}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Request for {@code getRun}: retrieves the status and outputs of a Detect file run.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Overall result of a guardrails check.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Image processing options.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Whether the entity label is included as a prefix in a generated vault token. Only applies when the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Masking method applied to detected regions in images.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Media-type specific processing options. File inputs only.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Processing metrics returned by Detect operations.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* How a detected visual object is handled.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Configures detection of a visual object type in images or video.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Visual objects Skyflow Detect can identify in images and video.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Transcription output produced for audio inputs.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* PDF processing options.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* How PDF documents are processed.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* Opts {@code deidentifyFile} into submit-and-poll mode. When present, the SDK polls the run with
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* One re-identification rendering rule, the element of {@code redactionLevel} on {@code ReidentifyStringRequest}
* and {@code ReidentifyFileRequest}. Each SDK ships its own {@code com.skyflow.detect.RedactionLevel} with the
* and {@code ReidentifyFileRequest}. Each SDK ships its own {@code com.skyflow.vault.detect.RedactionLevel} with the
* pair of fields its vault type uses: skyvault names an {@code entityName} and a {@code redactionType}; flowvault
* names a {@code tokenGroupName} and a {@code redactionPattern}. Only those classes can extend this type.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

import com.skyflow.generated.common.rest.types.RedactionLevel;
import com.skyflow.generated.common.rest.types.RedactionLevelEntityName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* File formats accepted by {@code reidentifyFile} as the request {@code dataFormat}: the formats that support the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* One output artifact of {@code reidentifyFile}. The same shape as {@link FileOutput}, with the format reported as a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.skyflow.detect;
package com.skyflow.vault.detect;

/**
* How the file of {@code reidentifyFile} is supplied, and how its response reports the output. Each SDK ships
* its own {@code com.skyflow.detect.ReidentifySourceType} enum implementing this interface, with {@code BASE64}
* its own {@code com.skyflow.vault.detect.ReidentifySourceType} enum implementing this interface, with {@code BASE64}
* and {@code PRESIGNED_URL} in both SDKs. {@code getOutputType()} on {@code ReidentifyFileResponse} returns a
* constant of that same enum. The constant name is the wire value.
*/
Expand Down
Loading
Loading