mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-03 03:59:12 +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_DELETED;
|
||||||
import static org.openmetadata.schema.type.EventType.ENTITY_UPDATED;
|
import static org.openmetadata.schema.type.EventType.ENTITY_UPDATED;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.json.JsonPatch;
|
import javax.json.JsonPatch;
|
||||||
import javax.json.JsonValue;
|
import javax.json.JsonValue;
|
||||||
@ -324,12 +325,19 @@ public class SystemRepository {
|
|||||||
.withDescription(ValidationStepDescription.MIGRATION.key)
|
.withDescription(ValidationStepDescription.MIGRATION.key)
|
||||||
.withPassed(Boolean.TRUE);
|
.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()
|
return new StepValidation()
|
||||||
.withDescription(ValidationStepDescription.MIGRATION.key)
|
.withDescription(ValidationStepDescription.MIGRATION.key)
|
||||||
.withPassed(Boolean.FALSE)
|
.withPassed(Boolean.FALSE)
|
||||||
.withMessage(
|
.withMessage(
|
||||||
String.format(
|
String.format(
|
||||||
"Found the versions [%s], but expected [%s]",
|
"Missing migrations that were not executed %s. Unexpected executed migrations %s",
|
||||||
currentVersions, migrationValidationClient.getExpectedMigrationList()));
|
missingVersions, unexpectedVersions));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user