apucher closed pull request #3497: [TE] frontend - alert performnace -
resilience to missing alert
URL: https://github.com/apache/incubator-pinot/pull/3497
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/thirdeye/thirdeye-frontend/app/pods/manage/alerts/performance/route.js
b/thirdeye/thirdeye-frontend/app/pods/manage/alerts/performance/route.js
index bed7814a89..548b23b737 100644
--- a/thirdeye/thirdeye-frontend/app/pods/manage/alerts/performance/route.js
+++ b/thirdeye/thirdeye-frontend/app/pods/manage/alerts/performance/route.js
@@ -208,10 +208,6 @@ export default Route.extend({
const groupsWithAppName = activeGroups.filter(group =>
isPresent(group.application));
const groupsWithAlertId = groupsWithAppName.filter(group =>
group.emailConfig.functionIds.length > 0);
const filteredGroups = isDemoMode ? groupsWithAlertId.slice(0, 3) :
groupsWithAlertId;
-
- // NOTE: use this in order to find non-existent alert in the event of an
error
- // filteredGroups.filter(group =>
group.emailConfig.functionIds.includes(45639479)));
-
const idsByApplication = fillAppBuckets(model.applications,
filteredGroups);
Object.assign(model, { idsByApplication });
},
@@ -239,16 +235,7 @@ export default Route.extend({
// Get perf data for each alert and assign it to the model
fetchAppAnomalies(idsByApplication, startDate, endDate)
.then((richFunctionObjects) => {
- // Catch any rejected promises
- if (isPromiseRejected(richFunctionObjects)) {
- const badId = richFunctionObjects.filter(obj => obj.state !==
'fulfilled').map((obj) => {
- return getWithDefault(obj, 'reason.response.url',
'').split('?')[0].split('/').pop();
- });
- const errMsg = badId.length ? `API error with alert ids
${badId.join(',')}` : 'API error';
- throw new Error(errMsg);
- }
-
- const newFunctionObjects = richFunctionObjects.map(obj => obj.value);
+ const newFunctionObjects = richFunctionObjects.filter(obj => obj.state
=== 'fulfilled').map(obj => obj.value);
const availableGroups = Array.from(new
Set(newFunctionObjects.map(alertObj => alertObj.name)));
const roundable = ['totalAlerts', 'totalResponses', 'falseAlarm',
'newTrend', 'trueAnomalies', 'userReportAnomaly'];
let sortMenuGlyph = {};
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]