Skip to content

build: update to latest import-spec version - #4084

Open
fbiville wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
fbiville:neo4j/key-mapping-serializability
Open

build: update to latest import-spec version#4084
fbiville wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
fbiville:neo4j/key-mapping-serializability

Conversation

@fbiville

Copy link
Copy Markdown
Collaborator

This includes a serializability fix for key mappings.

This also includes a downgrade of the JSON schema library, which silently broke the Java 11 compatibility promise of import-spec (Dataflow works with Java 17+ so it's not an issue here, but it's an issue in other import-spec user projects).
This is basically a partial revert of f22c284

This includes a serializability fix for key mappings.

This also includes a downgrade of the JSON schema library, which
silently broke the Java 11 compatibility promise of import-spec
(Dataflow works with Java 17+ so it's not an issue here, but it's
an issue in other import-spec user projects).
This is basically a partial revert of f22c284
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the 'import-spec' dependency and adjusts the JSON schema validation logic to ensure compatibility with Java 11. The changes involve migrating to a different version of the JSON schema library, which required updating the internal validation code and corresponding unit tests to align with the new API.

Highlights

  • Dependency Update: Updated the 'import-spec' dependency to version 1.0.0-rc21.
  • JSON Schema Library Migration: Downgraded the JSON schema library to address Java 11 compatibility issues, necessitating updates to the schema validation implementation.
  • Validation Logic Refactoring: Updated 'InputValidator' and 'Json' utility classes to use the new 'JsonSchemaFactory' and 'ValidationMessage' API.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the import-spec dependency version to 1.0.0-rc21 and migrates the JSON schema validation logic in the googlecloud-to-neo4j template to use the newer JsonSchema and JsonSchemaFactory APIs from com.networknt.schema. This involves replacing legacy Schema and Error classes with JsonSchema and ValidationMessage, along with updating the corresponding unit tests to reflect the new validation message formats. There are no review comments to evaluate, and I have no feedback to provide.

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.05%. Comparing base (4efa054) to head (1e619d3).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4084      +/-   ##
============================================
- Coverage     56.07%   56.05%   -0.02%     
+ Complexity     7316     6860     -456     
============================================
  Files          1127     1127              
  Lines         68572    68573       +1     
  Branches       7757     7757              
============================================
- Hits          38450    38437      -13     
- Misses        27635    27648      +13     
- Partials       2487     2488       +1     
Components Coverage Δ
spanner-templates 87.41% <ø> (-0.01%) ⬇️
spanner-import-export 68.86% <ø> (-0.13%) ⬇️
spanner-live-forward-migration 89.24% <ø> (-0.02%) ⬇️
spanner-live-reverse-replication 83.17% <ø> (-0.02%) ⬇️
spanner-bulk-migration 92.22% <ø> (-0.01%) ⬇️
gcs-spanner-dv 88.52% <ø> (-0.02%) ⬇️
Files with missing lines Coverage Δ
.../cloud/teleport/v2/neo4j/model/InputValidator.java 83.33% <100.00%> (ø)
...com/google/cloud/teleport/v2/neo4j/model/Json.java 87.17% <100.00%> (+0.33%) ⬆️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fbiville

Copy link
Copy Markdown
Collaborator Author

Failure seems to come from PubSubToAvroIT

@damccorm damccorm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! Rerunning checks to try to get green before merging

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants