Skip to content

fix: remove hardcoded DB DDL from V1 migration and upgrade setup-gradle to v4#99

Merged
vitorhugo-java merged 1 commit into
masterfrom
copilot/fix-errors-in-spring-api
Apr 15, 2026
Merged

fix: remove hardcoded DB DDL from V1 migration and upgrade setup-gradle to v4#99
vitorhugo-java merged 1 commit into
masterfrom
copilot/fix-errors-in-spring-api

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

Two failures in the build_native_and_publish CI job: Flyway crashing on startup due to espacogeekdb access denial, and a Gradle post-step BUILD FAILED from an incompatible cache-cleanup API.

Changes

  • V1__initial_schema.sql — Removed the MySQL-dump artifact lines CREATE DATABASE IF NOT EXISTS \espacogeekdb`andUSE `espacogeekdb`. Flyway operates within the schema specified by the JDBC URL; the CI test user testuserhas access only totestdb, causing an Access denied (1044)` on every native container startup.

  • cicd.yml — Bumped all three gradle/actions/setup-gradle@v3 references to @v4. The v3 cleanup script reads removeUnusedEntriesOlderThan, which became write-only in Gradle 8.8+, producing a spurious BUILD FAILED in the post-step regardless of actual build outcome.

@vitorhugo-java vitorhugo-java marked this pull request as ready for review April 15, 2026 00:42
Copilot AI review requested due to automatic review settings April 15, 2026 00:42
@vitorhugo-java vitorhugo-java merged commit dc40c1d into master Apr 15, 2026
2 checks passed
@vitorhugo-java
Copy link
Copy Markdown
Owner

Isso vai dar BO no server, mas depois eu arrumo

@vitorhugo-java vitorhugo-java deleted the copilot/fix-errors-in-spring-api branch April 15, 2026 00:43
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

This PR fixes CI failures by removing MySQL dump artifacts that break Flyway in restricted CI DB users, and by updating the GitHub Actions Gradle setup action to a compatible major version.

Changes:

  • Removed CREATE DATABASE / USE statements from the Flyway V1 migration so migrations run within the JDBC-selected schema.
  • Upgraded gradle/actions/setup-gradle from @v3 to @v4 across the workflow to avoid Gradle 8.8+ cache-cleanup API incompatibilities.

Reviewed changes

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

File Description
src/main/resources/db/migration/V1__initial_schema.sql Removes schema-creation/select statements that cause Flyway to fail under CI credentials.
.github/workflows/cicd.yml Updates all workflow uses of setup-gradle to v4 to prevent post-step failures with newer Gradle versions.

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

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