Skip to content

config(db): change jdbc driver to mariadb#2314

Merged
jo-elimu merged 1 commit intomainfrom
1965-change-jdbc-driver-to-mariadb
Jul 28, 2025
Merged

config(db): change jdbc driver to mariadb#2314
jo-elimu merged 1 commit intomainfrom
1965-change-jdbc-driver-to-mariadb

Conversation

@jo-elimu
Copy link
Copy Markdown
Member

Issue Number

Purpose

Technical Details

Testing Instructions

Screenshots


Format Checks

Note

Files in PRs are automatically checked for format violations with mvn spotless:check.

If this PR contains files with format violations, run mvn spotless:apply to fix them.

@jo-elimu jo-elimu self-assigned this Jul 28, 2025
@jo-elimu jo-elimu requested a review from a team as a code owner July 28, 2025 12:49
@jo-elimu jo-elimu linked an issue Jul 28, 2025 that may be closed by this pull request
@jo-elimu jo-elimu requested review from AshishBagdane, SnehaHS65 and Souvik-Cyclic and removed request for a team July 28, 2025 12:49
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.12%. Comparing base (cf1ad0c) to head (4027c3b).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2314   +/-   ##
=========================================
  Coverage     17.12%   17.12%           
  Complexity      462      462           
=========================================
  Files           261      261           
  Lines          7741     7741           
  Branches        897      897           
=========================================
  Hits           1326     1326           
  Misses         6333     6333           
  Partials         82       82           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@jo-elimu jo-elimu merged commit 69ad2a4 into main Jul 28, 2025
20 checks passed
@jo-elimu jo-elimu deleted the 1965-change-jdbc-driver-to-mariadb branch July 28, 2025 12:54
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jul 28, 2025

Walkthrough

The changes update the project to replace MySQL with MariaDB as the database backend. This involves removing the MySQL JDBC driver dependency and adding the MariaDB JDBC driver, as well as updating the JDBC driver class name in the production properties file. No other dependencies or configuration properties were changed.

Changes

Cohort / File(s) Change Summary
Dependency Update
pom-dependency-tree.txt
Removed MySQL Connector/J and its protobuf-java dependency; added MariaDB Java client dependency; incremented version.
JDBC Driver Configuration
src/main/resources/jdbc_PROD.properties
Changed JDBC driver class name from MySQL to MariaDB.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~6 minutes

Assessment against linked issues

Objective Addressed Explanation
Migrate from MySQL to MariaDB (dependencies, config files) (#1965)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes were found.

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 1965-change-jdbc-driver-to-mariadb

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
pom-dependency-tree.txt (1)

104-104: Confirm MariaDB driver upgrade & ensure no MySQL driver remains
MariaDB client 2.7.12 is safe, but version 3.x includes critical TLS/auth fixes—please verify 3.x is compatible with your Java 17 baseline and upgrade if feasible. Manually inspect all Maven POMs (and any other build files) for stray MySQL Connector/J artifacts or code references to com.mysql.cj.jdbc to avoid dual‐registration via DriverManager.

• Check every pom.xml (or parent/child POM) for mysql-connector or com.mysql.cj.jdbc entries
• Search source for any hard-coded MySQL driver class names
• Consider running locally:

find . -name pom.xml -exec grep -H "mysql-connector" {} \;
grep -R "com.mysql.cj.jdbc" .
src/main/resources/jdbc_PROD.properties (1)

2-3: Property mismatch may confuse future maintainers
jpa.database=MYSQL still reads “MYSQL” while the dialect is MariaDBDialect. Spring’s Database enum lacks a dedicated MARIADB value, so functionally this is harmless, but consider commenting why the value stays MYSQL (or simply remove the setting and rely on the dialect) to avoid confusion.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 18f6582 and 4027c3b.

⛔ Files ignored due to path filters (1)
  • pom.xml is excluded by !**/*.xml
📒 Files selected for processing (2)
  • pom-dependency-tree.txt (2 hunks)
  • src/main/resources/jdbc_PROD.properties (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: jo-elimu
PR: elimu-ai/webapp#2312
File: src/main/java/ai/elimu/entity/analytics/LetterSoundLearningEvent.java:19-31
Timestamp: 2025-07-27T03:40:02.040Z
Learning: In the elimu.ai webapp project, the database schema file at `src/main/resources/META-INF/jpa-schema-export.sql` is auto-generated from JPA entity annotations, so manual updates to this file are not needed when adding new entity fields.
src/main/resources/jdbc_PROD.properties (1)

Learnt from: jo-elimu
PR: #2312
File: src/main/java/ai/elimu/entity/analytics/LetterSoundLearningEvent.java:19-31
Timestamp: 2025-07-27T03:40:02.040Z
Learning: In the elimu.ai webapp project, the database schema file at src/main/resources/META-INF/jpa-schema-export.sql is auto-generated from JPA entity annotations, so manual updates to this file are not needed when adding new entity fields.

pom-dependency-tree.txt (2)

Learnt from: jo-elimu
PR: #2312
File: src/main/java/ai/elimu/entity/analytics/LetterSoundLearningEvent.java:19-31
Timestamp: 2025-07-27T03:40:02.040Z
Learning: In the elimu.ai webapp project, the database schema file at src/main/resources/META-INF/jpa-schema-export.sql is auto-generated from JPA entity annotations, so manual updates to this file are not needed when adding new entity fields.

Learnt from: jo-elimu
PR: elimu-ai/webapp#0
File: :0-0
Timestamp: 2025-05-03T08:01:30.217Z
Learning: The elimu-ai/webapp repository has a dependency on ai.elimu:model (version 2.0.97) that provides shared model classes and enums. The Language enum should be imported from ai.elimu.model.v2.enums.Language instead of creating local duplicates.

🔇 Additional comments (2)
pom-dependency-tree.txt (1)

1-1: Version bump looks fine
Project snapshot version increment from 2.6.109-SNAPSHOT → 2.6.110-SNAPSHOT is consistent with the dependency changes.

src/main/resources/jdbc_PROD.properties (1)

8-8: Good driver class update
Switch to org.mariadb.jdbc.Driver aligns with the new dependency. Make sure production URLs (jdbc:mariadb://…) are updated in the Jetty context file; the old jdbc:mysql:// prefix will still connect but yields deprecation warnings.

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.

Migrate from MySQL to MariaDB

1 participant