Skip to content

WIP: Add integration test configuration for YubagyteDB version 2025#3338

Open
komamitsu wants to merge 4 commits into
masterfrom
add-test-with-yubagytedb-2025
Open

WIP: Add integration test configuration for YubagyteDB version 2025#3338
komamitsu wants to merge 4 commits into
masterfrom
add-test-with-yubagytedb-2025

Conversation

@komamitsu
Copy link
Copy Markdown
Contributor

Description

Provide a brief description about why this PR is necessary. Be sure to provide context.

Related issues and/or PRs

If this PR addresses or references any issues and/or other PRs, list them here. For example, "Fixes #123", "Related to #456", or "Addresses #789".

Changes made

Outline the specific changes made in this pull request. Include relevant details, such as added features, bug fixes, code refactoring, or improvements.

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • I have considered whether similar issues could occur in other products, components, or modules if this PR is for bug fixes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

Provide any additional information or notes that may be relevant to the reviewers or stakeholders.

Release notes

Provide release note text for this PR based on the guidelines at Guidelines for Writing Release Notes.

For example:

Added validation for the Consensus Commit mutation operation.

Copilot AI review requested due to automatic review settings January 26, 2026 06:35
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @komamitsu, 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 primarily focuses on expanding the integration test suite to include YugabyteDB version 2025.x. It involves updating the CI configuration to support this new version, making necessary adjustments to specific integration tests to ensure compatibility and stability with YugabyteDB's characteristics, and adding utility methods for environment detection. The overall goal is to enhance the robustness of the testing infrastructure for different database backends.

Highlights

  • YugabyteDB 2025.x Integration Test Configuration: Added support for YugabyteDB version 2025.1.0.1-b3 in the CI test configuration, parameterizing the YugabyteDB version for flexible testing.
  • YugabyteDB Specific Test Adjustments: Modified integration tests for cross-partition and multiple clustering key scans to limit the thread count to 1 when running against YugabyteDB, similar to Oracle, to accommodate specific database behaviors.
  • YugabyteDB Environment Detection: Introduced a new helper method isYugabyte() in JdbcEnv to programmatically identify if the current JDBC environment is configured for YugabyteDB.
  • Test Setup Initialization Order: Adjusted the initialization order in DistributedStorageCrossPartitionScanIntegrationTestBase to ensure StorageFactory is created before executorService.

🧠 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.

Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/permission-check.yaml
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.

@komamitsu
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
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 introduces integration test configuration for YugabyteDB, specifically targeting version 2025. The changes include parameterizing the YugabyteDB test setup in ci/tests-config.yaml to support multiple versions, adding a utility method isYugabyte() in JdbcEnv.java for better database identification, and adjusting the thread count for YugabyteDB in JdbcDatabaseCrossPartitionScanIntegrationTest.java and JdbcDatabaseMultipleClusteringKeyScanIntegrationTest.java. A critical fix was also applied in DistributedStorageCrossPartitionScanIntegrationTestBase.java to ensure the rdbEngine is properly initialized before getThreadNum() is called, which is essential for correct test execution with YugabyteDB.

Copy link
Copy Markdown
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 adds integration test configuration for YugabyteDB version 2025. It correctly parameterizes the CI configuration to run tests against multiple YugabyteDB versions and includes necessary workarounds in the test code, such as limiting execution to a single thread for YugabyteDB tests. The change also includes an important fix for the test setup initialization order, preventing a potential NullPointerException. The changes are logical and well-implemented. I've added a couple of suggestions to reduce code duplication for better maintainability.

