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

Update generated code #1767

Merged
merged 1 commit into from
Sep 21, 2024
Merged

Conversation

async-aws-bot
Copy link
Collaborator

The AWS API contract changed with version 1.3.0.

This PR contains the new definition for Services.

@jderusse
Copy link
Member

It looks like failures are related to recent changes in Symfony main branch

AsyncAws\Symfony\Bundle\Tests\Functional\BundleInitializationTest::testInitBundle
require(/tmp/NyholmBundleTest/cache66ed173c6f4f79.44587021/ContainerOEapCS4/getServicesResetterService.php): Failed to open stream: No such file or directory

are you aware of such bug @nicolas-grekas / @stof
For reference, it started 2 days ago

@stof
Copy link
Member

stof commented Sep 20, 2024

The error message makes me think it might be related to symfony/symfony#58240 as that's the recent change related to the service resetter service. But this looks weird to me.

@stof
Copy link
Member

stof commented Sep 20, 2024

weird thing is that I don't get those errors locally.

@jderusse
Copy link
Member

weird thing is that I don't get those errors locally.

I reproduced with the following steps (extracted form the .github/workflows/ci.yml file)

composer config minimum-stability dev
composer require --dev --no-update "phpunit/phpunit=9.6.*"
composer update --no-interaction --prefer-dist --optimize-autoloader
./vendor/bin/simple-phpunit install
./vendor/bin/simple-phpunit src/Integration/Symfony/Bundle/tests/Functional/ --stop-on-failure

@stof
Copy link
Member

stof commented Sep 20, 2024

yeah, I forgot to use dev stability

@jderusse
Copy link
Member

ok, got it.
Because Nyholm\BundleTest\TestKernel cleanup the cache/log on Kernel::shutdown and the new PR calls the container services_resetter after the shutdown

I believe the services_resetter shouldn't be called before kernel shutdown

@stof
Copy link
Member

stof commented Sep 20, 2024

I found the cause of the issue:

KernelTestCase first shutdown the kernel and then resets the container, which now involves getting the service_resetter service.
TestKernel from nyholm/symfony-bundle-test deletes the content of the cache directory during shutdown (by default), which puts the compiled DI container in a corrupted state (any service for which the compiled code is in a separate file cannot be instantiated once those files are gone). Using $kernel->setClearCacheAfterShutdown(false) should avoid that issue.

@jderusse
Copy link
Member

Using $kernel->setClearCacheAfterShutdown(false) should avoid that issue.

meh.. I don't want my disk to be fill with obsolete cache, because Symfony tries to use a closed container/kernel.

IMHO this should be fix in Symfony symfony/symfony#58327

@stof
Copy link
Member

stof commented Sep 20, 2024

@jderusse I'm preparing a fix in nyholm/symfony-bundle-test

@jderusse jderusse merged commit f3f3101 into async-aws:master Sep 21, 2024
16 checks passed
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.

3 participants