-
Notifications
You must be signed in to change notification settings - Fork 0
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
Classification user groups migrations and models #23
Merged
yuenmichelle1
merged 12 commits into
main
from
classification_user_groups-migrations-and-models
Aug 23, 2023
Merged
Classification user groups migrations and models #23
yuenmichelle1
merged 12 commits into
main
from
classification_user_groups-migrations-and-models
Aug 23, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… on user classification count controller
zwolf
approved these changes
Aug 21, 2023
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.
yuenmichelle1
deleted the
classification_user_groups-migrations-and-models
branch
September 15, 2023 16:54
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned in #21, splitting up changes to
Designs found here:
https://www.figma.com/file/qbqbmR3t5XV6eKcpuRj7mG/Group-Stats?type=design&node-id=0-1&mode=design
Complexity of Similar Looking Continuous Aggregates and Argument for Why They Are Needed
You may have noticed the following continuous aggregates that look similar to a user based continuous aggregates:
For eg.
UserGroupClassificationCounts::DailyGroupUserClassificationCount
looks similar toUserClassificationCounts::DailyUserClassificationCount
ORUserGroupClassificationCounts::DailyGroupUserProjectClassificationCount
looks similar toUserClassificationCounts::DailyUserProjectClassificationCount
ORUserGroupClassificationCounts::DailyGroupUserWorkflowClassificationCount
looks similar toUserClassificationCounts::DailyUserWorkflowClassificationCount
and you may be wondering: Why query one as opposed to the other?
Reason/s
UserClassificationCounts::DailyUserClassificationCount
(any continuous aggregate with model beginning withUserClassificationCounts
) does not focus on WHEN a user has joined a group/left a group./classifications/users/:id
, we cannot query from any continuous aggregate with model beginning withUserGroupClassificationCounts
, because not every user belongs to a user_group.Possible Issues
With current implementation and complexity of the problem we want to solve, we do at least 3 queries per callout.
In order for accuracy, this heavily relies on Continuous Aggregates to be in sync. (If one is out of sync, data will look a little off and we would need to manually refresh continuous aggregate) .
UserGroupClassificationCounts::DailyGroupUserProjectClassificationCount
, HOWEVER, when serializing data to get response that we want, we would have to loop through this array of active records and do a lot ofgroup_by
s within our loops. This gets even complicated and inefficient when we think of our big corporate sponsors (a corporate sponsor that has done 8 million+ classifications since 2018).