Skip to content

fix(xtest): Enable extended rsa tests for java >= v0.13.0#417

Merged
elizabethhealy merged 7 commits intomainfrom
dspx-2517-enable-rsa-extended-java
Mar 3, 2026
Merged

fix(xtest): Enable extended rsa tests for java >= v0.13.0#417
elizabethhealy merged 7 commits intomainfrom
dspx-2517-enable-rsa-extended-java

Conversation

@elizabethhealy
Copy link
Member

@elizabethhealy elizabethhealy commented Mar 3, 2026

Java sdk enables rsa 4096 with opentdf/java-sdk#343, passing the tests against this branch

Dynamic version check for RSA 4096 support: A new mechanism was introduced in cli.sh to dynamically check if the Java SDK version supports RSA 4096, specifically for versions at or above 0.13.0.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

X-Test Failure Report

@gemini-code-assist
Copy link
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 xtest framework to correctly enable and test RSA 4096 encryption mechanisms for the Java SDK. It introduces a dynamic version check to determine RSA 4096 support based on the installed Java SDK version, specifically targeting versions 0.13.0 and newer, and removes a previous hardcoded limitation.

Highlights

  • Enabled RSA 4096 testing for Java SDK: The xtest framework now supports testing RSA 4096 functionality for the Java SDK.
  • Dynamic version check for RSA 4096 support: A new mechanism was introduced in cli.sh to dynamically check if the Java SDK version supports RSA 4096, specifically for versions 0.13.0 and above.
  • Removed hardcoded support status: The tdfs.py file no longer hardcodes False for RSA 4096 support in Java, allowing the dynamic version check to take precedence.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • xtest/sdk/java/cli.sh
    • Added a new mechanism-rsa-4096 case to check the Java SDK version for RSA 4096 support.
  • xtest/tdfs.py
    • Commented out the line that explicitly returned False for mechanism-rsa-4096 when the SDK is Java.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/xtest.yml
Activity
  • No specific activity (comments, reviews, progress) was provided in the context.
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 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 counter productive. 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

X-Test Failure Report

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

X-Test Failure Report

@elizabethhealy elizabethhealy changed the title fix(xtest): Enable extended rsa tests for java >= v0.13.0 fix(xtest): Enable extended rsa tests for java > v0.12.0 Mar 3, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 3, 2026

Copy link
Contributor

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

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 enables extended RSA tests for the Java SDK for versions 0.13.0 and newer. The changes involve updating a shell script to detect SDK version capabilities and modifying a Python test file to use this detection logic. My review includes a correction to the version checking logic to align with the intended support range and a suggestion to improve code clarity by removing commented-out code.

I am having trouble creating individual review comments. Click here to see my feedback.

xtest/sdk/java/cli.sh (95-97)

medium

The version check logic appears to implement support for versions > 0.12.0, but the pull request title indicates support starts from v0.13.0. The current logic would incorrectly succeed for versions like 0.12.1, which is not >= 0.13.0. The logic should be simplified to check for versions >= 0.13.0 to match the intended change. I've also updated the comment to reflect this.

       # rsa4096 support in >= 0.13.0
      set -o pipefail
      java -jar "$SCRIPT_DIR"/cmdline.jar --version | jq -re .version | awk -F. '{ if ($1 > 0 || ($1 == 0 && $2 >= 13)) exit 0; else exit 1; }'

xtest/tdfs.py (456-457)

medium

To improve readability and avoid leaving dead code in the codebase, it's better to remove these commented-out lines entirely. The logic will then correctly fall through to the default supports check, which calls the cli.sh script.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

@elizabethhealy elizabethhealy changed the title fix(xtest): Enable extended rsa tests for java > v0.12.0 fix(xtest): Enable extended rsa tests for java >= v0.13.0 Mar 3, 2026
@elizabethhealy elizabethhealy marked this pull request as ready for review March 3, 2026 19:47
@elizabethhealy elizabethhealy requested review from a team as code owners March 3, 2026 19:47
@elizabethhealy elizabethhealy merged commit 3157426 into main Mar 3, 2026
18 checks passed
@elizabethhealy elizabethhealy deleted the dspx-2517-enable-rsa-extended-java branch March 3, 2026 21:34
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.

2 participants