-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mailer] Changed the region in the tests to the (default) eu-west-1
#52958
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 &ldquo 8000 ;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
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
eu-west-1
in the testseu-west-1
Thank you for the PR. Though this doesn't look like the right solution to me (see the failing tests). Can you check if you have locally set one of the environment variables |
Please double check the target branch, my feelings are, that this fix must be applied on a lower branch. Thanks |
@xabbuh Thanks for you quick response! I saw these failing on the Symfony #hackday introduction with running the PHPUnit test suite. I've lookup the local variables up front but there are no configurations at all. It's an clean clone of the repository. Closing this one because the pipeline in main is green. Possibly a local problem. 🤷🏼♂️
https://github.com/symfony/symfony/actions/runs/7142696464/job/19452537711 |
@cafferata Neither |
@ 8000 xabbuh that's correct. Any suggestion on 'harden the test suite'? |
Indeed! It's also on lower branches. But for now I've no idea how to go further with 'harden the test suite'. |
Could you try to debug locally why AWS Async choses the |
@xabbuh Found it by dumping ^ AsyncAws\Core\Configuration^ {#379
-data: array:11 [
"accessKeyId" => "ACCESS_KEY"
"accessKeySecret" => "SECRET_KEY"
"region" => "eu-west-1"
"debug" => "false"
"profile" => "default"
"sharedCredentialsFile" => "~/.aws/credentials"
"sharedConfigFile" => "~/.aws/config"
"endpoint" => "https://%service%.%region%.amazonaws.com"
"pathStyleEndpoint" => "false"
"sendChunkedBody" => "false"
"endpointDiscoveryEnabled" => "false"
]
-userData: array:3 [
"accessKeyId" => true
"accessKeySecret" => true
"region" => true
]
} cat ~/.aws/config
|
Found an (other) way to stop using the (local) AWS shared configuration in the Composer package async-aws/core in the PHPUnit tests. 🥳 This was an great Symfony hackday pair session with @TmEuMail-2020. |
Thanks @xabbuh and @OskarStark see #52965 for the follow-up PR. 👍 |
… in PHPUnit (cafferata) This PR was merged into the 5.4 branch. Discussion ---------- [Mailer] Stop using the (local) AWS shared configuration in PHPUnit | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Replaces #52958 Found an (other) way to stop using the (local) [AWS shared configuration](https://async-aws.com/authentication/credentials-file.html) in the Composer package [async-aws/core](https://github.com/async-aws/core) in the PHPUnit tests. 🥳 _This was an great Symfony hackday pair session with `@TmEuMail`-2020._ Also big shout out to `@xabbuh` and `@OskarStark` for the heads up in the right direction! 👍 ```shell ./phpunit src/Symfony/Component/Mailer ``` **Before** <details> <summary>PHPUnit output</summary> ```shell PHPUnit 9.6.15 by Sebastian Bergmann and contributors. Testing /symfony/symfony/src/Symfony/Component/Mailer F...F...F.F...F...F............................................ 63 / 495 ( 12%) ............................................................... 126 / 495 ( 25%) ............................................................... 189 / 495 ( 38%) ............................................................... 252 / 495 ( 50%) ............................................................... 315 / 495 ( 63%) ............................................................... 378 / 495 ( 76%) .......................................SSS...SS.............S.. 441 / 495 ( 89%) ..................SS.................................. 495 / 495 (100%) Time: 00:02.082, Memory: 24.00 MB There were 6 failures: 1) Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport\SesApiAsyncAwsTransportTest::testToString with data set #0 (Symfony\Component\Mailer\Bridge\Amazon\Transport\SesApiAsyncAwsTransport Object (...), 'ses+api://ACCESS_KEY@us-east-1') Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -'ses+api://ACCESS_KEY@us-east-1' +'ses+api://ACCESS_KEY@eu-west-1' /symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php:34 2) Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport\SesApiAsyncAwsTransportTest::testToString with data set #4 (Symfony\Component\Mailer\Bridge\Amazon\Transport\SesApiAsyncAwsTransport Object (...), 'ses+api://ACCESS_KEY@us-east-1') Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -'ses+api://ACCESS_KEY@us-east-1' +'ses+api://ACCESS_KEY@eu-west-1' /symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php:34 3) Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport\SesApiAsyncAwsTransportTest::testSend Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -'https://email.us-east-1.amazonaws.com/v2/email/outbound-emails' +'https://email.eu-west-1.amazonaws.com/v2/email/outbound-emails' /symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php:79 /symfony/symfony/src/Symfony/Component/HttpClient/MockHttpClient.php:70 /symfony/symfony/vendor/async-aws/core/src/AbstractApi.php:161 /symfony/symfony/vendor/async-aws/ses/src/SesClient.php:67 /symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesHttpAsyncAwsTransport.php:55 /symfony/symfony/src/Symfony/Component/Mailer/Transport/AbstractTransport.php:69 /symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php:119 4) Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport\SesHttpAsyncAwsTransportTest::testToString with data set #0 (Symfony\Component\Mailer\Bridge\Amazon\Transport\SesHttpAsyncAwsTransport Object (...), 'ses+https://ACCESS_KEY@us-east-1') Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -'ses+https://ACCESS_KEY@us-east-1' +'ses+https://ACCESS_KEY@eu-west-1' /symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php:34 5) Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport\SesHttpAsyncAwsTransportTest::testToString with data set #4 (Symfony\Component\Mailer\Bridge\Amazon\Transport\SesHttpAsyncAwsTransport Object (...), 'ses+https://ACCESS_KEY@us-east-1') Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -'ses+https://ACCESS_KEY@us-east-1' +'ses+https://ACCESS_KEY@eu-west-1' /symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php:34 6) Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport\SesHttpAsyncAwsTransportTest::testSend Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -'https://email.us-east-1.amazonaws.com/v2/email/outbound-emails' +'https://email.eu-west-1.amazonaws.com/v2/email/outbound-emails' /symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php:79 /symfony/symfony/src/Symfony/Component/HttpClient/MockHttpClient.php:70 /symfony/symfony/vendor/async-aws/core/src/AbstractApi.php:161 /symfony/symfony/vendor/async-aws/ses/src/SesClient.php:67 /symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesHttpAsyncAwsTransport.php:55 /symfony/symfony/src/Symfony/Component/Mailer/Transport/AbstractTransport.php:69 /symfony/symfony/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php:112 FAILURES! Tests: 495, Assertions: 923, Failures: 6, Skipped: 8. ``` </details> **After** <details> <summary>PHPUnit output</summary> ```shell PHPUnit 9.6.15 by Sebastian Bergmann and contributors. Testing /symfony/symfony/src/Symfony/Component/Mailer ............................................................... 63 / 495 ( 12%) ............................................................... 126 / 495 ( 25%) ............................................................... 189 / 495 ( 38%) ............................................................... 252 / 495 ( 50%) ............................................................... 315 / 495 ( 63%) ............................................................... 378 / 495 ( 76%) .......................................SSS...SS.............S.. 441 / 495 ( 89%) ..................SS.................................. 495 / 495 (100%) Time: 00:02.387, Memory: 24.00 MB OK, but incomplete, skipped, or risky tests! Tests: 495, Assertions: 943, Skipped: 8. ``` </details> Commits ------- b156c33 [Mailer] Stop using the (local) AWS shared configuration in the PHPUnit tests.
Before
PHPUnit output
After
PHPUnit output
PHPUnit 9.6.15 by Sebastian Bergmann and contributors. Testing /symfony/symfony/src/Symfony/Component/Mailer ............................................................... 63 / 495 ( 12%) ............................................................... 126 / 495 ( 25%) ............................................................... 189 / 495 ( 38%) ............................................................... 252 / 495 ( 50%) ............................................................... 315 / 495 ( 63%) ............................................................... 378 / 495 ( 76%) .......................................SSS...SS.............S.. 441 / 495 ( 89%) ..................SS.................................. 495 / 495 (100%) Time: 00:02.387, Memory: 24.00 MB OK, but incomplete, skipped, or risky tests! Tests: 495, Assertions: 943, Skipped: 8.