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

fix: parameter provider in a long running http worker #6683

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

rmikalkenas
Copy link
Contributor

@rmikalkenas rmikalkenas commented Sep 30, 2024

Q A
Branch? 3.4
Tickets -
License MIT
Doc PR -

In case of using long running http workers (Roadrunner for example), query parameters and in general parameters functionality tends to persist previous request value due to aggressive caching of resource metadata

Fixing by clearing extra data before parsing new one

Targeting 3.4, but the issue reproducible at 4.0 as well

Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but let's wait for @soyuka review before merging.

@dunglas
Copy link
Member

dunglas commented Sep 30, 2024

Actually, shouldn't we also don't cache parameters at all?

@soyuka
Copy link
Member

soyuka commented Oct 1, 2024

Interesting use case, I wish we wouldn't cache this at all actually but we don't really have a way to. I think that having the value inside the Parameter is a good DX feature but indeed having "living" values inside immutable Metadata is not the best.

@dunglas actually the metadata for Parameters should be cached but values should not. Let's merge this for now as a quick fix.

@soyuka soyuka merged commit 2e20446 into api-platform:3.4 Oct 1, 2024
77 of 78 checks passed
@soyuka
Copy link
Member

soyuka commented Oct 1, 2024

thanks!

@rmikalkenas rmikalkenas deleted the fix-parameters branch October 1, 2024 19:07
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