@Override
protected int getThreadNum() {
if (JdbcTestUtils.isOracle(rdbEngine)) {
if (JdbcTestUtils.isOracle(rdbEngine) || JdbcTestUtils.isYugabyte(rdbEngine)) {
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.

medium

The condition JdbcTestUtils.isOracle(rdbEngine) || JdbcTestUtils.isYugabyte(rdbEngine) is also used in JdbcDatabaseMultipleClusteringKeyScanIntegrationTest. To avoid code duplication and improve maintainability, consider adding a new helper method in JdbcTestUtils, for example isSingleThreadedForTest(), and use it in both places.

Example in JdbcTestUtils:

public static boolean isSingleThreadedForTest(RdbEngineStrategy rdbEngine) {
    return isOracle(rdbEngine) || isYugabyte(rdbEngine);
}

Then you can simplify this to:

if (JdbcTestUtils.isSingleThreadedForTest(rdbEngine)) {

@Override
protected int getThreadNum() {
if (JdbcTestUtils.isOracle(rdbEngine)) {
if (JdbcTestUtils.isOracle(rdbEngine) || JdbcTestUtils.isYugabyte(rdbEngine)) {
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.

medium

This condition is duplicated in JdbcDatabaseCrossPartitionScanIntegrationTest. To improve maintainability, consider creating a shared helper method in JdbcTestUtils to encapsulate this logic. For example:

// in JdbcTestUtils.java
public static boolean isSingleThreadedForTest(RdbEngineStrategy rdbEngine) {
    return isOracle(rdbEngine) || isYugabyte(rdbEngine);
}

This would allow you to simplify the condition here and in the other test class.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates CI/integration-test configuration to run JDBC integration and permission tests against YugabyteDB 2025.x, and adjusts integration test behavior to accommodate Yugabyte-specific concurrency limitations.

Changes:

  • Add YugabyteDB 2025.x as an additional JDBC integration-test CI target (alongside existing 2.x).
  • Add a dedicated GitHub Actions permission integration-test job for YugabyteDB 2025.x.
  • Reduce test parallelism (thread count and parallel DDL) for YugabyteDB, and reorder executor initialization to occur after properties/engine setup.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
integration-test/src/main/java/com/scalar/db/api/DistributedStorageCrossPartitionScanIntegrationTestBase.java Initialize executor after properties-based factory creation (supports subclasses that determine thread count after reading properties).
core/src/integration-test/java/com/scalar/db/storage/jdbc/JdbcEnv.java Add YugabyteDB JDBC URL detection helper.
core/src/integration-test/java/com/scalar/db/storage/jdbc/JdbcDatabaseMultipleClusteringKeyScanIntegrationTest.java Force single-thread execution for YugabyteDB runs.
core/src/integration-test/java/com/scalar/db/storage/jdbc/JdbcDatabaseCrossPartitionScanIntegrationTest.java Force single-thread execution for YugabyteDB runs.
ci/tests-config.yaml Convert YugabyteDB CI entry into a versioned matrix including 2025.1.0.1-b3.
.github/workflows/permission-check.yaml Add a new YugabyteDB 2025 permission integration-test job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ci/tests-config.yaml
Comment on lines +216 to 226
- label: yugabytedb_%VERSION%
display_name: YugabyteDB %VERSION%
versions:
# YugabyteDB manages a global schema catalog version. A session using a stale version fails.
# Our integration tests address this limitation with some workarounds.
# However, version 2024.x is more sensitive to the schema catalog version mismatch, so we skip it.
# Since the YugabyteDB team aims to remove this limitation in 2025.x, the integration tests pass with that version.
- 2.20.4.0-b50
- 2025.1.0.1-b3
setup: "docker run -p 5433:5433 -e YSQL_USER=yugabyte -e YSQL_PASSWORD=yugabyte -d yugabytedb/yugabyte:%VERSION% bin/yugabyted start --background=false --master_flag=\"ysql_enable_db_catalog_version_mode=false\" --tserver_flags=\"ysql_enable_db_catalog_version_mode=false\""
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:yugabytedb://localhost:5433/?load-balance=any -Dscalardb.jdbc.username=yugabyte -Dscalardb.jdbc.password=yugabyte -Dscalar.db.jdbc.connection_pool.max_total=12 -Dscalar.db.jdbc.table_metadata.connection_pool.max_total=4 -Dscalar.db.jdbc.admin.connection_pool.max_total=4
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The PR description is still the default template/WIP and doesn't explain the motivation, scope, or how to validate these CI changes. Please update the PR description (especially the 'Description', 'Changes made', and testing/validation notes) so reviewers can assess the impact of adding YugabyteDB 2025 coverage.

Copilot uses AI. Check for mistakes.
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