-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix aggregation sorting in browsev2 sidebar #8276
fix aggregation sorting in browsev2 sidebar #8276
Conversation
d4e8488
to
9b10d2a
Compare
const nameA = registry.getDisplayName(EntityType.DataPlatform, a.entity); | ||
const nameB = registry.getDisplayName(EntityType.DataPlatform, b.entity); | ||
return nameA.localeCompare(nameB); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Safe to assume these will always have an entity? I suppose we could fallback to sorting by the agg value if the entity wasn't present for some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think falling back to the agg value if the entity isn't present is safer here.. sometimes we see data get ingested on a platform where the platform entity has not been ingested (this is a bad state, but it does happen)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just checking if the entity of a platform agg exists first is a safe bet I think!
good call out - I think I need to make a quick tweak to filters in case the platform entity isn't there.
to be clear i think this is very unlikely, but still would be nice to guard against
const nameA = registry.getDisplayName(EntityType.DataPlatform, a.entity); | ||
const nameB = registry.getDisplayName(EntityType.DataPlatform, b.entity); | ||
return nameA.localeCompare(nameB); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think falling back to the agg value if the entity isn't present is safer here.. sometimes we see data get ingested on a platform where the platform entity has not been ingested (this is a bad state, but it does happen)
Didn't address all filters but did make a fix to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beautiful
Changes
Checklist