Skip to content
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

feat: Get Groups with basic aggregation #10086

Merged
merged 12 commits into from
Oct 30, 2024

Conversation

AmanuelAaron
Copy link
Contributor

@AmanuelAaron AmanuelAaron commented Oct 21, 2024

Ticket

ET-831

Description

Create GetGroups endpoint for grouping runs in the run table by a provided column. For this ticket we are only grouping by default columns.

Test Plan

integration tests

Checklist

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

@cla-bot cla-bot bot added the cla-signed label Oct 21, 2024
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 88.52459% with 7 lines in your changes missing coverage. Please review.

Project coverage is 54.61%. Comparing base (b1c1106) to head (74abd44).
Report is 1 commits behind head on feature/row-grouping.

Files with missing lines Patch % Lines
master/internal/api_runs.go 88.52% 7 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                    @@
##           feature/row-grouping   #10086      +/-   ##
========================================================
- Coverage                 59.19%   54.61%   -4.59%     
========================================================
  Files                       756     1260     +504     
  Lines                    105076   157696   +52620     
  Branches                   3631     3632       +1     
========================================================
+ Hits                      62201    86127   +23926     
- Misses                    42741    71435   +28694     
  Partials                    134      134              
Flag Coverage Δ
backend 45.41% <88.52%> (+1.60%) ⬆️
harness 72.74% <ø> (ø)
web 54.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
master/internal/api_runs.go 67.84% <88.52%> (ø)

... and 503 files with indirect coverage changes

@AmanuelAaron AmanuelAaron marked this pull request as ready for review October 24, 2024 13:48
@AmanuelAaron AmanuelAaron requested a review from a team as a code owner October 24, 2024 13:48
Copy link
Contributor

@jesse-amano-hpe jesse-amano-hpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good overall, my only comment isn't even a nit, just a flat remark.

Join("LEFT JOIN runs_metadata AS rm ON r.id=rm.run_id").
Join("LEFT JOIN users u ON e.owner_id = u.id").
Join("LEFT JOIN projects p ON r.project_id = p.id").
Join("LEFT JOIN workspaces w ON p.workspace_id = w.id")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's beginning to get a little confusing and disjointed, having all these extra table and column aliases off in their own functions just because some other function (filterRunQuery) might do something with rm.metadata. Not sure what we can do about it just now, but I think it's worth pointing out now and then so we keep thinking about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will be returning the metadata for groups in following PRs. For now we are just doing the default columns.

@AmanuelAaron AmanuelAaron merged commit 9943bac into feature/row-grouping Oct 30, 2024
79 of 91 checks passed
@AmanuelAaron AmanuelAaron deleted the aaron_amanuel/simple-get-groups branch October 30, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants