Skip to content

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Oct 26, 2025

Q A
Branch? 8.0
Bug fix? no
New feature? no
Deprecations? no
Issues -
License MIT

Try to fix the job x86 / minimal-exts / lowest-php on branch 8.0.

The issue it that DynamoDbStoreTest tests use assertEquals on AmpHttpClient instances. But should be better to rewrite this tests.

1) Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest::testFromDsn
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
                     'responseCount' => 0
                     'pushedResponses' => []
                     'clients' => []
-                    'clientConfigurator' => Closure Object #3716 ()
+                    'clientConfigurator' => Closure Object #3709 ()
                     'maxHostConnections' => 6
                     'maxPendingPushes' => 50
                     'logger' => null

D:\a\symfony\symfony\src\Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest.php:52

2) Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest::testDsnPrecedence
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
                     'responseCount' => 0
                     'pushedResponses' => []
                     'clients' => []
-                    'clientConfigurator' => Closure Object #3722 ()
+                    'clientConfigurator' => Closure Object #472 ()
                     'maxHostConnections' => 6
                     'maxPendingPushes' => 50
                     'logger' => null

D:\a\symfony\symfony\src\Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest.php:60

3) Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest::testFromDsnWithRegion
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
                     'responseCount' => 0
                     'pushedResponses' => []
                     'clients' => []
-                    'clientConfigurator' => Closure Object #3685 ()
+                    'clientConfigurator' => Closure Object #3980 ()
                     'maxHostConnections' => 6
                     'maxPendingPushes' => 50
                     'logger' => null

D:\a\symfony\symfony\src\Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest.php:68

4) Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest::testFromDsnWithCustomEndpoint
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
                     'responseCount' => 0
                     'pushedResponses' => []
                     'clients' => []
-                    'clientConfigurator' => Closure Object #3727 ()
+                    'clientConfigurator' => Closure Object #3732 ()
                     'maxHostConnections' => 6
                     'maxPendingPushes' => 50
                     'logger' => null

D:\a\symfony\symfony\src\Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest.php:76

5) Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest::testFromDsnWithSslMode
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
                     'responseCount' => 0
                     'pushedResponses' => []
                     'clients' => []
-                    'clientConfigurator' => Closure Object #381 ()
+                    'clientConfigurator' => Closure Object #3744 ()
                     'maxHostConnections' => 6
                     'maxPendingPushes' => 50
                     'logger' => null

D:\a\symfony\symfony\src\Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest.php:84

6) Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest::testFromDsnWithSslModeOnDefault
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
                     'responseCount' => 0
                     'pushedResponses' => []
                     'clients' => []
-                    'clientConfigurator' => Closure Object #4002 ()
+                    'clientConfigurator' => Closure Object #3755 ()
                     'maxHostConnections' => 6
                     'maxPendingPushes' => 50
                     'logger' => null

D:\a\symfony\symfony\src\Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest.php:92

7) Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest::testFromDsnWithCustomEndpointAndPort
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
                     'responseCount' => 0
                     'pushedResponses' => []
                     'clients' => []
-                    'clientConfigurator' => Closure Object #4007 ()
+                    'clientConfigurator' => Closure Object #3766 ()
                     'maxHostConnections' => 6
                     'maxPendingPushes' => 50
                     'logger' => null

D:\a\symfony\symfony\src\Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest.php:100

8) Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest::testFromDsnWithQueryOptions
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
                     'responseCount' => 0
                     'pushedResponses' => []
                     'clients' => []
-                    'clientConfigurator' => Closure Object #3706 ()
+                    'clientConfigurator' => Closure Object #3777 ()
                     'maxHostConnections' => 6
                     'maxPendingPushes' => 50
                     'logger' => null

D:\a\symfony\symfony\src\Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest.php:108

9) Symfony\Component\Lock\Bridge\DynamoDb\Tests\Store\DynamoDbStoreTest::testFromDsnWithTableNameOption
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
                     'responseCount' => 0
                     'pushedResponses' => []
                     'clients' => []
-                    'clientConfigurator' => Closure Object #3718 ()
+                    'clientConfigurator' => Closure Object #3788 ()
                     'maxHostConnections' => 6
                     'maxPendingPushes' => 50
                     'logger' => null

@nicolas-grekas
Copy link
Member

Any idea why we don't see the failure on 7.4? What about applying on a lower branch?

@GromNaN
Copy link
Member Author

GromNaN commented Oct 26, 2025

I guess the amp V4 client is used in 7.4.
I will add a test and backport (maybe tonight).

@GromNaN
Copy link
Member Author

GromNaN commented Oct 26, 2025

Superseded by #62167, which fixes the tests.

@GromNaN GromNaN closed this Oct 26, 2025
@GromNaN GromNaN deleted the fix-dynamodb-compare branch October 26, 2025 22:41
nicolas-grekas added a commit that referenced this pull request Oct 27, 2025
…sts using AmpV5 client (GromNaN)

This PR was squashed before being merged into the 7.4 branch.

Discussion
----------

[Lock][DynamoDB] Enable `http_client` injection and fix tests using AmpV5 client

| Q             | A
| ------------- | ---
| Branch?       | 7.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Issues        | -
| License       | MIT

Replace #62162 to fix the [x86 / minimal-exts / lowest-php](https://github.com/symfony/symfony/actions/runs/18802577388/job/53652067798#logs) job in 8.0

In order to compare instances of `DynamoDbStore`, we need to inject the same `HttpClient` instance.
The `http_client` option is a feature that enables, for example, injecting a client decorated by the profiler to view the HTTP requests made by the store, and still use the DSN for the lock configuration.

Commits
-------

75289fa [Lock][DynamoDB] Enable `http_client` injection and fix tests using AmpV5 client
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