mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-03 06:03:12 +00:00
* feat: add test case resolution task workflow * chore: add migration for test case resolution feature * fix: removed required field for object compatibiity in older migrations * fix: minor testCaseResolution status logic * chore: revert migration for test case incident * chore: update migration file * chore: clean up code * style: fix java stylecheck
This commit is contained in:
parent
cdddc0c891
commit
fe4c353bf3
@ -4,5 +4,17 @@ SET json = REPLACE(json, '"customMetricsProfile"', '"customMetrics"');
|
|||||||
|
|
||||||
-- Delete customMetricsProfile from entity_extension
|
-- Delete customMetricsProfile from entity_extension
|
||||||
-- This was not supported on the processing side before 1.3.
|
-- This was not supported on the processing side before 1.3.
|
||||||
DELETE FROM openmetadata_db.entity_extension ee
|
DELETE FROM entity_extension ee
|
||||||
where extension like '%customMetrics';
|
where extension like '%customMetrics';
|
||||||
|
|
||||||
|
-- BEGIN: Incident Manager Migration
|
||||||
|
-- STEP 1: Update test case testCaseResult.testCaseFailureStatus field
|
||||||
|
UPDATE test_case
|
||||||
|
SET json = JSON_REMOVE(json, '$.testCaseResult.testCaseFailureStatus')
|
||||||
|
WHERE json -> '$.testCaseResult.testCaseFailureStatus' IS NOT NULL;
|
||||||
|
|
||||||
|
|
||||||
|
-- STEP 2: remove all `testCaseFailureStatus` field in test results
|
||||||
|
UPDATE data_quality_data_time_series d
|
||||||
|
SET json = JSON_REMOVE(json, '$.testCaseFailureStatus');
|
||||||
|
-- END: Incident Manager Migration
|
||||||
|
@ -5,4 +5,13 @@ SET json = REPLACE(json::text, '"customMetricsProfile"', '"customMetrics"')::jso
|
|||||||
-- Delete customMetricsProfile from entity_extension
|
-- Delete customMetricsProfile from entity_extension
|
||||||
-- This was not supported on the processing side before 1.3.
|
-- This was not supported on the processing side before 1.3.
|
||||||
DELETE FROM entity_extension ee
|
DELETE FROM entity_extension ee
|
||||||
where extension like '%customMetrics';
|
where extension like '%customMetrics';
|
||||||
|
|
||||||
|
-- BEGIN: Incident Manager Migration
|
||||||
|
-- STEP 1: Update test case testCaseResult.testCaseFailureStatus field
|
||||||
|
UPDATE test_case
|
||||||
|
SET json = json::jsonb#-'{testCaseResult,testCaseFailureStatus}';
|
||||||
|
-- STEP 2: remove all `testCaseFailureStatus` field in test results
|
||||||
|
UPDATE data_quality_data_time_series d
|
||||||
|
SET json = json::jsonb#-'{testCaseFailureStatus}';
|
||||||
|
-- END: Incident Manager Migration
|
@ -110,6 +110,7 @@ public class TestCaseResolutionStatusRepository
|
|||||||
TestCaseResolutionStatus recordEntity, String extension, String recordFQN) {
|
TestCaseResolutionStatus recordEntity, String extension, String recordFQN) {
|
||||||
TestCaseResolutionStatus latestTestCaseFailure =
|
TestCaseResolutionStatus latestTestCaseFailure =
|
||||||
getLatestRecord(recordEntity.getTestCaseReference().getFullyQualifiedName());
|
getLatestRecord(recordEntity.getTestCaseReference().getFullyQualifiedName());
|
||||||
|
|
||||||
recordEntity.setStateId(
|
recordEntity.setStateId(
|
||||||
((latestTestCaseFailure != null)
|
((latestTestCaseFailure != null)
|
||||||
&& (latestTestCaseFailure.getTestCaseResolutionStatusType()
|
&& (latestTestCaseFailure.getTestCaseResolutionStatusType()
|
||||||
|
@ -1770,7 +1770,7 @@ public class TestCaseResourceTest extends EntityResourceTest<TestCase, CreateTes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ResultList<TestCaseResolutionStatus> getTestCaseFailureStatus(
|
public ResultList<TestCaseResolutionStatus> getTestCaseFailureStatus(
|
||||||
Long startTs,
|
Long startTs,
|
||||||
Long endTs,
|
Long endTs,
|
||||||
String assignee,
|
String assignee,
|
||||||
|
@ -90,8 +90,7 @@
|
|||||||
"description": "Reference to the failure status object for the test case result.",
|
"description": "Reference to the failure status object for the test case result.",
|
||||||
"$ref": "./testCaseResolutionStatus.json"
|
"$ref": "./testCaseResolutionStatus.json"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"additionalProperties": false
|
|
||||||
},
|
},
|
||||||
"testSuiteExecutionFrequency": {
|
"testSuiteExecutionFrequency": {
|
||||||
"description": "How often the test case should run.",
|
"description": "How often the test case should run.",
|
||||||
|
@ -34,6 +34,6 @@
|
|||||||
"$ref": "../type/entityReference.json"
|
"$ref": "../type/entityReference.json"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["testCaseFailureReason", "resolvedBy", "testCaseFailureComment"],
|
"required": ["testCaseFailureReason", "testCaseFailureComment"],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user