Skip to content

Add migration test#1083

Draft
michalkrzyz wants to merge 1 commit intomainfrom
mikrzyz/add-migration-test
Draft

Add migration test#1083
michalkrzyz wants to merge 1 commit intomainfrom
mikrzyz/add-migration-test

Conversation

@michalkrzyz
Copy link
Copy Markdown
Collaborator

@michalkrzyz michalkrzyz commented Feb 9, 2026

If we want to have this kind of test in testrun we would need to consider:

  • detect schema change and run tests conditionally
  • use randomized mariadb schema

On-behalf-of: SAP Michal Krzyz michal.krzyz@sap.com

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

  • Related Issue # (issue)
  • Closes # (issue)
  • Fixes # (issue)

Remove if not applicable

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • Separate ticket for tests # (issue/pr)

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Added to documentation?

  • 📜 README.md
  • 🤝 Documentation pages updated
  • 🙅 no documentation needed
  • (if applicable) generated OpenAPI docs for CRD changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@michalkrzyz michalkrzyz force-pushed the mikrzyz/add-migration-test branch 9 times, most recently from acdf34d to 7e47d92 Compare February 9, 2026 15:42
@michalkrzyz michalkrzyz changed the base branch from kanstantsinbuklis-sap/issue-1071/remove-activity to main February 9, 2026 15:42
@michalkrzyz michalkrzyz marked this pull request as draft February 9, 2026 16:05
@michalkrzyz michalkrzyz changed the base branch from main to kanstantsinbuklis-sap/issue-1070/remove-evidence February 10, 2026 13:31
@kanstantsinbuklis-sap kanstantsinbuklis-sap force-pushed the kanstantsinbuklis-sap/issue-1070/remove-evidence branch from e050951 to 36ee9cb Compare February 10, 2026 13:46
Base automatically changed from kanstantsinbuklis-sap/issue-1070/remove-evidence to main February 17, 2026 10:23
@michalkrzyz michalkrzyz force-pushed the mikrzyz/add-migration-test branch 5 times, most recently from b9679e4 to 6a1410d Compare March 27, 2026 10:48
@michalkrzyz michalkrzyz marked this pull request as ready for review March 27, 2026 10:48
Copilot AI review requested due to automatic review settings March 27, 2026 10:48
@michalkrzyz michalkrzyz force-pushed the mikrzyz/add-migration-test branch from 6a1410d to 8549846 Compare March 27, 2026 10:49
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

Adds a CI mechanism to run a “migration up/down” smoke test only when MariaDB migration files change, to keep PR test runs fast while still validating schema migrations when relevant.

Changes:

  • Add Makefile targets to detect migration changes and run an up/down migration test against a dedicated schema.
  • Update CI workflow to fetch base ref, detect migration changes, and conditionally run the migration test.
  • Refactor create-migration to use the shared MIGRATIONS_DIR variable.

Reviewed changes

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

File Description
Makefile Adds migration detection/testing targets and updates migration file checks.
.github/workflows/tests.yaml Conditionally installs migration tooling and runs the migration test when migrations change.

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

@michalkrzyz michalkrzyz force-pushed the mikrzyz/add-migration-test branch 2 times, most recently from d2369a0 to 4cc23a7 Compare March 27, 2026 11:32
@michalkrzyz michalkrzyz force-pushed the mikrzyz/add-migration-test branch 3 times, most recently from 30d3dd7 to 45ed1b5 Compare March 27, 2026 12:39
@michalkrzyz michalkrzyz marked this pull request as draft March 27, 2026 13:01
@michalkrzyz michalkrzyz force-pushed the mikrzyz/add-migration-test branch 6 times, most recently from ed2dc3c to 9ffc2d2 Compare March 27, 2026 14:13
On-behalf-of: SAP Michal Krzyz <michal.krzyz@sap.com>
Signed-off-by: Michal Krzyz <michalkrzyz@gmail.com>
@michalkrzyz michalkrzyz force-pushed the mikrzyz/add-migration-test branch from 9ffc2d2 to d6f6ed4 Compare March 27, 2026 14:17
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.

2 participants