Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Container] cache:warmup failed to produce route cache, cache:clear works #57429

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

Closed
dkarlovi opened this issue Jun 17, 2024 · 6 comments
Closed

Comments

@dkarlovi
Copy link
Contributor

Symfony version(s) affected

7.1.1

Description

While upgrading from 7.0 to 7.1, my app started saying no routes exist.

I was doing

RUN bin/console cache:warmup --no-interaction -vvv

in my Dockerfile, cache folder doesn't exist before the command runs.

How to reproduce

rm -rf var/cache
bin/console cache:warmup --no-interaction -vvv
ls var/cache/prod/url_* # no files

Possible Solution

Have warmup behave exactly like clear would if it's running without a prior cache being present.

Alternatively, if this is impossible, have warmup throw it if notices there's no prior cache present because this is way too subtle of a change.

Additional Context

#53450 intended to fix this, but was closed.

@dkarlovi
Copy link
Contributor Author

/cc @xabbuh @stof @mbabker as maybe interested in this, we had a long debug session on Slack about it.

@umulmrum
Copy link
Contributor

This is especially dangerous when deploying to a readonly file system (e.g. AWS Lambda), as the router will try to generate the file on-demand but fails to write then. Currently this keeps me from upgrading to 7.1.

@dkarlovi
Copy link
Contributor Author

@umulmrum this is exactly why I've noticed this, but as noted, cache:clear works correctly for me, try that.

@umulmrum
Copy link
Contributor

umulmrum commented Jul 3, 2024

cache:warmup works again for me since 7.1.2 - thanks for fixing 🙂

@xabbuh xabbuh closed this as completed Jul 3, 2024
@dkarlovi
Copy link
Contributor Author

dkarlovi commented Jul 3, 2024

@umulmrum weird nobody tagged this issue but it still got fixed. :)

@xabbuh do you know which PR fixed it by any chance?

@xabbuh
Copy link
Member

xabbuh commented Jul 3, 2024

#57554 should be the fix. I missed that it wasn’t already linked when closing this issue.

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

No branches or pull requests

4 participants