mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-15 12:37:18 +00:00
* fix: test case alerts and un-indexable fields * fix: test case alerts and un-indexable fields (cherry picked from commit b1edb964699c1d365b9e1154f05591e4b26ebb21)
This commit is contained in:
parent
05cb6818ac
commit
c804336e66
@ -3993,7 +3993,7 @@ public abstract class EntityRepository<T extends EntityInterface> {
|
||||
sessionTimeoutMillis = timeout;
|
||||
}
|
||||
|
||||
private boolean consolidateChanges(T original, T updated, Operation operation) {
|
||||
protected boolean consolidateChanges(T original, T updated, Operation operation) {
|
||||
// If user is the same and the new update is with in the user session timeout
|
||||
return original.getVersion() > 0.1 // First update on an entity that
|
||||
&& operation == Operation.PATCH
|
||||
|
@ -710,6 +710,11 @@ public class TestCaseRepository extends EntityRepository<TestCase> {
|
||||
super(original, updated, operation);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean consolidateChanges(TestCase original, TestCase updated, Operation operation) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Transaction
|
||||
@Override
|
||||
public void entitySpecificUpdate(boolean consolidatingChanges) {
|
||||
@ -754,6 +759,7 @@ public class TestCaseRepository extends EntityRepository<TestCase> {
|
||||
original.getUseDynamicAssertion(),
|
||||
updated.getUseDynamicAssertion());
|
||||
recordChange("testCaseStatus", original.getTestCaseStatus(), updated.getTestCaseStatus());
|
||||
recordChange("testCaseResult", original.getTestCaseResult(), updated.getTestCaseResult());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -243,10 +243,17 @@ public class TestCaseResultRepository extends EntityTimeSeriesRepository<TestCas
|
||||
resultSummaries.stream()
|
||||
.filter(s -> s.getTestCaseName().equals(testCase.getFullyQualifiedName()))
|
||||
.findFirst()
|
||||
.ifPresent(
|
||||
.ifPresentOrElse(
|
||||
s -> {
|
||||
s.setStatus(testCase.getTestCaseStatus());
|
||||
s.setTimestamp(testCase.getTestCaseResult().getTimestamp());
|
||||
},
|
||||
() -> {
|
||||
resultSummaries.add(
|
||||
new ResultSummary()
|
||||
.withTestCaseName(testCase.getFullyQualifiedName())
|
||||
.withStatus(testCase.getTestCaseStatus())
|
||||
.withTimestamp(testCase.getTestCaseResult().getTimestamp()));
|
||||
});
|
||||
} else {
|
||||
testSuite.setTestCaseResultSummary(
|
||||
|
@ -565,6 +565,12 @@ public class TestSuiteRepository extends EntityRepository<TestSuite> {
|
||||
super(original, updated, operation);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean consolidateChanges(
|
||||
TestSuite original, TestSuite updated, Operation operation) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Transaction
|
||||
@Override
|
||||
public void entitySpecificUpdate(boolean consolidatingChanges) {
|
||||
|
@ -16,7 +16,8 @@ import org.openmetadata.service.search.SearchIndexUtils;
|
||||
import org.openmetadata.service.search.models.SearchSuggest;
|
||||
|
||||
public record TestCaseIndex(TestCase testCase) implements SearchIndex {
|
||||
private static final Set<String> excludeFields = Set.of("changeDescription", "failedRowsSample");
|
||||
private static final Set<String> excludeFields =
|
||||
Set.of("changeDescription", "failedRowsSample", "incrementalChangeDescription");
|
||||
|
||||
@Override
|
||||
public Object getEntity() {
|
||||
|
@ -16,7 +16,8 @@ import org.openmetadata.service.search.SearchIndexUtils;
|
||||
import org.openmetadata.service.util.JsonUtils;
|
||||
|
||||
public record TestCaseResultIndex(TestCaseResult testCaseResult) implements SearchIndex {
|
||||
private static final Set<String> excludeFields = Set.of("changeDescription", "failedRowsSample");
|
||||
private static final Set<String> excludeFields =
|
||||
Set.of("changeDescription", "failedRowsSample", "incrementalChangeDescription");
|
||||
|
||||
@Override
|
||||
public Object getEntity() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user