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

Introduce spaces field mask #2888

Merged
merged 4 commits into from
May 30, 2022
Merged

Introduce spaces field mask #2888

merged 4 commits into from
May 30, 2022

Conversation

butonic
Copy link
Contributor

@butonic butonic commented May 23, 2022

We now use a field mask to select which properties to retrieve when looking up storage spaces. This allows the gateway to only ask for root when trying to forward id or path based requests. It allows the spaces storage registry to omit calling ListStorageSpaces on the storage provider.

Related: #2881

@butonic
Copy link
Contributor Author

butonic commented May 23, 2022

there are problems in the ocis test suite I need to check before continuing: https://drone.owncloud.com/owncloud/ocis/12029/37/7

@butonic
Copy link
Contributor Author

butonic commented May 24, 2022

still a problem: https://drone.owncloud.com/owncloud/ocis/12070/46/6

  @skipOnOcV10.6 @skipOnOcV10.7 @skipOnOcV10.8.0
  Scenario Outline: as share receiver copying a file inside a folder changes its etag for all collaborators      # /srv/app/testrunner/tests/acceptance/features/apiWebdavEtagPropagation2/copyFileFolder.feature:153
    Given user "Brian" has been created with default attributes and without skeleton files                       # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles()
    And the administrator has set the default folder for received shares to "Shares"                             # OccContext::theAdministratorHasSetTheDefaultFolderForReceivedSharesTo()
    And parameter "shareapi_auto_accept_share" of app "core" has been set to "no"                                # AppConfigurationContext::serverParameterHasBeenSetTo()
    And using <dav_version> DAV path                                                                             # FeatureContext::usingOldOrNewDavPath()
    And user "Alice" has created folder "/upload"                                                                # FeatureContext::userHasCreatedFolder()
    And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt"                     # FeatureContext::userHasUploadedAFileWithContentTo()
    And user "Alice" has shared folder "/upload" with user "Brian"                                               # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    And user "Brian" has accepted share "/upload" offered by user "Alice"                                        # FeatureContext::userHasReactedToShareOfferedBy()
    And user "Alice" has stored etag of element "/"                                                              # WebDavPropertiesContext::userHasStoredEtagOfElement()
    And user "Alice" has stored etag of element "/upload"                                                        # WebDavPropertiesContext::userHasStoredEtagOfElement()
    And user "Alice" has stored etag of element "/upload/file.txt"                                               # WebDavPropertiesContext::userHasStoredEtagOfElement()
    And user "Alice" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt"                 # WebDavPropertiesContext::userStoresEtagOfElementOnPath()
    And user "Brian" has stored etag of element "/"                                                              # WebDavPropertiesContext::userHasStoredEtagOfElement()
    And user "Brian" has stored etag of element "/Shares"                                                        # WebDavPropertiesContext::userHasStoredEtagOfElement()
    And user "Brian" has stored etag of element "/Shares/upload"                                                 # WebDavPropertiesContext::userHasStoredEtagOfElement()
    And user "Brian" has stored etag of element "/Shares/upload/file.txt"                                        # WebDavPropertiesContext::userHasStoredEtagOfElement()
    And user "Brian" has stored etag of element "/Shares/upload/file.txt" on path "/Shares/upload/renamed.txt"   # WebDavPropertiesContext::userStoresEtagOfElementOnPath()
    When user "Brian" copies file "/Shares/upload/file.txt" to "/Shares/upload/renamed.txt" using the WebDAV API # FeatureContext::userCopiesFileUsingTheAPI()
    Then the HTTP status code should be "201"                                                                    # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    And these etags should have changed:                                                                         # WebDavPropertiesContext::theseEtagsShouldHaveChanged()
      | user  | path                       |
      | Alice | /                          |
      | Alice | /upload                    |
      | Alice | /upload/renamed.txt        |
      | Brian | /                          |
      | Brian | /Shares                    |
      | Brian | /Shares/upload             |
      | Brian | /Shares/upload/renamed.txt |
    And these etags should not have changed:                                                                     # WebDavPropertiesContext::theseEtagsShouldNotHaveChanged()
      | user  | path                    |
      | Alice | /upload/file.txt        |
      | Brian | /Shares/upload/file.txt |

    Examples:
      | dav_version |
      | old         |
      | new         |
        WebDavPropertiesContext::theseEtagsShouldHaveChanged
        The etag '"becf8ed1ae946201f65580f89b745936"' of element '/upload' of user 'Alice' did not change.
        Failed asserting that 1 matches expected 0.
      | spaces      |
        Expected stored etag to be some string but found null! (Exception)

runsh: Total unexpected failed scenarios throughout the test run:
apiWebdavEtagPropagation2/copyFileFolder.feature:189

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@sonarcloud
Copy link

sonarcloud bot commented May 25, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@butonic butonic marked this pull request as ready for review May 25, 2022 13:35
@butonic butonic requested review from a team, labkode, ishank011 and glpatcern as code owners May 25, 2022 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants