Skip to content

SK-3168,SK-3204-Add-query-getTokens-uploadFiles-and-deleteFiles-to-flowvault - #435

Merged
skyflow-himanshupal merged 4 commits into
flowvault-release/26.10.0from
himanshupal/SK-3168-flowvault-Java-parity-fix
Oct 9, 2026
Merged

skyflow-himanshupal merged 4 commits into
flowvault-release/26.10.0from
himanshupal/SK-3168-flowvault-Java-parity-fix

Conversation

@skyflow-himanshupal

Copy link
Copy Markdown
Collaborator

Adds the four unary operations from the Java flowvault design doc — vault().query(), vault().getTokens(), vault().uploadFiles() and vault().deleteFiles() — and migrates the flowvault SDK to the regenerated Fern client.

Why

  • Brings the Java flowvault SDK to parity with the Python flowvault SDK for ExecuteQuery, GetTokens, UploadFiles and DeleteFiles (SK-3168).
  • The Fern client was regenerated (records, tokens, query and files resources replace flowservice and the V1* types), so the existing operations were migrated to it.

Goal

  • Query: runs a SQL SELECT and returns fields, metadata.columns and the call's requestId.
  • GetTokens: returns the deterministic token for each value and token group, one row per input in request order.
  • UploadFiles: requests a signed URL per column, then uploads each file's bytes to it with HTTP PUT. Each column reports UPLOADED, FAILED or SKIPPED. Accepts filePath, base64 or fileObject.
  • DeleteFiles: deletes files from file columns by skyflowId or uniqueValues, returning {column, status} per record.
  • All four are unary, take *Options for custom headers, and come with Base* classes in common, validation, README sections and samples.
  • Non-goals: bulk/async variants and E2E tests (separate PR in sdk-integration-tests).

Testing

  • Unit tests cover validation, request building, response formatting, typed API errors, custom headers and per-record errors for all four operations.
  • UploadFilesFormatsTests runs real uploads against a local HTTP server: 30 file formats × 3 sources, checking bytes, Content-Type, file name and method. It also covers a large file, an empty file, overrides, a storage-side rejection and an upload longer than the vault-call timeout.
  • Existing tests were migrated to the new generated types.
  • Full suite passes on JDK 11: common 184, skyvault 575, flowvault 941.

Tech debt

  • Upload content types now come from an SDK-owned extension table, so the same file gets the same type on every JDK version.

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.39%. Comparing base (eecd06a) to head (113600f).

Additional details and impacted files
@@                       Coverage Diff                       @@
##             flowvault-release/26.10.0     #435      +/-   ##
===============================================================
+ Coverage                        90.99%   91.39%   +0.40%     
- Complexity                           0      605     +605     
===============================================================
  Files                              174      197      +23     
  Lines                             7350     8126     +776     
  Branches                          1013     1132     +119     
===============================================================
+ Hits                              6688     7427     +739     
- Misses                             437      449      +12     
- Partials                           225      250      +25     
Flag Coverage Δ
common 90.19% <100.00%> (+1.04%) ⬆️
flowvault 88.96% <100.00%> (+1.03%) ⬆️
skyvault 95.02% <ø> (+0.06%) ⬆️
unittests-flowvault 90.53% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Module: common 90.19% <100.00%> (+1.04%) ⬆️
Module: skyvault 95.02% <ø> (+0.06%) ⬆️
Module: flowvault 88.96% <100.00%> (+1.03%) ⬆️
Service Account 87.36% <ø> (ø)
Vault Data 92.13% <100.00%> (+1.31%) ⬆️
Vault Tokens 99.03% <ø> (ø)
Vault Connection 100.00% <ø> (ø)
Vault Controller 83.32% <ø> (+0.56%) ⬆️
Detect 100.00% <ø> (ø)
Audit 100.00% <ø> (ø)
BIN Lookup 100.00% <ø> (ø)
Config 96.26% <ø> (ø)
Utils 90.94% <ø> (+0.57%) ⬆️
Errors 100.00% <100.00%> (ø)
Enums 100.00% <100.00%> (ø)
Logs 96.15% <100.00%> (+0.54%) ⬆️
Files with missing lines Coverage Δ
...src/main/java/com/skyflow/errors/ErrorMessage.java 100.00% <100.00%> (ø)
...mmon/src/main/java/com/skyflow/logs/ErrorLogs.java 100.00% <100.00%> (ø)
...ommon/src/main/java/com/skyflow/logs/InfoLogs.java 100.00% <100.00%> (ø)
...com/skyflow/vault/data/BaseDeleteFilesRequest.java 100.00% <100.00%> (ø)
...om/skyflow/vault/data/BaseDeleteFilesResponse.java 100.00% <100.00%> (ø)
...a/com/skyflow/vault/data/BaseGetTokensRequest.java 100.00% <100.00%> (ø)
.../com/skyflow/vault/data/BaseGetTokensResponse.java 100.00% <100.00%> (ø)
...com/skyflow/vault/data/BaseUploadFilesRequest.java 100.00% <100.00%> (ø)
...om/skyflow/vault/data/BaseUploadFilesResponse.java 100.00% <100.00%> (ø)
...owvault/src/main/java/com/skyflow/VaultClient.java 97.67% <100.00%> (+0.27%) ⬆️
... and 22 more

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eecd06a...113600f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Duplicate file columns, malformed unique values, sequential signed-URL uploads, and out-of-range double serialization can produce incorrect behavior.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity

Open (3)
What changed in this PR

Adds unary query, token lookup, file upload, and file deletion capabilities to Flow Vault while migrating the SDK to the regenerated Fern client.

Changes:

  • Adds request/response models, validation, formatting, options, and signed-URL upload handling.
  • Migrates generated resources from flowservice/V1* types to records, tokens, query, and files clients.
  • Adds extensive tests, documentation, samples, and packaging updates.
File Description
.cspell.json Adds terminology used by generated code and file-format tests.
common/​src/​main/​java/​com/​skyflow/​errors/​ErrorMessage.java Adds validation messages for the new operations.
common/​src/​main/​java/​com/​skyflow/​logs/​{ErrorLogs,InfoLogs}.java Adds operation logging messages.
common/​src/​main/​java/​com/​skyflow/​vault/​data/​Base*.java Adds shared request and response base classes.
common/​src/​test/​java/​com/​skyflow/​vault/​data/​Base*Tests.java Tests the new shared data classes.
flowvault/​README.md Documents the four unary APIs.
flowvault/​pom.xml Consolidates shade-plugin executions.
flowvault/​samples/​src/​main/​java/​com/​example/​vault/​*Example.java Demonstrates query, token lookup, upload, and deletion.
flowvault/​src/​main/​java/​com/​skyflow/​VaultClient.java Exposes regenerated resource clients and a signed-URL HTTP client.
flowvault/​src/​main/​java/​com/​skyflow/​enums/​InterfaceName.java Adds names for the new operations.
flowvault/​src/​main/​java/​com/​skyflow/​utils/​Utils.java Builds wire requests and formats operation responses.
flowvault/​src/​main/​java/​com/​skyflow/​utils/​validations/​Validations.java Validates the new request types.
flowvault/​src/​main/​java/​com/​skyflow/​vault/​controller/​VaultController.java Implements the four unary operations and file PUT workflow.
flowvault/​src/​main/​java/​com/​skyflow/​vault/​data/​*.java Adds operation-specific requests, responses, records, metadata, and options.
flowvault/​src/​main/​java/​com/​skyflow/​generated/​rest/​ApiClient.java Adds regenerated synchronous resource access.
flowvault/​src/​main/​java/​com/​skyflow/​generated/​rest/​AsyncApiClient.java Adds regenerated asynchronous resource access.
flowvault/​src/​main/​java/​com/​skyflow/​generated/​rest/​RawApiClient.java Adds regenerated raw client functionality.
flowvault/​src/​main/​java/​com/​skyflow/​generated/​rest/​core/​*.java Updates generated serialization, HTTP, logging, and stream support.
flowvault/​src/​main/​java/​com/​skyflow/​generated/​rest/​errors/​*.java Adds generated typed HTTP errors.
flowvault/​src/​main/​java/​com/​skyflow/​generated/​rest/​resources/​files/​*.java Adds file upload and deletion clients.
flowvault/​src/​main/​java/​com/​skyflow/​generated/​rest/​resources/​query/​*.java Adds query clients.
flowvault/​src/​main/​java/​com/​skyflow/​generated/​rest/​resources/​records/​*.java Migrates record operations to regenerated clients.
flowvault/​src/​main/​java/​com/​skyflow/​generated/​rest/​resources/​tokens/​*.java Migrates token operations and adds token lookup.
flowvault/​src/​main/​java/​com/​skyflow/​generated/​rest/​types/​*.java Replaces legacy V1* models with regenerated types.
flowvault/​src/​test/​java/​com/​skyflow/​**/​*.java Tests validation, request mapping, errors, headers, responses, and file formats.
skyvault/​pom.xml Consolidates shade-plugin executions.
skyvault/​src/​test/​java/​com/​skyflow/​utils/​logger/​LogUtilTests.java Adds logger setup and filtering coverage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread flowvault/src/main/java/com/skyflow/vault/controller/VaultController.java Outdated
@skyflow-himanshupal
skyflow-himanshupal merged commit 086e4dd into flowvault-release/26.10.0 Oct 9, 2026
28 checks passed
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.

3 participants