Skip to content

Custom properties not working with Oracle #37027

Closed

Description

@phil-davis

Run the acceptance tests with Oracle database. (see PR #37025 )
https://drone.owncloud.com/owncloud/core/23587/63/13

  Scenario: add multiple properties to files inside a folder and do a propfind of the parent folder        # /drone/src/tests/acceptance/features/apiWebdavProperties/getFileProperties.feature:215
    Given user "user0" has created folder "/TestFolder"                                                    # FeatureContext::userHasCreatedFolder()
    And user "user0" has uploaded file with content "test data one" to "/TestFolder/test1.txt"             # FeatureContext::userHasUploadedAFileWithContentTo()
    And user "user0" has uploaded file with content "test data two" to "/TestFolder/test2.txt"             # FeatureContext::userHasUploadedAFileWithContentTo()
    And user "user0" has set the following properties of file "/TestFolder/test1.txt" using the WebDav API # WebDavPropertiesContext::userHasSetFollowingPropertiesUsingProppatch()
      | property  | value |
      | testprop1 | AAAAA |
      | testprop2 | BBBBB |
    And user "user0" has set the following properties of file "/TestFolder/test2.txt" using the WebDav API # WebDavPropertiesContext::userHasSetFollowingPropertiesUsingProppatch()
      | property  | value |
      | testprop1 | CCCCC |
      | testprop2 | DDDDD |
    When user "user0" gets the following properties of folder "/TestFolder" using the WebDav PropFind API  # WebDavPropertiesContext::userGetsFollowingPropsWithNamespaceOfFileUsingWebDavAPI()
      | property  |
      | testprop1 |
      | testprop2 |
    Then the HTTP status code should be success                                                            # FeatureContext::theHTTPStatusCodeShouldBeSuccess()
    And as user "user0" the last response should have the following properties                             # WebDavPropertiesContext::theResponseShouldHavePropertyWithValue()
      | resource              | property  | value                  |
      | /TestFolder/test1.txt | testprop1 | CCCCC                  |
      | /TestFolder/test1.txt | testprop2 | BBBBB                  |
      | /TestFolder/test2.txt | testprop1 | CCCCC                  |
      | /TestFolder/test2.txt | testprop2 | DDDDD                  |
      | /TestFolder/          | status    | HTTP/1.1 404 Not Found |
      WebDavPropertiesContext::theResponseShouldHavePropertyWithValue Expected 'CCCCC' but got 'AAAAA'
      Failed asserting that SimpleXMLElement Object &0000000004dff26d000000000e2b1393 (
          0 => 'AAAAA'
      ) matches expected 'CCCCC'.
  Scenario Outline: Setting custom complex DAV property and reading it                                                                                             # /drone/src/tests/acceptance/features/apiWebdavProperties/setFileProperties.feature:24
    Given using <dav_version> DAV path                                                                                                                             # FeatureContext::usingOldOrNewDavPath()
    And user "user0" has uploaded file "filesForUpload/textfile.txt" to "/testcustomprop.txt"                                                                      # FeatureContext::userHasUploadedAFileTo()
    And user "user0" has set property "very-custom-prop" with namespace "x1='http://whatever.org/ns'" of file "/testcustomprop.txt" to "<foo xmlns='http://bar'/>" # WebDavPropertiesContext::userHasSetPropertyWithNamespaceOfEntryTo()
    When user "user0" gets a custom property "very-custom-prop" with namespace "x1='http://whatever.org/ns'" of file "/testcustomprop.txt"                         # WebDavPropertiesContext::userGetsPropertiesOfFile()
    Then the response should contain a custom "very-custom-prop" property with namespace "x1='http://whatever.org/ns'" and value "Object"                          # WebDavPropertiesContext::theResponseShouldContainACustomPropertyWithValue()

    Examples:
      | dav_version |
      | old         |
        The HTTP status code 500 is not between 200 and 299
        Failed asserting that 500 is equal to 299 or is less than 299.
      | new         |
        The HTTP status code 500 is not between 200 and 299
        Failed asserting that 500 is equal to 299 or is less than 299.
--- Failed scenarios:

    /drone/src/tests/acceptance/features/apiWebdavProperties/getFileProperties.feature:215
    /drone/src/tests/acceptance/features/apiWebdavProperties/setFileProperties.feature:33
    /drone/src/tests/acceptance/features/apiWebdavProperties/setFileProperties.feature:34

96 scenarios (93 passed, 3 failed)
697 steps (690 passed, 3 failed, 4 skipped)

Activity

  1. phil-davis commented on Feb 27, 2020

    @phil-davis
    ContributorAuthor

    Log has:

    {"reqId":"buRLXTsOueILvdkxUN7T","level":3,"time":"2020-02-27T04:47:29+00:00","remoteAddr":"172.20.0.5","user":"user0","app":"PHP","method":"PROPPATCH","url":"\/remote.php\/webdav\/testcustomprop.txt","message":"oci_bind_by_name(): Invalid variable used for bind at \/drone\/src\/lib\/composer\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/OCI8\/OCI8Statement.php#287"}
    {"reqId":"buRLXTsOueILvdkxUN7T","level":4,"time":"2020-02-27T04:47:29+00:00","remoteAddr":"172.20.0.5","user":"user0","app":"webdav","method":"PROPPATCH","url":"\/remote.php\/webdav\/testcustomprop.txt","message":"Exception: An exception occurred while executing 'INSERT INTO \"oc_properties\" (\"fileid\",\"propertyname\",\"propertyvalue\") VALUES(?,?,?)' with params [2147485153, \"{http:\\\/\\\/whatever.org\\\/ns}very-custom-prop\", {}]:\n\nORA-01008: not all variables bound: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'INSERT INTO \\\"oc_properties\\\" (\\\"fileid\\\",\\\"propertyname\\\",\\\"propertyvalue\\\") VALUES(?,?,?)' with params [2147485153, \\\"{http:\\\\\\\/\\\\\\\/whatever.org\\\\\\\/ns}very-custom-prop\\\", {}]:\\n\\nORA-01008: not all variables bound\",\"Code\":0,\"Trace\":\"#0 \\\/drone\\\/src\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(169): Doctrine\\\\DBAL\\\\Driver\\\\AbstractOracleDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\OCI8\\\\OCI8Exception))\\n#1 \\\/drone\\\/src\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(145): Doctrine\\\\DBAL\\\\DBALException::wrapException(Object(Doctrine\\\\DBAL\\\\Driver\\\\OCI8\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\OCI8\\\\OCI8Exception), 'An exception oc...')\\n#2 \\\/drone\\\/src\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(1065): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\OCI8\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\OCI8\\\\OCI8Exception), 'INSERT INTO \\\"oc...', Array)\\n#3 \\\/drone\\\/src\\\/lib\\\/private\\\/DB\\\/Connection.php(207): Doctrine\\\\DBAL\\\\Connection->executeUpdate('INSERT INTO \\\"oc...', Array, Array)\\n#4 \\\/drone\\\/src\\\/apps\\\/dav\\\/lib\\\/DAV\\\/FileCustomPropertiesBackend.php(193): OC\\\\DB\\\\Connection->executeUpdate('INSERT INTO \\\"oc...', Array)\\n#5 \\\/drone\\\/src\\\/apps\\\/dav\\\/lib\\\/DAV\\\/AbstractCustomPropertiesBackend.php(214): OCA\\\\DAV\\\\DAV\\\\FileCustomPropertiesBackend->updateProperties('testcustomprop....', Object(OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File), Array)\\n#6 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/PropPatch.php(295): OCA\\\\DAV\\\\DAV\\\\AbstractCustomPropertiesBackend->OCA\\\\DAV\\\\DAV\\\\{closure}(*** sensitive parameters replaced ***)\\n#7 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/PropPatch.php(230): Sabre\\\\DAV\\\\PropPatch->doCallBackMultiProp(Array, Object(Closure))\\n#8 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1271): Sabre\\\\DAV\\\\PropPatch->commit()\\n#9 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(393): Sabre\\\\DAV\\\\Server->updateProperties('testcustomprop....', Array)\\n#10 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(89): Sabre\\\\DAV\\\\CorePlugin->httpPropPatch(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#11 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(474): Sabre\\\\DAV\\\\Server->emit('method:PROPPATC...', Array)\\n#12 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(251): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#13 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(319): Sabre\\\\DAV\\\\Server->start()\\n#14 \\\/drone\\\/src\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(65): Sabre\\\\DAV\\\\Server->exec()\\n#15 \\\/drone\\\/src\\\/remote.php(165): require_once('\\\/drone\\\/src\\\/apps...')\\n#16 {main}\",\"File\":\"\\\/drone\\\/src\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractOracleDriver.php\",\"Line\":57}"}
    {"reqId":"buRLXTsOueILvdkxUN7T","level":3,"time":"2020-02-27T04:47:29+00:00","remoteAddr":"172.20.0.5","user":"user0","app":"webdav","method":"PROPPATCH","url":"\/remote.php\/webdav\/testcustomprop.txt","message":"Caused by: {\"Exception\":\"Doctrine\\\\DBAL\\\\Driver\\\\OCI8\\\\OCI8Exception\",\"Message\":\"ORA-01008: not all variables bound\",\"Code\":0,\"Trace\":\"#0 \\\/drone\\\/src\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/OCI8\\\/OCI8Statement.php(372): Doctrine\\\\DBAL\\\\Driver\\\\OCI8\\\\OCI8Exception::fromErrorInfo(Array)\\n#1 \\\/drone\\\/src\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(1058): Doctrine\\\\DBAL\\\\Driver\\\\OCI8\\\\OCI8Statement->execute(Array)\\n#2 \\\/drone\\\/src\\\/lib\\\/private\\\/DB\\\/Connection.php(207): Doctrine\\\\DBAL\\\\Connection->executeUpdate('INSERT INTO \\\"oc...', Array, Array)\\n#3 \\\/drone\\\/src\\\/apps\\\/dav\\\/lib\\\/DAV\\\/FileCustomPropertiesBackend.php(193): OC\\\\DB\\\\Connection->executeUpdate('INSERT INTO \\\"oc...', Array)\\n#4 \\\/drone\\\/src\\\/apps\\\/dav\\\/lib\\\/DAV\\\/AbstractCustomPropertiesBackend.php(214): OCA\\\\DAV\\\\DAV\\\\FileCustomPropertiesBackend->updateProperties('testcustomprop....', Object(OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File), Array)\\n#5 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/PropPatch.php(295): OCA\\\\DAV\\\\DAV\\\\AbstractCustomPropertiesBackend->OCA\\\\DAV\\\\DAV\\\\{closure}(*** sensitive parameters replaced ***)\\n#6 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/PropPatch.php(230): Sabre\\\\DAV\\\\PropPatch->doCallBackMultiProp(Array, Object(Closure))\\n#7 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1271): Sabre\\\\DAV\\\\PropPatch->commit()\\n#8 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(393): Sabre\\\\DAV\\\\Server->updateProperties('testcustomprop....', Array)\\n#9 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(89): Sabre\\\\DAV\\\\CorePlugin->httpPropPatch(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#10 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(474): Sabre\\\\DAV\\\\Server->emit('method:PROPPATC...', Array)\\n#11 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(251): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#12 \\\/drone\\\/src\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(319): Sabre\\\\DAV\\\\Server->start()\\n#13 \\\/drone\\\/src\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(65): Sabre\\\\DAV\\\\Server->exec()\\n#14 \\\/drone\\\/src\\\/remote.php(165): require_once('\\\/drone\\\/src\\\/apps...')\\n#15 {main}\",\"File\":\"\\\/drone\\\/src\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/OCI8\\\/OCI8Exception.php\",\"Line\":20}"}
    
  2. phil-davis commented on Feb 27, 2020

    @phil-davis
    ContributorAuthor

    Looks similar to #32670

  3. VicDeo commented on Apr 22, 2020

    @VicDeo
    Contributor

    ...and we have to do something with it now as it is no longer Oracle-specific for PHP 7.4
    🧯
    https://drone.owncloud.com/owncloud/core/24402/73/12

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions