You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/01/21 20:48:25 UTC
[GitHub] [incubator-pinot] tejasajmera opened a new pull request #6472: [TE]frontend - Activate the composite anomalies route
tejasajmera opened a new pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472
Activating the composite anomalies route for Entity Monitoring.
Misc:
1. Bug fix.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] JoeFuentes-WebDev commented on a change in pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
JoeFuentes-WebDev commented on a change in pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472#discussion_r562792975
##########
File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js
##########
@@ -12,9 +12,14 @@ import { formatYamlFilter, redundantParse } from 'thirdeye-frontend/utils/yaml-t
import moment from 'moment';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
+const ANALYSIS_RANGE = [
+ moment().add(1, 'day').subtract(30, 'day').startOf('day').valueOf(),
+ moment().add(1, 'day').startOf('day').valueOf()
+];
+
Review comment:
I know it's beyond the scope of this PR, but I think this sort of constant is a good candidate for being in the `thirdeye-frontend/app/utils/constants` file: ANALYSIS_30_DAY_RANGE
(with some descriptive explanation)
... so it can be reused
Also, is 30 days really what's desired? think Feb (28-day month) or 31-day months
would `.subtract(1, 'months')` make more sense?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] tejasajmera commented on a change in pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
tejasajmera commented on a change in pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472#discussion_r562844274
##########
File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js
##########
@@ -12,9 +12,14 @@ import { formatYamlFilter, redundantParse } from 'thirdeye-frontend/utils/yaml-t
import moment from 'moment';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
+const ANALYSIS_RANGE = [
+ moment().add(1, 'day').subtract(30, 'day').startOf('day').valueOf(),
+ moment().add(1, 'day').startOf('day').valueOf()
+];
+
Review comment:
I think yes you are right. I think we may want to have it programatic based on the month. But I am not 100% sure yet, will need to confirm and see if there was a rationale to hardcode it to 30 in the first place. As you said, we don't want to address tangential things in this PR, so in one of the future PR's we'd address it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] tejasajmera commented on a change in pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
tejasajmera commented on a change in pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472#discussion_r562895316
##########
File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js
##########
@@ -12,9 +12,14 @@ import { formatYamlFilter, redundantParse } from 'thirdeye-frontend/utils/yaml-t
import moment from 'moment';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
+const ANALYSIS_RANGE = [
+ moment().add(1, 'day').subtract(30, 'day').startOf('day').valueOf(),
+ moment().add(1, 'day').startOf('day').valueOf()
+];
+
Review comment:
I would not want to commingle any refactoring effort into this RB. It is confusing to reviewers. This should be part of another PR.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] JoeFuentes-WebDev edited a comment on pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
JoeFuentes-WebDev edited a comment on pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472#issuecomment-765728382
LGTM 👍🏽
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] JoeFuentes-WebDev commented on a change in pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
JoeFuentes-WebDev commented on a change in pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472#discussion_r562792975
##########
File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js
##########
@@ -12,9 +12,14 @@ import { formatYamlFilter, redundantParse } from 'thirdeye-frontend/utils/yaml-t
import moment from 'moment';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
+const ANALYSIS_RANGE = [
+ moment().add(1, 'day').subtract(30, 'day').startOf('day').valueOf(),
+ moment().add(1, 'day').startOf('day').valueOf()
+];
+
Review comment:
I know it's beyond the scope of this PR, but I think this sort of constant is a good candidate for being in the `thirdeye-frontend/tests/utils/constants` file: ANALYSIS_30_DAY_RANGE
(with some descriptive explanation)
... so it can be reused
Also, is 30 days really what's desired? think Feb (28-day month) or 31-day months
would `.subtract(1, 'months')` make more sense?
##########
File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js
##########
@@ -106,16 +116,16 @@ export default Route.extend(AuthenticatedRouteMixin, {
notifications.error('Retrieving subscription groups failed.', error, toastOptions);
}
- let subscribedGroups = "";
+ let subscribedGroups = '';
if (typeof get(this, 'subscriptionGroups') === 'object' && get(this, 'subscriptionGroups').length > 0) {
const groups = get(this, 'subscriptionGroups');
for (let key in groups) {
- if (groups.hasOwnProperty(key)) {
+ if (key in groups) {
let group = groups[key];
Review comment:
nitpic: isn't this redundant?
i.e. won't `(key in groups)` always be _**true**_ inside of `for (let key in groups)`. ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] jihaozh merged pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
jihaozh merged pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] JoeFuentes-WebDev commented on pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
JoeFuentes-WebDev commented on pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472#issuecomment-765728382
LGTM
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] tejasajmera commented on a change in pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
tejasajmera commented on a change in pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472#discussion_r562844719
##########
File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js
##########
@@ -12,9 +12,14 @@ import { formatYamlFilter, redundantParse } from 'thirdeye-frontend/utils/yaml-t
import moment from 'moment';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
+const ANALYSIS_RANGE = [
+ moment().add(1, 'day').subtract(30, 'day').startOf('day').valueOf(),
+ moment().add(1, 'day').startOf('day').valueOf()
+];
+
Review comment:
I think yes you are right. I think we may want to have it programatic based on the month. But I am not 100% sure yet, will need to confirm and see if there was a rationale to hardcode it to 30 in the first place. As you said, we don't want to address tangential things in this PR, so in one of the future PR's we'd address it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] tejasajmera commented on a change in pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
tejasajmera commented on a change in pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472#discussion_r562865959
##########
File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js
##########
@@ -106,16 +116,16 @@ export default Route.extend(AuthenticatedRouteMixin, {
notifications.error('Retrieving subscription groups failed.', error, toastOptions);
}
- let subscribedGroups = "";
+ let subscribedGroups = '';
if (typeof get(this, 'subscriptionGroups') === 'object' && get(this, 'subscriptionGroups').length > 0) {
const groups = get(this, 'subscriptionGroups');
for (let key in groups) {
- if (groups.hasOwnProperty(key)) {
+ if (key in groups) {
let group = groups[key];
Review comment:
I realized I was trying to correct the `eslint` error in an incorrect way. I should be doing `if ({}.propertyIsEnumerable.call(groups, key))`. Using `Object.keys(groups).forEach(group) { ...} ` will work, but it involves usage of extra memory for creating the array and an O(N) processing,
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] JoeFuentes-WebDev commented on a change in pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
JoeFuentes-WebDev commented on a change in pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472#discussion_r562845797
##########
File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js
##########
@@ -106,16 +116,16 @@ export default Route.extend(AuthenticatedRouteMixin, {
notifications.error('Retrieving subscription groups failed.', error, toastOptions);
}
- let subscribedGroups = "";
+ let subscribedGroups = '';
if (typeof get(this, 'subscriptionGroups') === 'object' && get(this, 'subscriptionGroups').length > 0) {
const groups = get(this, 'subscriptionGroups');
for (let key in groups) {
- if (groups.hasOwnProperty(key)) {
+ if (key in groups) {
let group = groups[key];
Review comment:
You could still do `Object.keys(groups).forEach(group) { ...} `. no?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] JoeFuentes-WebDev commented on a change in pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
JoeFuentes-WebDev commented on a change in pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472#discussion_r562788771
##########
File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js
##########
@@ -106,16 +116,16 @@ export default Route.extend(AuthenticatedRouteMixin, {
notifications.error('Retrieving subscription groups failed.', error, toastOptions);
}
- let subscribedGroups = "";
+ let subscribedGroups = '';
if (typeof get(this, 'subscriptionGroups') === 'object' && get(this, 'subscriptionGroups').length > 0) {
const groups = get(this, 'subscriptionGroups');
for (let key in groups) {
- if (groups.hasOwnProperty(key)) {
+ if (key in groups) {
let group = groups[key];
Review comment:
nitpic: isn't this redundant?
i.e. won't `(key in groups)` always be _**true**_ inside of `for (let key in groups)`. ?
wouldn't it be cleaner to write
```
groups.forEach(group => {
... ... ...
})
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] tejasajmera commented on a change in pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
tejasajmera commented on a change in pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472#discussion_r562841868
##########
File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js
##########
@@ -106,16 +116,16 @@ export default Route.extend(AuthenticatedRouteMixin, {
notifications.error('Retrieving subscription groups failed.', error, toastOptions);
}
- let subscribedGroups = "";
+ let subscribedGroups = '';
if (typeof get(this, 'subscriptionGroups') === 'object' && get(this, 'subscriptionGroups').length > 0) {
const groups = get(this, 'subscriptionGroups');
for (let key in groups) {
- if (groups.hasOwnProperty(key)) {
+ if (key in groups) {
let group = groups[key];
Review comment:
I've removed the `key in groups` but `for-each` cannot be used as we are working with object, not array.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] JoeFuentes-WebDev commented on a change in pull request #6472: [TE]frontend - Activate the composite anomalies route
Posted by GitBox <gi...@apache.org>.
JoeFuentes-WebDev commented on a change in pull request #6472:
URL: https://github.com/apache/incubator-pinot/pull/6472#discussion_r562879413
##########
File path: thirdeye/thirdeye-frontend/app/pods/manage/explore/route.js
##########
@@ -12,9 +12,14 @@ import { formatYamlFilter, redundantParse } from 'thirdeye-frontend/utils/yaml-t
import moment from 'moment';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
+const ANALYSIS_RANGE = [
+ moment().add(1, 'day').subtract(30, 'day').startOf('day').valueOf(),
+ moment().add(1, 'day').startOf('day').valueOf()
+];
+
Review comment:
OK. I agree with postponing the `30-day` hardcoding. But, I will would like to have it moved to the constants file.
I am seeing that it is use in 2 other places and it would make sense you just `re-`use it. In addition, if we decide to change the hardcoded aspect, then it will be done in one place and applied everywhere it is used
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org