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

Issue#819 #857

Merged
merged 5 commits into from Sep 8, 2020
Merged

Issue#819 #857

merged 5 commits into from Sep 8, 2020

Conversation

atarix83
Copy link
Contributor

@atarix83 atarix83 commented Sep 3, 2020

References

Description

This PR fix issue described in this issue by avoiding that a successful RemoteData is emitted two time, with undefined payload int the first one

Instructions for Reviewers

To test this PR :

  • go to the mydspace page
  • open the new submission
    On current main branch scrolling down the list should show an hanging loading icon. With this Pr it should work properly

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • 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 TSLint validation using yarn run lint
  • 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.
  • If my PR includes new, third-party dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.

@heathergreerklein heathergreerklein added this to Needs Reviewers Assigned in DSpace 7 Beta 4 via automation Sep 3, 2020
@heathergreerklein heathergreerklein added this to the 7.0beta4 milestone Sep 3, 2020
@tdonohue tdonohue added the bug label Sep 3, 2020
@tdonohue tdonohue added the 1 APPROVAL pull request only requires a single approval to merge label Sep 3, 2020
@heathergreerklein heathergreerklein moved this from Needs Reviewers Assigned to Under Review in DSpace 7 Beta 4 Sep 3, 2020
Copy link
Member

@artlowel artlowel left a comment

Choose a reason for hiding this comment

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

I was under the impression we agreed in the meeting last time to disable checking for eperson languages for the time being. The check doesn't really have a point at the moment, because there isn’t a way to set an eperson language from the UI yet.

But this PR keeps the check, and gets round the issue by making changes to the way remotedata states are defined, which has the potential to affect anything that uses rest data in the entire app. That means it requires that we test everything else again, and that takes it out of the 1-Approval category for me

@tdonohue tdonohue self-requested a review September 3, 2020 15:34
@tdonohue tdonohue removed the 1 APPROVAL pull request only requires a single approval to merge label Sep 3, 2020
@tdonohue
Copy link
Member

tdonohue commented Sep 3, 2020

@atarix83 : I agree with @artlowel here. It's unclear to me why the scope of this fix was expanded.

My impression from discussions in meetings was that we all agreed that #819 should be properly fixed by the work going on to resolve #739 (which is scheduled for beta5). So, we had discussed a simple, temporary fix for beta4 of leaving out the EPerson language for now (and we can add a note in #739 to "undo" that temporary fix). Is there a reason why you didn't go with that approach? Am I misunderstanding something?

@atarix83
Copy link
Contributor Author

atarix83 commented Sep 4, 2020

@tdonohue @artlowel
you're right we have decided to simply leaving out the EPerson language, but I found out a way to finnaly resolve the issue of RemoteData emitted twice and saw this resolved the problem on LocaleService. In addition now when the cache obejct is expired RemoteData is emited as failed when currently is never emitted.
I think that it should be a general improvement, I tested it and it doesn't seem to have impact, but if you prefer to go on with the workaround I'll revert it

@tdonohue
Copy link
Member

tdonohue commented Sep 4, 2020

@atarix83 : Overall, I'm not against this change...but it seems like we'd need to carefully test it. I'm also not entirely certain whether this change will be made "obsolete" once @artlowel 's work on #739 is complete.

So, I'd appreciate @artlowel 's feedback on how this PR as-is would affect #739....there's a few possible approaches I see here:

  1. If we are fairly comfortable that this PR is the correct direction for the long term (and will not need reverting after Cache redesign part 1: Don't remove expired objects #739), then let's test it very thoroughly and make sure it has no side effects & then work to merge it.
  2. If we feel this PR's implementation has some promise, but needs to be tested more with the work going on for Cache redesign part 1: Don't remove expired objects #739, then maybe we should have @artlowel pull this code into his ongoing work & we'll address it as part of the solution to Cache redesign part 1: Don't remove expired objects #739. In that case, we should create a separate PR to solve LocaleInterceptor blocks new request #819 with just the simple workaround for now.
  3. If this seems like it's all just temporary & it'd likely need reverting as part of the solution to Cache redesign part 1: Don't remove expired objects #739, then we should simply update this PR to be the simple workaround for now.

@artlowel, do you have any feedback on the approaches above based on the ongoing work to fix #739?

@artlowel
Copy link
Member

artlowel commented Sep 4, 2020

It is just temporary. As detailed in #739, the logic to determine the RemoteData state will move to a reducer and RemoteDataBuildService will drastically change, perhaps not even be necessary anymore. The state of an expired RemoteData object will be "stale".

@tdonohue
Copy link
Member

tdonohue commented Sep 4, 2020

Ok, given it'd be temporary, I think we should revert this back to the original idea @atarix83 & just disable the EPerson language temporarily. You can choose to either update this PR directly, or close it an create a new one.

@atarix83
Copy link
Contributor Author

atarix83 commented Sep 7, 2020

@artlowel @tdonohue
I've reverted changes and disabled the EPerson language temporarily

DSpace 7 Beta 4 automation moved this from Under Review to Reviewer Approved Sep 7, 2020
Copy link
Member

@artlowel artlowel left a comment

Choose a reason for hiding this comment

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

Thanks @atarix83

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.

👍 Looks good to me too. Thanks @atarix83

@tdonohue tdonohue merged commit 4b11e1d into DSpace:main Sep 8, 2020
DSpace 7 Beta 4 automation moved this from Reviewer Approved to Done Sep 8, 2020
@abollini abollini deleted the issue#819 branch September 22, 2020 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

LocaleInterceptor blocks new request
4 participants