fix: remove hardcoded DB DDL from V1 migration and upgrade setup-gradle to v4#99
Merged
Merged
Conversation
…radle to v4 Agent-Logs-Url: https://github.com/EspacoGeek-Teams/SpringAPI_EspacoGeek/sessions/b1979d7a-8d26-4311-909c-2f4c3bf21524 Co-authored-by: vitorhugo-java <65777252+vitorhugo-java@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
vitorhugo-java
April 15, 2026 00:42
View session
Owner
|
Isso vai dar BO no server, mas depois eu arrumo |
Contributor
There was a problem hiding this comment.
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/USEstatements from the Flyway V1 migration so migrations run within the JDBC-selected schema. - Upgraded
gradle/actions/setup-gradlefrom@v3to@v4across 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two failures in the
build_native_and_publishCI job: Flyway crashing on startup due toespacogeekdbaccess denial, and a Gradle post-stepBUILD FAILEDfrom an incompatible cache-cleanup API.Changes
V1__initial_schema.sql— Removed the MySQL-dump artifact linesCREATE DATABASE IF NOT EXISTS \espacogeekdb`andUSE `espacogeekdb`. Flyway operates within the schema specified by the JDBC URL; the CI test usertestuserhas access only totestdb, causing anAccess denied (1044)` on every native container startup.cicd.yml— Bumped all threegradle/actions/setup-gradle@v3references to@v4. Thev3cleanup script readsremoveUnusedEntriesOlderThan, which became write-only in Gradle 8.8+, producing a spuriousBUILD FAILEDin the post-step regardless of actual build outcome.