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

Records grouping bugfix #3751

Merged
merged 6 commits into from
Aug 13, 2024
Merged

Records grouping bugfix #3751

merged 6 commits into from
Aug 13, 2024

Conversation

mathemancer
Copy link
Contributor

@mathemancer mathemancer commented Aug 12, 2024

Fixes #3742

This adds a new field to the grouping response to collect result indices.

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the develop branch of the repository
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@mathemancer
Copy link
Contributor Author

@Anish9901 This PR is dependent on #3749 , and shouldn't be merged until after that one. But, it's ready for review.

@mathemancer mathemancer requested a review from Anish9901 August 12, 2024 10:04
@mathemancer mathemancer added this to the Beta milestone Aug 12, 2024
@mathemancer mathemancer added the pr-status: review A PR awaiting review label Aug 12, 2024
@mathemancer mathemancer requested a review from seancolsen August 12, 2024 10:20
@mathemancer
Copy link
Contributor Author

@seancolsen This is probably worth a quick glance for behavior if you have time.

Copy link
Member

@Anish9901 Anish9901 left a 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!

Copy link
Contributor

@seancolsen seancolsen left a comment

Choose a reason for hiding this comment

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

Structurally, this is good.

However, as far as I can tell, the result_indices was using zero-based indexing in the REST API and now is using 1-based indexing in this PR.

From an API consumer's perspective, I think 0-based indexing would be more intuitive. And it's also how the front end already expects this data to be formed. Do you think you could change it to be 0-based?

@mathemancer
Copy link
Contributor Author

mathemancer commented Aug 13, 2024

Structurally, this is good.

However, as far as I can tell, the result_indices was using zero-based indexing in the REST API and now is using 1-based indexing in this PR.

From an API consumer's perspective, I think 0-based indexing would be more intuitive. And it's also how the front end already expects this data to be formed. Do you think you could change it to be 0-based?

Hmmmmmm. I took that to be primary key values. So, that's what we're returning. Am I to understand that we were returning array indices here? That's kind of odd, but it does solve the problem with no primary keys.

@mathemancer
Copy link
Contributor Author

Okay, I made the change. Should be the same as the old way now.

Base automatically changed from records_patch to develop August 13, 2024 05:59
@mathemancer mathemancer requested a review from seancolsen August 13, 2024 06:08
@mathemancer mathemancer mentioned this pull request Aug 13, 2024
7 tasks
Copy link
Contributor

@seancolsen seancolsen left a comment

Choose a reason for hiding this comment

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

This works for me now. Thanks!

I added a small comment pertaining to documentation though. I think it would be good to fix that before merging.

Attributes:
id: The id of the group. Consistent for same input.
count: The number of items in the group.
results_eq: The value the results of the group equal.
result_indices: The primary key values of group members.
Copy link
Contributor

Choose a reason for hiding this comment

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

"primary key values" is not accurate here.

Copy link
Contributor

@seancolsen seancolsen left a comment

Choose a reason for hiding this comment

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

Adding an approval review so you can merge this without an additional review from me.

@seancolsen
Copy link
Contributor

Corresponding front end PR: #3755

@mathemancer mathemancer enabled auto-merge August 13, 2024 14:27
@mathemancer mathemancer added this pull request to the merge queue Aug 13, 2024
Merged via the queue into develop with commit 7f76d7a Aug 13, 2024
38 checks passed
@mathemancer mathemancer deleted the records_grouping_bugfix branch August 13, 2024 14:53
@kgodey kgodey removed this from the Beta milestone Sep 18, 2024
@kgodey kgodey added this to the Pre-beta test build #1 milestone Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-status: review A PR awaiting review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Front end can't match groups with records
4 participants