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

Add migration for oc_share_external columns #24829

Merged
merged 2 commits into from
Jan 5, 2021

Conversation

PVince81
Copy link
Member

@PVince81 PVince81 commented Dec 23, 2020

  • TEST: regular install
  • TEST: migrate from NC 21.0.0beta2
  • TEST: migrate from v20.0.4
  • TEST: on my own server

Partial fix for #24813

@PVince81 PVince81 added the 2. developing Work in progress label Dec 23, 2020
@PVince81 PVince81 added this to the Nextcloud 21 milestone Dec 23, 2020
@PVince81 PVince81 self-assigned this Dec 23, 2020
@PVince81 PVince81 added the bug label Dec 23, 2020
@PVince81
Copy link
Member Author

yeah, so I had this locally as well and double checked everything, class name, file name, etc.
but have no clue what's wrong...

Migration step 'OCA\Files_Sharing\Migration\Version21000Date20201223143245' is unknown

@PVince81 PVince81 force-pushed the bugfix/24813/add-missing-migrations branch from 7ee3529 to 8505d7b Compare December 23, 2020 14:31
@PVince81
Copy link
Member Author

PVince81 commented Dec 23, 2020

  • BUG: can't drop assignable without also dropping/recreating the index => discarded the change

Add column "parent" if missing.
Drop column "lastscan" if exists.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
@PVince81 PVince81 force-pushed the bugfix/24813/add-missing-migrations branch from 8505d7b to 07bf663 Compare December 23, 2020 14:44
@PVince81 PVince81 changed the title Bugfix/24813/add missing migrations Add migration for oc_share_external columns Dec 23, 2020
@PVince81
Copy link
Member Author

I decided to discard the change about the assignable column for now. Solving it will need more gymnastics as it will need to adjust the index (possibly in the occ command) and only then we can drop the column.

@PVince81 PVince81 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Dec 23, 2020
@PVince81 PVince81 marked this pull request as ready for review December 23, 2020 14:49
@PVince81
Copy link
Member Author

PVince81 commented Dec 23, 2020

ouch, I redid a diff and:

  • share_type is missing too

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
@PVince81 PVince81 force-pushed the bugfix/24813/add-missing-migrations branch from 4b57c47 to 6c0de14 Compare December 23, 2020 15:20
@faily-bot
Copy link

faily-bot bot commented Dec 23, 2020

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 687: failure

mysql5.6-php7.3

Show full log
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

--

There was 1 failure:

1) Test\Files\ObjectStore\ObjectStoreStorageTest::testWriteStream
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n
-Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n
-Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n
-Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'
+''

/drone/src/tests/lib/Files/Storage/Storage.php:661

acceptance-users

  • tests/acceptance/features/users.feature:47
Show full log
  Scenario: users navigation without disabled users                                   # /drone/src/tests/acceptance/features/users.feature:47
    Given I act as Jane                                                               # ActorContext::iActAs()
    And I am logged in as the admin                                                   # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                                      # SettingsMenuContext::iOpenTheUserSettings()
    And I open the "Disabled users" section                                           # AppNavigationContext::iOpenTheSection()
    And I see that the list of users contains the user disabledUser                   # UsersSettingsContext::iSeeThatTheListOfUsersContainsTheUser()
    And I open the actions menu for the user disabledUser                             # UsersSettingsContext::iOpenTheActionsMenuOf()
      Row for user disabledUser in Users Settings could not be found
      Actions menu for user disabledUser in Users Settings could not be found (NoSuchElementException)
    And I see that the "Enable user" action in the disabledUser actions menu is shown # UsersSettingsContext::iSeeTheAction()
    When I click the "Enable user" action in the disabledUser actions menu            # UsersSettingsContext::iClickTheAction()
    Then I see that the section "Disabled users" is not shown                         # AppNavigationContext::iSeeThatTheSectionIsNotShown()
    When I open the User settings                                                     # SettingsMenuContext::iOpenTheUserSettings()
    Then I see that the section "Disabled users" is not shown                         # AppNavigationContext::iSeeThatTheSectionIsNotShown()

@PVince81
Copy link
Member Author

PVince81 commented Dec 23, 2020

Unrelated fails (added here #22305 (comment))

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

the failing acceptance test also seems unrelated:

  Scenario: users navigation without disabled users                                   # /drone/src/tests/acceptance/features/users.feature:47
    Given I act as Jane                                                               # ActorContext::iActAs()
    And I am logged in as the admin                                                   # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                                      # SettingsMenuContext::iOpenTheUserSettings()
    And I open the "Disabled users" section                                           # AppNavigationContext::iOpenTheSection()
    And I see that the list of users contains the user disabledUser                   # UsersSettingsContext::iSeeThatTheListOfUsersContainsTheUser()
    And I open the actions menu for the user disabledUser                             # UsersSettingsContext::iOpenTheActionsMenuOf()
      Row for user disabledUser in Users Settings could not be found
      Actions menu for user disabledUser in Users Settings could not be found (NoSuchElementException)

This was referenced Dec 23, 2020
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

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

🐘

@rullzer rullzer mentioned this pull request Jan 4, 2021
5 tasks
Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

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

Tested and works 👍

@juliusknorr juliusknorr merged commit 39c67d9 into master Jan 5, 2021
@juliusknorr juliusknorr deleted the bugfix/24813/add-missing-migrations branch January 5, 2021 08:32
@juliusknorr
Copy link
Member

/backport stable20

@juliusknorr
Copy link
Member

/backport to stable20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants