-
Notifications
You must be signed in to change notification settings - Fork 3
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
Groups/samples_count #783
Groups/samples_count #783
Conversation
bbb1ca7
to
62f2e53
Compare
This comment has been minimized.
This comment has been minimized.
ccd7ee7
to
a09d761
Compare
This comment has been minimized.
This comment has been minimized.
I found a bug where deleting a project doesn't properly update the samples_count for the parent groups. Currently working on it. |
Fixed in 5eb4621 |
5eb4621
to
59cde47
Compare
This comment has been minimized.
This comment has been minimized.
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.
A couple comments at first glance.
You'll want to add UI tests as well for each of the actions (ie: after deleting a sample, return to the group index page and verify the sample count in the group's table row is accurate).
ac91d50
to
6e93c79
Compare
This comment has been minimized.
This comment has been minimized.
@malchua I was testing out your PR and came across this: The number of samples is not being displayed for the projects on the |
This comment has been minimized.
This comment has been minimized.
935e539
to
dcc4e5d
Compare
This comment has been minimized.
This comment has been minimized.
After talking to Eric, he recommended that I add the missing UI tests for the project samples_counters in a different PR. I will work on that PR after this one. |
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.
@ericenns @deepsidhu85 Feel free to chime in if you guys don't feel the same about the following.
I think you'll have to add group.samples_count
manually to all groups like you have for projects.
In addition, I'd add a test to each of group and project models to loop through all projects/groups and check the current fixture samples_count
to the actual samples_count
(retrieve the real samples_count from Project.reset_counters
/ your group scope). This will help keep everyone accountable to update the sample_counts as we continue to add samples to our fixtures and keep things accurate. Add a comment to each test with something like If you've added samples to fixtures, update the sample_count to the corresponding project/group
as the project/group won't be specified when the test fails.
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 found a few edge cases where samples_count is not properly updated.
2dc414b
to
3777cbb
Compare
3777cbb
to
59587ac
Compare
Code Metrics Report
Code coverage of files in pull request scope (100.0%)Reported by octocov |
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.
Looks good!
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.
Looks good to me!
What does this PR do and why?
Describe in detail what your merge request does and why.
This PR adds a samples_count column to Groups to show the total number of samples contained within a group. This also includes all samples in projects within subgroups.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other pull requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
PR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.