mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 19:18:05 +00:00
MINOR - Migration validation list diff message (#16015)
* MINOR - Migration validation list diff message * wording * Trigger Build
This commit is contained in:
parent
4ed87a4d08
commit
39dde222b2
@ -4,6 +4,7 @@ import static org.openmetadata.schema.type.EventType.ENTITY_CREATED;
|
||||
import static org.openmetadata.schema.type.EventType.ENTITY_DELETED;
|
||||
import static org.openmetadata.schema.type.EventType.ENTITY_UPDATED;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.json.JsonPatch;
|
||||
import javax.json.JsonValue;
|
||||
@ -324,12 +325,19 @@ public class SystemRepository {
|
||||
.withDescription(ValidationStepDescription.MIGRATION.key)
|
||||
.withPassed(Boolean.TRUE);
|
||||
}
|
||||
List<String> missingVersions =
|
||||
new ArrayList<>(migrationValidationClient.getExpectedMigrationList());
|
||||
missingVersions.removeAll(currentVersions);
|
||||
|
||||
List<String> unexpectedVersions = new ArrayList<>(currentVersions);
|
||||
unexpectedVersions.removeAll(migrationValidationClient.getExpectedMigrationList());
|
||||
|
||||
return new StepValidation()
|
||||
.withDescription(ValidationStepDescription.MIGRATION.key)
|
||||
.withPassed(Boolean.FALSE)
|
||||
.withMessage(
|
||||
String.format(
|
||||
"Found the versions [%s], but expected [%s]",
|
||||
currentVersions, migrationValidationClient.getExpectedMigrationList()));
|
||||
"Missing migrations that were not executed %s. Unexpected executed migrations %s",
|
||||
missingVersions, unexpectedVersions));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user