Skip to content

Update Guzzle to 6.3#32537

Closed
phil-davis wants to merge 9 commits into
masterfrom
update-guzzle-6
Closed

Update Guzzle to 6.3#32537
phil-davis wants to merge 9 commits into
masterfrom
update-guzzle-6

Conversation

@phil-davis

@phil-davis phil-davis commented Aug 31, 2018

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Aug 31, 2018

Copy link
Copy Markdown

Codecov Report

Merging #32537 into master will decrease coverage by 19.33%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #32537       +/-   ##
=============================================
- Coverage     65.28%   45.94%   -19.34%     
=============================================
  Files          1210      109     -1101     
  Lines         69984    10493    -59491     
  Branches       1280     1280               
=============================================
- Hits          45688     4821    -40867     
+ Misses        23924     5300    -18624     
  Partials        372      372
Flag Coverage Δ Complexity Δ
#javascript 53.04% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 30.34% <ø> (-36.35%) 0 <ø> (-18481)
Impacted Files Coverage Δ Complexity Δ
lib/private/Files/Storage/DAV.php 5.46% <ø> (-75.64%) 0 <0> (ø)
apps/updatenotification/templates/admin.php
lib/private/Encryption/Keys/Storage.php
lib/private/App/CodeChecker/NodeVisitor.php
lib/private/RedisFactory.php
apps/dav/lib/Avatars/AvatarNode.php
...s/dav/appinfo/Migrations/Version20170202213905.php
apps/dav/lib/Upload/ChunkLocationProvider.php
apps/files/lib/AppInfo/Application.php
... and 1092 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d0f23f...7ba1aed. Read the comment docs.

@phil-davis phil-davis force-pushed the update-guzzle-6 branch 2 times, most recently from 57c5f69 to 5e0f986 Compare August 31, 2018 13:47
Comment thread tests/TestHelpers/EmailHelper.php Outdated
Comment thread tests/TestHelpers/EmailHelper.php Outdated
@phil-davis

Copy link
Copy Markdown
Contributor Author

The only remaining fail is in a phpunit with sqlite job:
https://drone.owncloud.com/owncloud/core/10003/166

Time: 12.59 minutes, Memory: 2552.00MB

There were 7 errors:

1) Test\Http\Client\ClientTest::testGet
Error: Call to undefined method Mock_Client_56d2bb18::getConfig()

/drone/src/lib/private/Http/Client/Client.php:65
/drone/src/lib/private/Http/Client/Client.php:136
/drone/src/tests/lib/Http/Client/ClientTest.php:93

2) Test\Http\Client\ClientTest::testPost
Error: Call to undefined method Mock_Client_56d2bb18::getConfig()

/drone/src/lib/private/Http/Client/Client.php:65
/drone/src/lib/private/Http/Client/Client.php:202
/drone/src/tests/lib/Http/Client/ClientTest.php:99

3) Test\Http\Client\ClientTest::testPut
Error: Call to undefined method Mock_Client_56d2bb18::getConfig()

/drone/src/lib/private/Http/Client/Client.php:65
/drone/src/lib/private/Http/Client/Client.php:241
/drone/src/tests/lib/Http/Client/ClientTest.php:105

4) Test\Http\Client\ClientTest::testDelete
Error: Call to undefined method Mock_Client_56d2bb18::getConfig()

/drone/src/lib/private/Http/Client/Client.php:65
/drone/src/lib/private/Http/Client/Client.php:276
/drone/src/tests/lib/Http/Client/ClientTest.php:111

5) Test\Http\Client\ClientTest::testOptions
Error: Call to undefined method Mock_Client_56d2bb18::getConfig()

/drone/src/lib/private/Http/Client/Client.php:65
/drone/src/lib/private/Http/Client/Client.php:311
/drone/src/tests/lib/Http/Client/ClientTest.php:117

6) OCA\Files_Sharing\Tests\WatcherTest::testFolderSizePropagationToOwnerStorage
TypeError: Argument 1 passed to Aws\Handler\GuzzleV5\GuzzleHandler::Aws\Handler\GuzzleV5\{closure}() must be an instance of Exception, instance of TypeError given, called in /drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/RejectedPromise.php on line 40

/drone/src/apps/files_primary_s3/vendor/aws/aws-sdk-php/src/Handler/GuzzleV5/GuzzleHandler.php:82
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/RejectedPromise.php:40
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/TaskQueue.php:47
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/Promise.php:246
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/Promise.php:223
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/Promise.php:267
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/Promise.php:225
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/Promise.php:62
/drone/src/apps/files_primary_s3/vendor/aws/aws-sdk-php/src/AwsClientTrait.php:58
/drone/src/apps/files_primary_s3/lib/streamwrapper.php:660
/drone/src/apps/files_primary_s3/lib/streamwrapper.php:143
/drone/src/apps/files_primary_s3/lib/streamwrapper.php:875
/drone/src/apps/files_primary_s3/lib/streamwrapper.php:147
/drone/src/apps/files_primary_s3/lib/s3storage.php:151
/drone/src/lib/private/Files/ObjectStore/ObjectStoreStorage.php:271
/drone/src/lib/private/Files/ObjectStore/ObjectStoreStorage.php:300
/drone/src/lib/private/Files/Storage/Common.php:197
/drone/src/lib/private/Files/Storage/Wrapper/Wrapper.php:252
/drone/src/lib/private/Files/Storage/Wrapper/Availability.php:274
/drone/src/lib/private/Files/Storage/Wrapper/Checksum.php:191
/drone/src/lib/private/Files/Storage/Wrapper/Jail.php:251
/drone/src/apps/files_sharing/lib/SharedStorage.php:452
/drone/src/apps/files_sharing/tests/WatcherTest.php:113

7) OCA\Files_Sharing\Tests\WatcherTest::testSubFolderSizePropagationToOwnerStorage
TypeError: Argument 1 passed to Aws\Handler\GuzzleV5\GuzzleHandler::Aws\Handler\GuzzleV5\{closure}() must be an instance of Exception, instance of TypeError given, called in /drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/RejectedPromise.php on line 40

/drone/src/apps/files_primary_s3/vendor/aws/aws-sdk-php/src/Handler/GuzzleV5/GuzzleHandler.php:82
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/RejectedPromise.php:40
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/TaskQueue.php:47
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/Promise.php:246
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/Promise.php:223
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/Promise.php:267
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/Promise.php:225
/drone/src/apps/files_primary_s3/vendor/guzzlehttp/promises/src/Promise.php:62
/drone/src/apps/files_primary_s3/vendor/aws/aws-sdk-php/src/AwsClientTrait.php:58
/drone/src/apps/files_primary_s3/lib/streamwrapper.php:660
/drone/src/apps/files_primary_s3/lib/streamwrapper.php:143
/drone/src/apps/files_primary_s3/lib/streamwrapper.php:875
/drone/src/apps/files_primary_s3/lib/streamwrapper.php:147
/drone/src/apps/files_primary_s3/lib/s3storage.php:151
/drone/src/lib/private/Files/ObjectStore/ObjectStoreStorage.php:271
/drone/src/lib/private/Files/ObjectStore/ObjectStoreStorage.php:300
/drone/src/lib/private/Files/Storage/Common.php:197
/drone/src/lib/private/Files/Storage/Wrapper/Wrapper.php:252
/drone/src/lib/private/Files/Storage/Wrapper/Availability.php:274
/drone/src/lib/private/Files/Storage/Wrapper/Checksum.php:191
/drone/src/lib/private/Files/Storage/Wrapper/Jail.php:251
/drone/src/apps/files_sharing/lib/SharedStorage.php:452
/drone/src/apps/files_sharing/tests/WatcherTest.php:143

--

@phil-davis phil-davis changed the title [WIP] Update guzzle 6 Update Guzzle to 6.3 Aug 31, 2018
@phil-davis phil-davis mentioned this pull request Aug 31, 2018
9 tasks
@phil-davis phil-davis force-pushed the update-guzzle-6 branch 3 times, most recently from 66207e7 to 0958217 Compare September 6, 2018 05:49
@phil-davis

Copy link
Copy Markdown
Contributor Author

ToDo:
Could not share file/folder! message: "cURL error 60: SSL certificate problem: self signed certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)"

Something needs to be looked into related to the new SSL test environment and GuzzleV6.

@patrickjahns

Copy link
Copy Markdown
Contributor

Guzzle is schedule for OC11 - it doesn't make sense to spend much effort here currently.

For Behat/Acceptance tests, we should anyway move into a separate namespace ( composer-bin ) to separate the code for acceptance test framework from anything ownCloud core relies on

@phil-davis

phil-davis commented Dec 20, 2018

Copy link
Copy Markdown
Contributor Author

ToDo:

1) DeleteHelperTest::testDeleteHelperWithOlderDavVersion
Error: Class 'GuzzleHttp\Subscriber\Mock' not found

/drone/src/tests/TestHelpers/Unit/DeleteHelperTest.php:41

2) DeleteHelperTest::testDeleteHelperWithNewerDavVersion
Error: Class 'GuzzleHttp\Subscriber\Mock' not found

/drone/src/tests/TestHelpers/Unit/DeleteHelperTest.php:41

3) DeleteHelperTest::testDeleteHelperSendsWithGivenHeaders
Error: Class 'GuzzleHttp\Subscriber\Mock' not found

/drone/src/tests/TestHelpers/Unit/DeleteHelperTest.php:41

4) WebDavHelperTest::testUrlIsSanitizedByMakeDavRequestForNewerDav
Error: Class 'GuzzleHttp\Subscriber\Mock' not found

/drone/src/tests/TestHelpers/Unit/WebDavHelperTest.php:42

5) WebDavHelperTest::testUrlIsSanitizedByMakeDavRequestForOlderDavPath
Error: Class 'GuzzleHttp\Subscriber\Mock' not found
...
        Behat\Testwork\Call\Exception\FatalThrowableError: Fatal error: Cannot use object of type GuzzleHttp\Psr7\Response as array in /drone/src/tests/acceptance/features/bootstrap/WebDav.php:1775
        Stack trace:
        #0 [internal function]: FeatureContext->theHTTPStatusCodeOfAllUploadResponsesShouldBe('507')
    Then the capabilities should contain                                                                         # CapabilitiesContext::checkCapabilitiesResponse()
      | capability    | path_to_element                       | value             |
      | core          | pollinterval                          | 60                |
      | core          | webdav-root                           | remote.php/webdav |
      | files_sharing | api_enabled                           | 1                 |
      | files_sharing | can_share                             | EMPTY             |
      | files_sharing | public@@@enabled                      | 1                 |
      | files_sharing | public@@@upload                       | 1                 |
      | files_sharing | public@@@send_mail                    | EMPTY             |
      | files_sharing | public@@@social_share                 | 1                 |
      | files_sharing | resharing                             | 1                 |
      | files_sharing | federation@@@outgoing                 | 1                 |
      | files_sharing | federation@@@incoming                 | 1                 |
      | files_sharing | group_sharing                         | 1                 |
      | files_sharing | share_with_group_members_only         | EMPTY             |
      | files_sharing | user_enumeration@@@enabled            | 1                 |
      | files_sharing | user_enumeration@@@group_members_only | EMPTY             |
      | files         | bigfilechunking                       | 1                 |
      Failed field files_sharing can_share
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -''
      +'1'
    Then the OCS status code should be "100"                                                                  # FeatureContext::theOCSStatusCodeShouldBe()
      Exception: String could not be parsed as XML in /drone/src/tests/TestHelpers/HttpRequestHelper.php:257
      Stack trace:
      #0 /drone/src/tests/TestHelpers/HttpRequestHelper.php(257): SimpleXMLElement->__construct('')
      #1 /drone/src/tests/acceptance/features/bootstrap/BasicStructure.php(809): TestHelpers\HttpRequestHelper::getResponseXml(Object(GuzzleHttp\Psr7\Response))
      #2 /drone/src/tests/acceptance/features/bootstrap/BasicStructure.php(794): FeatureContext->getResponseXml(Object(GuzzleHttp\Psr7\Response))
      #3 /drone/src/tests/acceptance/features/bootstrap/BasicStructure.php(1067): FeatureContext->getOCSResponseStatusCode(Object(GuzzleHttp\Psr7\Response))
    Examples:
      | ocs-api-version | ocs-status | http-status |
      | 1               | 100        | 200         |
        'users' array should be empty, but it starts with Sharee One (sharee1)
        Failed asserting that an array is empty.
      | 2               | 200        | 200         |
        'users' array should be empty, but it starts with Sharee One (sharee1)
        Failed asserting that an array is empty.

and...

@phil-davis phil-davis force-pushed the update-guzzle-6 branch 3 times, most recently from da210ca to d79f93c Compare June 6, 2019 07:52
@phil-davis phil-davis force-pushed the update-guzzle-6 branch 3 times, most recently from dc00e00 to f1c23c5 Compare June 28, 2019 00:53
@phil-davis

Copy link
Copy Markdown
Contributor Author

Latest hassle: https://github.com/guzzle/guzzle/blob/master/UPGRADING.md e.g.
Removed GuzzleHttp\BatchResults
but acceptance test speedup changes have now used BatchResults and sending requests in parallel etc in UserHelper.php and HttpRequestHelper.php

So to get this Guzzle6 passing again, that has to be sorted out - how to do it when using Guzzle6?

@DeepDiver1975

Copy link
Copy Markdown
Member

As discussed in #35777 the master branch will from now on hold the ownCloud 10 codebase.

This PR targetted ownCloud 11 which is postponed to a far distant future.

Because of that I'm closing this PR and kindly ask you to re-submit this PR in a few days.

Thanks a lot for your patience

@phil-davis

Copy link
Copy Markdown
Contributor Author

Re-opening so that I can find this some day.

The diffs here are out-of-date due to both the passage of time and the stable10->master changes. But it will give some clue about what is needed.

@phil-davis

phil-davis commented Feb 12, 2020

Copy link
Copy Markdown
Contributor Author

PR #36946 is attempting to update to Guzzle6 for the acceptance test code. That takes the acceptance test changes-in-progress from here and makes them work with current core master.

The changes to actual core backend code from here will need to be taken "some day" if we do the "real" core update to Guzzle6.

@phil-davis

Copy link
Copy Markdown
Contributor Author

PR #36999 implemented Guzzle6 for the acceptance tests.

I will pick out the remaining code changes for the back-end run-time from here and make another PR for that. Using Guzzle6 in core back-end looks like it will be needed for proper PHP 7.4 support.

@phil-davis phil-davis marked this pull request as draft November 18, 2020 15:30
@phil-davis

Copy link
Copy Markdown
Contributor Author

See #38706

@phil-davis phil-davis closed this May 7, 2021
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.

3 participants