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

Fixed Edit Item's Version History crashing #3253

Conversation

alexandrevryghem
Copy link
Member

References

Description

This PR removes the method calls from the template that return Observables causing an infinite rerendering of the page.

Instructions for Reviewers

List of changes in this PR:

  • Created a VersionsDTO containg all the data that is required to render the template in order to prevent the infinite recreation of the canEditVersion Observable.

Guidance for how to test or review this PR:
Test that everything still work correctly on the item page & the edit item version history tab both for items with and without any versions.

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

…te-7.6' into w2p-117287_fix-item-version-performance-issues_contribute-main

# Conflicts:
#	src/app/item-page/versions/item-versions.component.html
#	src/app/item-page/versions/item-versions.component.ts
@alexandrevryghem alexandrevryghem added bug component: versioning performance / caching Related to performance, caching or embedded objects claimed: Atmire Atmire team is working on this issue & will contribute back labels Aug 14, 2024
@alexandrevryghem alexandrevryghem self-assigned this Aug 14, 2024
Copy link
Contributor

@aseyedia aseyedia left a comment

Choose a reason for hiding this comment

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

I implemented these changes in both of my DSpace instances and the Version History page no longer hangs 👍.

@tdonohue tdonohue self-requested a review August 27, 2024 19:16
@tdonohue tdonohue added port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release labels Aug 27, 2024
@tdonohue
Copy link
Member

@alexandrevryghem : Based on reviewing the code, this looks like it may need backporting to dspace-7_x? I see very similar code on that branch. If that's so, I think this will require a manual backport to 7.x

Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @alexandrevryghem ! Tested today and verified it works. The code looks good to!

@tdonohue tdonohue added this to the 9.0 milestone Aug 29, 2024
@tdonohue
Copy link
Member

@alexandrevryghem : I've just realized that this PR is refusing to run automated tests. I'm going to close & reopen to see if that triggers them to run. As I want to simply verify they all succeed before merging.

@tdonohue tdonohue closed this Aug 29, 2024
@tdonohue tdonohue reopened this Aug 29, 2024
@tdonohue tdonohue merged commit c659061 into DSpace:main Aug 29, 2024
21 of 22 checks passed
@dspace-bot
Copy link
Contributor

Backport failed for dspace-7_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-7_x
git worktree add -d .worktree/backport-3253-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-3253-to-dspace-7_x
git switch --create backport-3253-to-dspace-7_x
git cherry-pick -x d09f5297a1f4e36071494bd89dc462b7538b3474 04bbaf9cb930cc823668076e858b0ab4703f4568

@dspace-bot
Copy link
Contributor

Backport failed for dspace-8_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-8_x
git worktree add -d .worktree/backport-3253-to-dspace-8_x origin/dspace-8_x
cd .worktree/backport-3253-to-dspace-8_x
git switch --create backport-3253-to-dspace-8_x
git cherry-pick -x d09f5297a1f4e36071494bd89dc462b7538b3474 04bbaf9cb930cc823668076e858b0ab4703f4568

@tdonohue
Copy link
Member

@alexandrevryghem : It looks like this hit merge conflicts for both backports to the dspace-8_x and dspace-7_x branches. Could you find time to create backport PRs to apply this fix to 8.x and 7.x (if necessary for both)?

@alexandrevryghem alexandrevryghem deleted the w2p-117287_fix-item-version-performance-issues_contribute-main branch September 29, 2024 13:19
@tdonohue tdonohue removed the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label Oct 10, 2024
@tdonohue
Copy link
Member

Ported to 7.x in #3368.

@alexandrevryghem alexandrevryghem removed the port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release label Oct 10, 2024
aseyedia added a commit to PEDSnet/PEDSpace that referenced this pull request Oct 11, 2024
…(see also DSpace/dspace-angular#3252 and DSpace/dspace-angular#3253); the solution originally implemented was intended for version 9 and @alexandrevryghem backported it to 8 here DSpace/dspace-angular#3412
@tdonohue
Copy link
Member

Ported to 8.x in #3412 and to 7.x in #3368

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug claimed: Atmire Atmire team is working on this issue & will contribute back component: versioning performance / caching Related to performance, caching or embedded objects
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Edit Page Hangs on Version History
4 participants