Conversation
🟡 Playwright Results — all passed (20 flaky)✅ 3411 passed · ❌ 0 failed · 🟡 20 flaky · ⏭️ 209 skipped
🟡 20 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
| List<MigrationFile> availableNativeMigrations = | ||
| availableMigrations.stream().filter(migration -> !migration.isExtension).toList(); | ||
| Optional<String> maxMigration = | ||
| executedMigrations.stream().max(MigrationWorkflow::compareVersions); | ||
| if (maxMigration.isPresent()) { | ||
| return availableNativeMigrations | ||
| .filter(migration -> migration.biggerThan(maxMigration.get())) | ||
| .toList(); | ||
| List<MigrationFile> result = new ArrayList<>(); | ||
| for (MigrationFile migration : availableNativeMigrations) { | ||
| if (migration.biggerThan(maxMigration.get())) { | ||
| result.add(migration); | ||
| } else if (compareVersions(migration.version, maxMigration.get()) == 0) { | ||
| migration.setReprocessing(true); | ||
| result.add(migration); | ||
| } | ||
| } | ||
| return result; | ||
| } | ||
| return availableNativeMigrations.toList(); | ||
| return availableNativeMigrations; |
* fix: process migration not executed * fix: tests for process migration not executed * fix: O(n) -> O(1)
There was a problem hiding this comment.
Pull request overview
Implements “continuous migrations” so the migration runner can re-evaluate the currently deployed server version and apply newly appended SQL statements without requiring a new version directory.
Changes:
- Added a
reprocessingflag andhasNewStatements()toMigrationFile, and exposed these viaMigrationProcess. - Updated
MigrationWorkflowversion-selection and filtering to support reprocessing the current max version and skipping reprocessing when no new SQL exists. - Added unit tests covering reprocessing selection and “new SQL appended to same version” scenarios.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| openmetadata-service/src/main/java/org/openmetadata/service/migration/utils/MigrationFile.java | Tracks reprocessing state and whether parsing yielded any new SQL statements. |
| openmetadata-service/src/main/java/org/openmetadata/service/migration/api/MigrationProcess.java | Extends the migration process contract with reprocessing/new-statement signals. |
| openmetadata-service/src/main/java/org/openmetadata/service/migration/api/MigrationProcessImpl.java | Implements the new MigrationProcess methods by delegating to MigrationFile. |
| openmetadata-service/src/main/java/org/openmetadata/service/migration/api/MigrationWorkflow.java | Adjusts migration selection/execution flow for continuous migrations and reprocessing. |
| openmetadata-service/src/test/java/org/openmetadata/service/migration/MigrationWorkflowReprocessingTest.java | New tests for reprocessing behavior and incremental SQL pickup. |
| openmetadata-service/src/test/java/org/openmetadata/service/migration/api/MigrationWorkflowTest.java | New tests for version filtering rules (native vs extension/collate). |
# Conflicts: # openmetadata-service/src/main/java/org/openmetadata/service/migration/api/MigrationWorkflow.java # openmetadata-service/src/test/java/org/openmetadata/service/migration/api/MigrationWorkflowTest.java
…gration/api/MigrationWorkflow.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…verage gate Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| currentMaxMigrationVersion = | ||
| executedMigrations.stream().max(MigrationWorkflow::compareVersions); |
There was a problem hiding this comment.
💡 Edge Case: currentMaxMigrationVersion may resolve to extension version
At line 273, currentMaxMigrationVersion is computed using compareVersions, which strips the -extension suffix. This means "1.12.1" and "1.12.1-collate" compare as equal, and Stream.max() could return either one non-deterministically depending on DB ordering. In contrast, processNativeMigrations and processExtensionMigrations correctly use compareReprocessingCandidates which is deterministic.
The practical impact is low because currentMaxMigrationVersion is only used for context initialization and logging (line 374), where the version string serves as a map key. However, using compareReprocessingCandidates here would be more consistent and predictable.
Suggested fix:
currentMaxMigrationVersion =
executedMigrations.stream().max(MigrationWorkflow::compareReprocessingCandidates);
Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion
Code Review 👍 Approved with suggestions 3 resolved / 4 findingsAdds continuous migration reprocessing to re-run Java data migrations and fixes state mutation issues in processNativeMigrations. Consider verifying that currentMaxMigrationVersion correctly handles extension version suffixes in edge cases. 💡 Edge Case: currentMaxMigrationVersion may resolve to extension versionAt line 273, The practical impact is low because Suggested fix✅ 3 resolved✅ Bug: Reprocessing migration re-runs Java data migrations
✅ Quality: Unrelated .claustre session/hook files committed in migration PR
✅ Quality: processNativeMigrations mutates shared MigrationFile objects
🤖 Prompt for agentsOptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|



Describe your changes:
Fixes #26570
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
isReprocessing()andhasNewStatements()methods toMigrationProcessinterface and implementationMigrationWorkflowto detect and reprocess versions with new SQL appendedreprocessingflag andcopyWithReprocessing()method toMigrationFileandFlywayMigrationFilehasNewStatements()to identify newly appended SQL statementsContinuousMigrationITwith three reprocessing scenariosMigrationWorkflowReprocessingTestandMigrationProcessImplTestThis will update automatically on new commits.