mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-16 04:57:11 +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;
|
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
|
// 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
|
return original.getVersion() > 0.1 // First update on an entity that
|
||||||
&& operation == Operation.PATCH
|
&& operation == Operation.PATCH
|
||||||
|
@ -710,6 +710,11 @@ public class TestCaseRepository extends EntityRepository<TestCase> {
|
|||||||
super(original, updated, operation);
|
super(original, updated, operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean consolidateChanges(TestCase original, TestCase updated, Operation operation) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Transaction
|
@Transaction
|
||||||
@Override
|
@Override
|
||||||
public void entitySpecificUpdate(boolean consolidatingChanges) {
|
public void entitySpecificUpdate(boolean consolidatingChanges) {
|
||||||
@ -754,6 +759,7 @@ public class TestCaseRepository extends EntityRepository<TestCase> {
|
|||||||
original.getUseDynamicAssertion(),
|
original.getUseDynamicAssertion(),
|
||||||
updated.getUseDynamicAssertion());
|
updated.getUseDynamicAssertion());
|
||||||
recordChange("testCaseStatus", original.getTestCaseStatus(), updated.getTestCaseStatus());
|
recordChange("testCaseStatus", original.getTestCaseStatus(), updated.getTestCaseStatus());
|
||||||
|
recordChange("testCaseResult", original.getTestCaseResult(), updated.getTestCaseResult());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,10 +243,17 @@ public class TestCaseResultRepository extends EntityTimeSeriesRepository<TestCas
|
|||||||
resultSummaries.stream()
|
resultSummaries.stream()
|
||||||
.filter(s -> s.getTestCaseName().equals(testCase.getFullyQualifiedName()))
|
.filter(s -> s.getTestCaseName().equals(testCase.getFullyQualifiedName()))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.ifPresent(
|
.ifPresentOrElse(
|
||||||
s -> {
|
s -> {
|
||||||
s.setStatus(testCase.getTestCaseStatus());
|
s.setStatus(testCase.getTestCaseStatus());
|
||||||
s.setTimestamp(testCase.getTestCaseResult().getTimestamp());
|
s.setTimestamp(testCase.getTestCaseResult().getTimestamp());
|
||||||
|
},
|
||||||
|
() -> {
|
||||||
|
resultSummaries.add(
|
||||||
|
new ResultSummary()
|
||||||
|
.withTestCaseName(testCase.getFullyQualifiedName())
|
||||||
|
.withStatus(testCase.getTestCaseStatus())
|
||||||
|
.withTimestamp(testCase.getTestCaseResult().getTimestamp()));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
testSuite.setTestCaseResultSummary(
|
testSuite.setTestCaseResultSummary(
|
||||||
|
@ -565,6 +565,12 @@ public class TestSuiteRepository extends EntityRepository<TestSuite> {
|
|||||||
super(original, updated, operation);
|
super(original, updated, operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean consolidateChanges(
|
||||||
|
TestSuite original, TestSuite updated, Operation operation) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Transaction
|
@Transaction
|
||||||
@Override
|
@Override
|
||||||
public void entitySpecificUpdate(boolean consolidatingChanges) {
|
public void entitySpecificUpdate(boolean consolidatingChanges) {
|
||||||
|
@ -16,7 +16,8 @@ import org.openmetadata.service.search.SearchIndexUtils;
|
|||||||
import org.openmetadata.service.search.models.SearchSuggest;
|
import org.openmetadata.service.search.models.SearchSuggest;
|
||||||
|
|
||||||
public record TestCaseIndex(TestCase testCase) implements SearchIndex {
|
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
|
@Override
|
||||||
public Object getEntity() {
|
public Object getEntity() {
|
||||||
|
@ -16,7 +16,8 @@ import org.openmetadata.service.search.SearchIndexUtils;
|
|||||||
import org.openmetadata.service.util.JsonUtils;
|
import org.openmetadata.service.util.JsonUtils;
|
||||||
|
|
||||||
public record TestCaseResultIndex(TestCaseResult testCaseResult) implements SearchIndex {
|
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
|
@Override
|
||||||
public Object getEntity() {
|
public Object getEntity() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user