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

Make MAX_CONTENT_LENGTH configurable #113

Closed
bmritz opened this issue Feb 18, 2021 · 8 comments
Closed

Make MAX_CONTENT_LENGTH configurable #113

bmritz opened this issue Feb 18, 2021 · 8 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@bmritz
Copy link

bmritz commented Feb 18, 2021

We have a use-case that often requires request payloads larger than the current MAX_CONTENT_LENGTH (https://github.com/GoogleCloudPlatform/functions-framework-python/blob/master/src/functions_framework/__init__.py#L41).

Functions Framework is intended to be run on K8ts or Cloud Run, both of which can be configured to handle larger requests than the current MAX_CONTENT_LENGTH, so configuring it to be larger would open up the library for more use cases.

@di
Copy link
Member

di commented Feb 18, 2021

Thanks for the issue @bmritz, I think I agree.

@asriniva, you added this in #66, but I'm not sure it's necessary in order to resolve that issue. Was that just to guard against a very large request on GCF? What would be the effect of removing that limit in the runtime? I assume the quota in GCF is already enforced somewhere higher up the stack.

@di di added the enhancement New feature or request label Feb 18, 2021
@asriniva
Copy link
Contributor

asriniva commented Feb 19, 2021

Yeah this is strictly as a guard for GCF, as you say I think the quota would be enforced elsewhere in the stack. I think it can be safely removed. Either that or we could potentially set this conditionally on GCF?

@di di added the good first issue Good for newcomers label Feb 20, 2021
@grant
Copy link
Contributor

grant commented Jun 17, 2022

Pull requests are welcome. We'd allow it. PR also needs testing.

MAX_CONTENT_LENGTH = 10 * 1024 * 1024

@t510599
Copy link

t510599 commented Aug 26, 2022

Hi @grant, I have implemented this feature and submitted the PR in #196.
Please take a look when you are free, thank you.

@grant
Copy link
Contributor

grant commented Aug 26, 2022

Hi @grant, I have implemented this feature and submitted the PR in #196.
Please take a look when you are free, thank you.

Thanks @t510599. I'll defer the PR review to @anniefu.

@garethgeorge
Copy link
Contributor

Looks like this was resolved by the PR, marking as closed. Thanks all!

@grant
Copy link
Contributor

grant commented Sep 22, 2023

Looks like this was resolved by the PR, marking as closed. Thanks all!

The PR was never merged

@sellpick-rudolf
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants