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

Backport #5850 #5858

Merged
merged 7 commits into from
Nov 18, 2022
Merged

Backport #5850 #5858

merged 7 commits into from
Nov 18, 2022

Conversation

no-reply
Copy link
Contributor

limited/guarded backport of query portion; following this up with deprecations, test updates, etc...

@samvera/hyrax-code-reviewers

@cjcolvar
Copy link
Member

This backport PR was created before the upstream PR got merged and I think it is missing some of the work that was incorporated later. Specifically this commit: 78a6098

@orangewolf
Copy link
Member

@no-reply @cjcolvar this has everything but the max depth in it. Is that intentional? I'd love to get this out of draft and merged in to a 3.x release. If it needs the max depth I can do that. If it doesn't then can we undraft and merge?

@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented Nov 15, 2022

Tamsin confirmed that max depth was not left out on purpose. Rob did a line by line comparison. Rob will follow up by adding it and we will ping Chris for a final review.

@orangewolf orangewolf marked this pull request as ready for review November 15, 2022 17:56
@orangewolf
Copy link
Member

@cjcolvar I went back and compared the final merged version w/ this code. the maxdepth was missing, but I don't see any other missing changes. Does it look like it has parity to you now?

Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

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

This looks good, but it would probably be good to include some tests to ensure the opt-in solr graph path works as expected.

tamsin johnson and others added 4 commits November 15, 2022 22:41
drop `CollectionNesting` depending on configuration and emit deprecation
warnings to encourage adopters to use the new approach.
Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

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

What about adding a loop over all of the form tests (spec/forms/hyrax/forms/dashboard/nest_collection_form_spec.rb) to check they work with nested indexing enabled and disabled?
I think that along with the tests already added should cover testing the exact query and the user-facing functionality.

…builder.rb

Co-authored-by: Chris Colvard <chris.colvard@gmail.com>
@orangewolf
Copy link
Member

What about adding a loop over all of the form tests (spec/forms/hyrax/forms/dashboard/nest_collection_form_spec.rb) to check they work with nested indexing enabled and disabled?
I think that along with the tests already added should cover testing the exact query and the user-facing functionality.

that makes sense. I likely cant do it today, but I'll see if can get to it tomorrow or more likely Friday.

Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for backporting this!

@orangewolf orangewolf merged commit 298075b into 3.x-stable Nov 18, 2022
@orangewolf orangewolf deleted the nested-graph-backport branch November 18, 2022 21:04
jeremyf added a commit to scientist-softserv/adventist-dl that referenced this pull request Nov 29, 2022
Prior to this commit, we had disabled the logic for indexing the parent
child relationships of objects.  This results in broken behavior
regarding nesting collections and works.  Were we to enable the
"classic" strategy for indexing, we created significant (and known)
performance issues.

With this commit, we are taking code that was backported to the 3.x
branch of Hyrax via [samvera/hyrax#5858][5858] and
[samvera/hyrax#5916][5916] and projecting that onto the 2.9.x
implementation.

This projection means that we are not directly backporting but instead
structuring the code such that if you include it, it assumes you using
SOLR's native graph indexing.  The aforementioned PRs put those changes
behind a configuration variable; which is not something that makes sense
given this "hack".

This PR aims to resolve three issues, which by their nature, are
inter-related.  The issues are:

- [x] Adding works to a collection [#59][59]
- [x] Backporting graph indexing [#68][68]
- [ ] Adding a collection to another collection [#70][70]

[59]:https://github.com/scientist-softserv/adventist-dl/issues/59
[68]:https://github.com/scientist-softserv/adventist-dl/issues/68
[70]:https://github.com/scientist-softserv/adventist-dl/issues/70
[5858]:samvera/hyrax#5858
[5916]:samvera/hyrax#5916
jeremyf added a commit to scientist-softserv/adventist-dl that referenced this pull request Nov 29, 2022
Prior to this commit, we had disabled the logic for indexing the parent
child relationships of objects.  This results in broken behavior
regarding nesting collections and works.  Were we to enable the
"classic" strategy for indexing, we created significant (and known)
performance issues.

With this commit, we are taking code that was backported to the 3.x
branch of Hyrax via [samvera/hyrax#5858][5858] and
[samvera/hyrax#5916][5916] and projecting that onto the 2.9.x
implementation.

This projection means that we are not directly backporting but instead
structuring the code such that if you include it, it assumes you using
SOLR's native graph indexing.  The aforementioned PRs put those changes
behind a configuration variable; which is not something that makes sense
given this "hack."

This PR aims to resolve three issues, which by their nature, are
inter-related.  The issues are:

- [x] Adding works to a collection [#59][59]
- [x] Backporting graph indexing [#68][68]
- [x] Adding a collection to another collection [#70][70]

[59]: https://github.com/scientist-softserv/adventist-dl/issues/59
[68]: https://github.com/scientist-softserv/adventist-dl/issues/68
[70]: https://github.com/scientist-softserv/adventist-dl/issues/70
[5858]: samvera/hyrax#5858
[5916]: samvera/hyrax#5916
jeremyf added a commit to scientist-softserv/hyrax-v2_graph_indexer that referenced this pull request Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants