Skip to content

[Fix] Use latest versions of db services#1157

Merged
RichardAnderson merged 5 commits into
vitodeploy:4.xfrom
RichardAnderson:fix/maria-db-versions
Jun 13, 2026
Merged

[Fix] Use latest versions of db services#1157
RichardAnderson merged 5 commits into
vitodeploy:4.xfrom
RichardAnderson:fix/maria-db-versions

Conversation

@RichardAnderson

@RichardAnderson RichardAnderson commented Jun 13, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added MySQL 9.7 and new MariaDB versions (12.3, 11.8); parameterised installers support templated version selection for databases.
  • Bug Fixes

    • More robust uninstall/shutdown sequences for MariaDB and MySQL; PostgreSQL uninstall now handles clusters gracefully.
  • Refactor

    • Consolidated install scripts into unified templated installers; improved key import/resilience for MySQL/PostgreSQL.
  • Tests

    • Updated tests and fixtures to reflect MySQL 8.4 and MariaDB 10.11 where applicable; removed older version tests.

@RichardAnderson RichardAnderson requested a review from Copilot June 13, 2026 11:15
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Centralises install script rendering via an installScript() View helper; implements it for MariaDB, MySQL and PostgreSQL; parameterises and hardens DB install/uninstall templates; updates supported service-version lists; and adjusts tests to new MariaDB/MySQL versions.

Changes

Database installer templates and supported versions

Layer / File(s) Summary
installScript() helper and implementations
app/Services/Database/AbstractDatabase.php, app/Services/Database/Mariadb.php, app/Services/Database/Mysql.php, app/Services/Database/Postgresql.php
Adds typed installScript(): View on AbstractDatabase and implements it in Mariadb, Mysql and Postgresql to render the install view with the service version.
MariaDB template parameterisation and tests
resources/views/ssh/services/database/mariadb/install.blade.php, resources/views/ssh/services/database/mariadb/uninstall.blade.php, tests/Feature/BackupTest.php, tests/Feature/ServicesTest.php
Repo setup download uses fixed filename and mariadb-{{ $version }}; uninstall tries multiple stop commands; tests updated to use 10.11.
MySQL key handling and uninstall
resources/views/ssh/services/database/mysql/install.blade.php, resources/views/ssh/services/database/mysql/uninstall.blade.php
Adds resilient MySQL GPG key import with keyserver retries and dearmor fallback, includes key tooling packages, parameterises mysql-{{ $version }}-lts repo, and broadens/silences uninstall purge steps.
PostgreSQL unified installer and safer uninstall
resources/views/ssh/services/database/postgresql/install.blade.php, resources/views/ssh/services/database/postgresql/uninstall.blade.php
Introduces a templated PostgreSQL installer with key import fallback, cluster recreation using UTF-8 locale, verification steps, and pre-uninstall cluster drop plus fault-tolerant purge.
ServiceType supported versions
app/Providers/ServiceTypeServiceProvider.php
Updates supported versions lists: adds MySQL 9.7; removes PostgreSQL 13 and 12 entries; adjusts MariaDB versions to add 12.3, 11.8 and drop older 10.x entries.
Test baselines: MySQL version bumps
tests/Feature/ServerTemplateTest.php, tests/TestCase.php, tests/Unit/Actions/Service/InstallTest.php
Test fixtures and assertions updated to use MySQL 8.4 instead of 8.0.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • saeedvaziry
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The PR title '[Fix] Use latest versions of db services' directly summarizes the main change: updating database services to support the latest versions.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI 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.

Pull request overview

This PR updates the MariaDB service to support currently installable upstream versions on fresh Ubuntu systems and reduces duplication by switching to a single parameterized install script.

Changes:

  • Update MariaDB default/tested version to 10.11 and refresh the supported MariaDB version list.
  • Consolidate version-specific MariaDB install templates into one dynamic install.blade.php driven by the selected version.
  • Make MariaDB uninstall more tolerant of missing init/systemd service commands.

Reviewed changes

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

Show a summary per file
File Description
tests/Feature/ServicesTest.php Updates service install fixture data to use MariaDB 10.11.
tests/Feature/BackupTest.php Updates backup matrix to use MariaDB 10.11.
resources/views/ssh/services/database/mariadb/uninstall.blade.php Makes service stop calls error-tolerant before removing packages/data.
resources/views/ssh/services/database/mariadb/install.blade.php Parameterizes mariadb_repo_setup to install the selected MariaDB version.
resources/views/ssh/services/database/mariadb/install-114.blade.php Removes version-specific install script (now replaced by dynamic template).
resources/views/ssh/services/database/mariadb/install-106.blade.php Removes version-specific install script (now replaced by dynamic template).
resources/views/ssh/services/database/mariadb/install-104.blade.php Removes version-specific install script (now replaced by dynamic template).
resources/views/ssh/services/database/mariadb/install-103.blade.php Removes version-specific install script (now replaced by dynamic template).
app/Services/Database/Mariadb.php Overrides installScript() to render the new dynamic MariaDB install template with a version variable.
app/Services/Database/AbstractDatabase.php Refactors install flow to call an overridable installScript() hook.
app/Providers/ServiceTypeServiceProvider.php Updates the supported MariaDB versions exposed to the UI/service registration.

Comment thread resources/views/ssh/services/database/mariadb/uninstall.blade.php
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@RichardAnderson RichardAnderson changed the title [Fix] Use latest versions of mariadb [Fix] Use latest versions of db services Jun 13, 2026
@RichardAnderson RichardAnderson merged commit 32f92f2 into vitodeploy:4.x Jun 13, 2026
4 checks passed
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.

3 participants