Skip to content

Conversation

@ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Nov 16, 2020

During app installation we run migration steps. Those steps may use
services the app registers or classes from composer. Hence we have to
make sure the app runs through the registration.

Fixes nextcloud/mail#3784

Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

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

Very nice, fixes Mail and Deck not working with master for me! :)

@ChristophWurst ChristophWurst force-pushed the fix/lazy-app-registration branch from c143f37 to 3addf4e Compare November 17, 2020 14:57
During app installation we run migration steps. Those steps may use
services the app registers or classes from composer. Hence we have to
make sure the app runs through the registration.

Signed-off-by: Christoph Wurst <[email protected]>
@ChristophWurst ChristophWurst force-pushed the fix/lazy-app-registration branch from 3addf4e to 3cf39c5 Compare November 18, 2020 07:48
@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Nov 18, 2020
@ChristophWurst
Copy link
Member Author

At least the mysql test is also showing on other PRs, so that seems unrelated. Also the acceptance test looks like a random failure

@faily-bot
Copy link

faily-bot bot commented Nov 19, 2020

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 35696: failure

mariadb10.1-php7.3

Show full log
There were 2 errors:

1) OCA\Files_Sharing\Tests\CacheTest::testShareJailedStorage
OCP\Files\StorageNotAvailableException: File with id "4604" has not been found.

/drone/src/lib/private/Files/Storage/FailedStorage.php:198
/drone/src/apps/files_sharing/lib/SharedStorage.php:428
/drone/src/lib/private/Files/View.php:1959
/drone/src/lib/private/Files/View.php:2074
/drone/src/lib/private/Files/View.php:1147
/drone/src/lib/private/Files/View.php:597
/drone/src/lib/private/Files/Filesystem.php:716
/drone/src/apps/files_sharing/tests/CacheTest.php:510

Caused by
OCP\Files\NotFoundException: File with id "4604" has not been found.

/drone/src/lib/private/Files/View.php:1768
/drone/src/apps/files_sharing/lib/SharedStorage.php:130
/drone/src/apps/files_sharing/lib/SharedStorage.php:487
/drone/src/lib/private/Files/Storage/Wrapper/Jail.php:484
/drone/src/apps/files_sharing/lib/SharedStorage.php:427
/drone/src/lib/private/Files/View.php:1959
/drone/src/lib/private/Files/View.php:2074
/drone/src/lib/private/Files/View.php:1147
/drone/src/lib/private/Files/View.php:597
/drone/src/lib/private/Files/Filesystem.php:716
/drone/src/apps/files_sharing/tests/CacheTest.php:510

2) OCA\Files_Sharing\Tests\SharedStorageTest::testNameConflict
OCP\Files\StorageNotAvailableException: File with id "111956" has not been found.

/drone/src/lib/private/Files/Storage/FailedStorage.php:114
/drone/src/lib/private/Files/Storage/Wrapper/Jail.php:235
/drone/src/lib/private/Files/Storage/Wrapper/Wrapper.php:226
/drone/src/lib/private/Files/View.php:1167
/drone/src/lib/private/Files/View.php:543
/drone/src/apps/files_sharing/tests/SharedStorageTest.php:532

Caused by
OCP\Files\NotFoundException: File with id "111956" has not been found.

/drone/src/lib/private/Files/View.php:1768
/drone/src/apps/files_sharing/lib/SharedStorage.php:130
/drone/src/apps/files_sharing/lib/SharedStorage.php:487
/drone/src/lib/private/Files/Storage/Wrapper/Jail.php:235
/drone/src/lib/private/Files/Storage/Wrapper/Wrapper.php:226
/drone/src/lib/private/Files/View.php:1167
/drone/src/lib/private/Files/View.php:543
/drone/src/apps/files_sharing/tests/SharedStorageTest.php:532

--

There were 2 warnings:

1) Test\Files\ViewTest::testRenameFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static

2) Test\Files\ViewTest::testCopyFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static

integration-sharing-v1-part2

Could not fetch logs

acceptance-app-files-sharing

  • tests/acceptance/features/app-files-sharing.feature:138
  • tests/acceptance/features/app-files-sharing.feature:249
  • tests/acceptance/features/app-files-sharing.feature:266
  • tests/acceptance/features/app-files-sharing.feature:291
  • tests/acceptance/features/app-files-sharing.feature:353
  • tests/acceptance/features/app-files-sharing.feature:376
