Skip to content

Conversation

seuros
Copy link
Member

@seuros seuros commented Sep 23, 2025

  • Add third database connection using GitHub's Trilogy adapter
  • Create Trilogy models (TrilogyTag, TrilogyTagAudit, TrilogyLabel)
  • Update all test suites to include Trilogy adapter tests
  • Configure CI workflow to test with MariaDB alongside MySQL and PostgreSQL
  • Add rake task for Trilogy database setup

This enables testing with_advisory_lock across three different database adapters:

  • PostgreSQL (primary)
  • MySQL with mysql2 (secondary)
  • MariaDB 12.0+ with Trilogy (trilogy)

fixes #129

- Add third database connection using GitHub's Trilogy adapter
- Create Trilogy models (TrilogyTag, TrilogyTagAudit, TrilogyLabel)
- Update all test suites to include Trilogy adapter tests
- Configure CI workflow to test with MariaDB alongside MySQL and PostgreSQL
- Add rake task for Trilogy database setup

This enables testing with_advisory_lock across three different database adapters:
- PostgreSQL (primary)
- MySQL with mysql2 (secondary)
- MariaDB 12.0+ with Trilogy (trilogy)
@seuros seuros requested a review from Copilot September 23, 2025 06:46
Copy link
Contributor

@Copilot 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

Adds support for the Trilogy adapter (GitHub's MariaDB/MySQL driver) to enable testing with_advisory_lock functionality across three different database adapters: PostgreSQL, MySQL2, and Trilogy with MariaDB 12.0+.

  • Introduces Trilogy models (TrilogyTag, TrilogyTagAudit, TrilogyLabel) that mirror existing PostgreSQL and MySQL models
  • Updates all existing test suites to include Trilogy adapter test cases
  • Configures CI workflow to test against MariaDB alongside existing PostgreSQL and MySQL databases

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/with_advisory_lock/thread_test.rb Adds TrilogyThreadTest class for thread-based lock testing
test/with_advisory_lock/shared_test.rb Adds TrilogySharedLocksTest for shared lock behavior validation
test/with_advisory_lock/parallelism_test.rb Adds TrilogyParallelismTest for concurrent lock testing
test/with_advisory_lock/multi_adapter_test.rb Extends isolation tests to verify all three adapters don't interfere
test/test_helper.rb Adds DATABASE_URL_TRILOGY environment variable validation
test/sanity_check_test.rb Extends database isolation and adapter verification tests
test/dummy/lib/tasks/trilogy.rake Provides Rake tasks for Trilogy database setup and schema loading
test/dummy/db/trilogy_schema.rb Defines database schema for Trilogy test models
test/dummy/config/database.yml Adds Trilogy database configuration
test/dummy/app/models/trilogy_*.rb Creates Trilogy model classes mirroring existing test structure
.github/workflows/ci.yml Adds MariaDB service and Trilogy environment configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@seuros seuros force-pushed the feat/trilogy-mariadb-support branch 2 times, most recently from 438dacb to 13f09a6 Compare September 23, 2025 15:09
@seuros seuros force-pushed the feat/trilogy-mariadb-support branch from 13f09a6 to efd7f7c Compare September 23, 2025 22:59
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.

Since version 7 MariaDB infinite timeouts do not work anymore
1 participant