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

fix: file quota was not applied in all cases #21894

Merged
merged 1 commit into from
Aug 24, 2020
Merged

Conversation

korelstar
Copy link
Member

@korelstar korelstar commented Jul 17, 2020

Since 70906a3, the file quota was not applied in all cases (see discussion with @nickvergessen on Talk). You can see the problem in the test case for the notes app's API tests: https://github.com/nextcloud/notes/runs/881221664

It looks like the problem is that by calling $homeMount->getStorageRootId(), the storage cache is created before the mount was actually added. Moving self::getMountManager()->addMount($homeMount) before that call fixes this issue. However, I don't know if this has any side-effects.

/cc @icewind1991 @rullzer

Since the original PR #21489 was backported to stable19, stable18 and stable17, this PR should also be backported to those branches.

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

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

🐘

@nickvergessen
Copy link
Member

I guess this needs backporting to 19, 18 and 17? @korelstar

@nickvergessen
Copy link
Member

Also, do you mind rebasing to show green CI?

@korelstar
Copy link
Member Author

@nickvergessen I've rebased the branch, but since there are CI errors on all commits on master, I don't think this will make this PR green ...

I guess this needs backporting to 19, 18 and 17?

Yes! :-)

@MorrisJobke MorrisJobke mentioned this pull request Aug 11, 2020
57 tasks
@korelstar
Copy link
Member Author

Ping @rullzer

@MorrisJobke
Copy link
Member

Rebased to trigger CI again.

@faily-bot
Copy link

faily-bot bot commented Aug 20, 2020

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 32099: failure

acceptance-app-files

  • tests/acceptance/features/app-files.feature:262
Show full log
  Scenario: unmarking a file as favorite causes the file list to be sorted again                          # /drone/src/tests/acceptance/features/app-files.feature:262
    Given I am logged in                                                                                  # LoginPageContext::iAmLoggedIn()
    And I create a new folder named "A name alphabetically lower than welcome.txt"                        # FileListContext::iCreateANewFolderNamed()
    And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list # FileListContext::iSeeThatPrecedesInTheFileList()
    And I close the details view                                                                          # FilesAppContext::iCloseTheDetailsView()
    And I see that the details view is closed                                                             # FilesAppContext::iSeeThatTheDetailsViewIsClosed()
      │ Details view in Files app visibility could not be got
      │ Exception message: Element is no longer attached to the DOM
      │ For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
      │ Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
      │ System info: host: 'e1d6319f73fd', ip: '172.19.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-76-generic', java.version: '1.8.0_91'
      │ Driver info: driver.version: unknown
      │ Trying again
      │ 
    And I mark "welcome.txt" as favorite                                                                  # FileListContext::iMarkAsFavorite()
    And I see that "welcome.txt" is marked as favorite                                                    # FileListContext::iSeeThatIsMarkedAsFavorite()
    And I see that "welcome.txt" precedes "A name alphabetically lower than welcome.txt" in the file list # FileListContext::iSeeThatPrecedesInTheFileList()
    When I unmark "welcome.txt" as favorite                                                               # FileListContext::iUnmarkAsFavorite()
    Then I see that "welcome.txt" is not marked as favorite                                               # FileListContext::iSeeThatIsNotMarkedAsFavorite()
      Not favorited state icon for file welcome.txt in file list could not be found after 100 seconds (NoSuchElementException)
    And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list # FileListContext::iSeeThatPrecedesInTheFileList()

@korelstar
Copy link
Member Author

Drone error seems to be unrelated since it's in all current PRs. Can this be merged, now?

@rullzer rullzer mentioned this pull request Aug 21, 2020
19 tasks
@nickvergessen nickvergessen merged commit df85760 into master Aug 24, 2020
@nickvergessen nickvergessen deleted the fix-file-quota branch August 24, 2020 13:48
@nickvergessen
Copy link
Member

Backports to be triggered after the maintenance round on thursday

@MorrisJobke
Copy link
Member

/backport to stable19

@MorrisJobke
Copy link
Member

/backport to stable18

@MorrisJobke
Copy link
Member

/backport to stable17

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.

4 participants