Show full log
  Scenario: share an empty folder with another user                           # /drone/src/tests/acceptance/features/app-files-sharing.feature:138
    Given I act as John                                                       # ActorContext::iActAs()
    And I am logged in as the admin                                           # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I act as Jane                                                         # ActorContext::iActAs()
    And I am logged in                                                        # LoginPageContext::iAmLoggedIn()
    And I act as John                                                         # ActorContext::iActAs()
    And I create a new folder named "Shared folder"                           # FileListContext::iCreateANewFolderNamed()
    And I see that the file list contains a file named "Shared folder"        # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    When I share "Shared folder" with "user0"                                 # FilesAppSharingContext::iShareWith()
    And I see that the file is shared with "user0"                            # FilesAppSharingContext::iSeeThatTheFileIsSharedWith()
    And I act as Jane                                                         # ActorContext::iActAs()
    And I open the Files app                                                  # FilesAppContext::iOpenTheFilesApp()
    Then I see that the file list contains a file named "Shared folder"       # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I open the details view for "Shared folder"                           # FileListContext::iOpenTheDetailsViewFor()
    And I see that the details view is open                                   # FilesAppContext::iSeeThatTheDetailsViewIsOpen()
    And I open the "Sharing" tab in the details view                          # FilesAppContext::iOpenTheTabInTheDetailsView()
      Tab headers in details view in Files app could not be found after 100 seconds
      Tab header named Sharing in details view in Files app could not be found after 100 seconds (NoSuchElementException)
    And I see that the "Sharing" tab in the details view is eventually loaded # FilesAppContext::iSeeThatTheTabInTheDetailsViewIsEventuallyLoaded()
    And I see that the file is shared with me by "admin"                      # FilesAppSharingContext::iSeeThatTheFileIsSharedWithMeBy()

  Scenario: sharer does not see resharing option for a folder if resharing is disabled in the settings after the share is created # /drone/src/tests/acceptance/features/app-files-sharing.feature:249
    Given I am logged in as the admin                                                                                             # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I create a new folder named "Shared folder"                                                                               # FileListContext::iCreateANewFolderNamed()
    And I see that the file list contains a file named "Shared folder"                                                            # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I share "Shared folder" with "user0"                                                                                      # FilesAppSharingContext::iShareWith()
    And I see that the file is shared with "user0"                                                                                # FilesAppSharingContext::iSeeThatTheFileIsSharedWith()
    When I visit the settings page                                                                                                # SettingsMenuContext::iVisitTheSettingsPage()
    And I open the "Sharing" section of the "Administration" group                                                                # AppNavigationContext::iOpenTheSectionOf()
    And I disable resharing                                                                                                       # SettingsContext::iDisableResharing()
    And I see that resharing is disabled                                                                                          # SettingsContext::iSeeThatResharingIsDisabled()
    Then I open the Files app                                                                                                     # FilesAppContext::iOpenTheFilesApp()
    And I open the details view for "Shared folder"                                                                               # FileListContext::iOpenTheDetailsViewFor()
    And I see that the details view is open                                                                                       # FilesAppContext::iSeeThatTheDetailsViewIsOpen()
    And I open the "Sharing" tab in the details view                                                                              # FilesAppContext::iOpenTheTabInTheDetailsView()
      Tab headers in details view in Files app could not be found after 100 seconds
      Tab header named Sharing in details view in Files app could not be found after 100 seconds (NoSuchElementException)
    And I see that the "Sharing" tab in the details view is eventually loaded                                                     # FilesAppContext::iSeeThatTheTabInTheDetailsViewIsEventuallyLoaded()
    And I see that resharing for "user0" is not available                                                                         # FilesAppSharingContext::iSeeThatResharingForIsNotAvailable()

  Scenario: sharee can not reshare a folder if resharing is disabled in the settings after the share is created # /drone/src/tests/acceptance/features/app-files-sharing.feature:266
    Given I act as John                                                                                         # ActorContext::iActAs()
    And I am logged in as the admin                                                                             # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I act as Jane                                                                                           # ActorContext::iActAs()
    And I am logged in                                                                                          # LoginPageContext::iAmLoggedIn()
    And I act as John                                                                                           # ActorContext::iActAs()
    And I create a new folder named "Shared folder"                                                             # FileListContext::iCreateANewFolderNamed()
    And I see that the file list contains a file named "Shared folder"                                          # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I share "Shared folder" with "user0"                                                                    # FilesAppSharingContext::iShareWith()
    And I see that the file is shared with "user0"                                                              # FilesAppSharingContext::iSeeThatTheFileIsSharedWith()
    And I visit the settings page                                                                               # SettingsMenuContext::iVisitTheSettingsPage()
    And I open the "Sharing" section of the "Administration" group                                              # AppNavigationContext::iOpenTheSectionOf()
    And I disable resharing                                                                                     # SettingsContext::iDisableResharing()
    And I see that resharing is disabled                                                                        # SettingsContext::iSeeThatResharingIsDisabled()
    When I act as Jane                                                                                          # ActorContext::iActAs()
    And I open the Files app                                                                                    # FilesAppContext::iOpenTheFilesApp()
    Then I see that the file list contains a file named "Shared folder"                                         # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I open the details view for "Shared folder"                                                             # FileListContext::iOpenTheDetailsViewFor()
    And I see that the details view is open                                                                     # FilesAppContext::iSeeThatTheDetailsViewIsOpen()
    And I open the "Sharing" tab in the details view                                                            # FilesAppContext::iOpenTheTabInTheDetailsView()
      Tab headers in details view in Files app could not be found after 100 seconds
      Tab header named Sharing in details view in Files app could not be found after 100 seconds (NoSuchElementException)
    And I see that the "Sharing" tab in the details view is eventually loaded                                   # FilesAppContext::iSeeThatTheTabInTheDetailsViewIsEventuallyLoaded()
    And I see that the file is shared with me by "admin"                                                        # FilesAppSharingContext::iSeeThatTheFileIsSharedWithMeBy()
    And I see that resharing the file is not allowed                                                            # FilesAppSharingContext::iSeeThatResharingTheFileIsNotAllowed()

  Scenario: sharee can unshare a folder if resharing is disabled in the settings after the share is created # /drone/src/tests/acceptance/features/app-files-sharing.feature:291
    Given I act as John                                                                                     # ActorContext::iActAs()
    And I am logged in as the admin                                                                         # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I act as Jane                                                                                       # ActorContext::iActAs()
    And I am logged in                                                                                      # LoginPageContext::iAmLoggedIn()
    And I act as John                                                                                       # ActorContext::iActAs()
    And I create a new folder named "Shared folder"                                                         # FileListContext::iCreateANewFolderNamed()
    And I see that the file list contains a file named "Shared folder"                                      # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I share "Shared folder" with "user0"                                                                # FilesAppSharingContext::iShareWith()
    And I see that the file is shared with "user0"                                                          # FilesAppSharingContext::iSeeThatTheFileIsSharedWith()
    And I act as Jane                                                                                       # ActorContext::iActAs()
    And I open the Files app                                                                                # FilesAppContext::iOpenTheFilesApp()
    And I share "Shared folder" with "user1"                                                                # FilesAppSharingContext::iShareWith()
    And I act as John                                                                                       # ActorContext::iActAs()
    And I visit the settings page                                                                           # SettingsMenuContext::iVisitTheSettingsPage()
    And I open the "Sharing" section of the "Administration" group                                          # AppNavigationContext::iOpenTheSectionOf()
    And I disable resharing                                                                                 # SettingsContext::iDisableResharing()
    And I see that resharing is disabled                                                                    # SettingsContext::iSeeThatResharingIsDisabled()
    When I act as Jane                                                                                      # ActorContext::iActAs()
    And I open the Files app                                                                                # FilesAppContext::iOpenTheFilesApp()
    Then I see that the file list contains a file named "Shared folder"                                     # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I open the details view for "Shared folder"                                                         # FileListContext::iOpenTheDetailsViewFor()
    And I see that the details view is open                                                                 # FilesAppContext::iSeeThatTheDetailsViewIsOpen()
    And I open the "Sharing" tab in the details view                                                        # FilesAppContext::iOpenTheTabInTheDetailsView()
      Tab headers in details view in Files app could not be found after 100 seconds
      Tab header named Sharing in details view in Files app could not be found after 100 seconds (NoSuchElementException)
    And I see that the "Sharing" tab in the details view is eventually loaded                               # FilesAppContext::iSeeThatTheTabInTheDetailsViewIsEventuallyLoaded()
    And I see that the file is shared with me by "admin"                                                    # FilesAppSharingContext::iSeeThatTheFileIsSharedWithMeBy()
    And I unshare the share with "user1"                                                                    # FilesAppSharingContext::iUnshareTheFileWith()
    And I see that the file is not shared with "user1"                                                      # FilesAppSharingContext::iSeeThatTheFileIsNotSharedWith()

  Scenario: sharee can not reshare a folder if the sharer disables it         # /drone/src/tests/acceptance/features/app-files-sharing.feature:353
    Given I act as John                                                       # ActorContext::iActAs()
    And I am logged in as the admin                                           # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I act as Jane                                                         # ActorContext::iActAs()
    And I am logged in                                                        # LoginPageContext::iAmLoggedIn()
    And I act as John                                                         # ActorContext::iActAs()
    And I create a new folder named "Shared folder"                           # FileListContext::iCreateANewFolderNamed()
    And I see that the file list contains a file named "Shared folder"        # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I share "Shared folder" with "user0"                                  # FilesAppSharingContext::iShareWith()
    And I see that the file is shared with "user0"                            # FilesAppSharingContext::iSeeThatTheFileIsSharedWith()
    And I set the share with "user0" as not reshareable                       # FilesAppSharingContext::iSetTheShareWithAsNotReshareable()
    And I see that "user0" can not reshare the share                          # FilesAppSharingContext::iSeeThatCanNotReshareTheShare()
    When I act as Jane                                                        # ActorContext::iActAs()
    And I open the Files app                                                  # FilesAppContext::iOpenTheFilesApp()
    Then I see that the file list contains a file named "Shared folder"       # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I open the details view for "Shared folder"                           # FileListContext::iOpenTheDetailsViewFor()
    And I see that the details view is open                                   # FilesAppContext::iSeeThatTheDetailsViewIsOpen()
    And I open the "Sharing" tab in the details view                          # FilesAppContext::iOpenTheTabInTheDetailsView()
      Tab headers in details view in Files app could not be found after 100 seconds
      Tab header named Sharing in details view in Files app could not be found after 100 seconds (NoSuchElementException)
    And I see that the "Sharing" tab in the details view is eventually loaded # FilesAppContext::iSeeThatTheTabInTheDetailsViewIsEventuallyLoaded()
    And I see that the file is shared with me by "admin"                      # FilesAppSharingContext::iSeeThatTheFileIsSharedWithMeBy()
    And I see that resharing the file is not allowed                          # FilesAppSharingContext::iSeeThatResharingTheFileIsNotAllowed()

  Scenario: sharee can not reshare a subfolder if the sharer disables it for the parent folder # /drone/src/tests/acceptance/features/app-files-sharing.feature:376
    Given I act as John                                                                        # ActorContext::iActAs()
    And I am logged in as the admin                                                            # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I act as Jane                                                                          # ActorContext::iActAs()
    And I am logged in                                                                         # LoginPageContext::iAmLoggedIn()
    And I act as John                                                                          # ActorContext::iActAs()
    And I create a new folder named "Shared folder"                                            # FileListContext::iCreateANewFolderNamed()
    And I see that the file list contains a file named "Shared folder"                         # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I share "Shared folder" with "user0"                                                   # FilesAppSharingContext::iShareWith()
    And I see that the file is shared with "user0"                                             # FilesAppSharingContext::iSeeThatTheFileIsSharedWith()
    And I set the share with "user0" as not reshareable                                        # FilesAppSharingContext::iSetTheShareWithAsNotReshareable()
    And I see that "user0" can not reshare the share                                           # FilesAppSharingContext::iSeeThatCanNotReshareTheShare()
    And I enter in the folder named "Shared folder"                                            # FileListContext::iEnterInTheFolderNamed()
    And I create a new folder named "Subfolder"                                                # FileListContext::iCreateANewFolderNamed()
    And I see that the file list contains a file named "Subfolder"                             # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    When I act as Jane                                                                         # ActorContext::iActAs()
    And I open the Files app                                                                   # FilesAppContext::iOpenTheFilesApp()
    And I enter in the folder named "Shared folder"                                            # FileListContext::iEnterInTheFolderNamed()
    Then I see that the file list contains a file named "Subfolder"                            # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I open the details view for "Subfolder"                                                # FileListContext::iOpenTheDetailsViewFor()
    And I see that the details view is open                                                    # FilesAppContext::iSeeThatTheDetailsViewIsOpen()
    And I open the "Sharing" tab in the details view                                           # FilesAppContext::iOpenTheTabInTheDetailsView()
      Tab headers in details view in Files app could not be found after 100 seconds
      Tab header named Sharing in details view in Files app could not be found after 100 seconds (NoSuchElementException)
    And I see that the "Sharing" tab in the details view is eventually loaded                  # FilesAppContext::iSeeThatTheTabInTheDetailsViewIsEventuallyLoaded()
    And I see that resharing the file is not allowed                                           # FilesAppSharingContext::iSeeThatResharingTheFileIsNotAllowed()

@MorrisJobke MorrisJobke merged commit 650ffc5 into master Nov 19, 2020
@MorrisJobke MorrisJobke deleted the fix/lazy-app-registration branch November 19, 2020 21:35
@danxuliu
Copy link
Member

Also the acceptance test looks like a random failure

May look like, but it is not :-) The "Comments" tab no longer appears in the Files app sidebar (I guess now it is not loaded). Due to this, when the Files app sidebar is open for a directory it only has one tab (Sharing), which causes the tab header to be hidden. As the tab header is hidden but the test expects it to be there it fails.

@rullzer
Copy link
Member

rullzer commented Nov 23, 2020

ouch yes we should fix that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can not activate Mail app after migration 19 to 20

6 participants